当前位置: > CentOS > CentOS教程 >

centos6.2 安装zenoss

时间:2015-01-17 17:04来源:linux.it.net.cn 作者:IT

借助于官方文档和一步步的实验终于安装成功了最新的zenoss,zenoss感觉还是挺好用的,看网上介绍的文章也不多,自己就整理了一下希望对需要的人有所帮助!

系统是centos6.2

zenoss是zenoss-core-zenpacks-4.2.0.el6.x86_64.rpm

需要安装的软件有

Oracle Java 1.6 Update 31 or later. (1.7 is not supported.)
RRDtool 1.4.7 or later
MySQL Community Server 5.5.25 or later
RabbitMQ 2.8.4 or later
Nagios Plugins 1.4.15 or later
Erlang R12B
net-snmp
 
安装前下关掉selinux和iptables
service iptables stop
chkconfig iptables off
service ip6tables stop
chkconfig ip6tables off
 
清理掉相关的包
rpm -qa | grep -i matahari |xargs rpm -e --nodeps
rpm -qa | grep -i qpid |xargs rpm -e --nodeps
rpm -qa | grep -i mysql |xargs rpm -e --nodeps
rm -rf /var/lib/mysql
 
安装jre
wget -O jre-6u31-linux-x64-rpm.bin http://javadl.sun.com/webapps/download/AutoDL?BundleId=59622
chmod +x ./jre-6u31-linux-x64-rpm.bin
./jre-6u31-linux-x64-rpm.bin
vim .bashrc
添加:
JAVA_HOME=/usr/java/default
JAVA_BIN=/usr/java/default/bin
export JAVA_HOME JAVA_BIN
ln -s /usr/java/default/bin/java /usr/bin/
java -version
 
安装 RRDtool
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
yum -y --nogpgcheck localinstall rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Edit the /etc/yum.repos.d/rpmforge.repo file->enabled = 0
yum -y --enablerepo=rpmforge-extras install rrdtool-1.4.7
 
安装 MySQL
从http://dev.mysql.com/downloads/mysql 下载
wget  http://cdn.mysql.com/Downloads/MySQL-5.5/MySQL-server-5.5.28-1.el6.x86_64.rpm
wget http://cdn.mysql.com/Downloads/MySQL-5.5/MySQL-shared-compat-5.5.28-1.el6.x86_64.rpm
wget  http://cdn.mysql.com/Downloads/MySQL-5.5/MySQL-client-5.5.28-1.el6.x86_64.rpm
http://cdn.mysql.com/Downloads/MySQL-5.5/MySQL-shared-5.5.28-1.el6.x86_64.rpm
MySQL-client-5.5.25a-1.el6.x86_64.rpm
MySQL-server-5.5.25a-1.el6.x86_64.rpm
MySQL-shared-5.5.25a-1.el6.x86_64.rpm
yum -y --nogpgcheck localinstall MySQL*

vim  /etc/my.cnf

[mysqld]
max_allowed_packet=16M
innodb_buffer_pool_size=256M
innodb_additional_mem_pool_size=20M
 
service mysql start
chkconfig --add mysql
chkconfig mysql on
mysqladmin -u root password ''
mysqladmin -u root -p 123456 -h localhost password ''
 
安装epel源
wget -r -l1 --no-parent -A 'epel*.rpm' http://dl.fedoraproject.org/pub/epel/6/x86_64/
yum -y --nogpgcheck localinstall dl.fedoraproject.org/pub/epel/6/x86_64/epel-*.rpm
/etc/yum.repos.d/epel.repo ->enabled = 0
 
如果不能用的话执行sed -i 's|^#baseurl|baseurl| ; s|^mirrorlist|#mirrorlist|' epel.repo
 
安装rabbitmq
wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.8.4/rabbitmq-server-2.8.4-1.noarch.rpm
yum -y --nogpgcheck --enablerepo=epel localinstall rabbitmq-server-2.8.4-1.noarch.rpm
 
service rabbitmq-server start
如果不能启动查看端口是否被占用:netstat -ntulp|grep 5672
chkconfig rabbitmq-server on
 
安装zenoss
 
从http://community.zenoss.org/community/download 下载
zenoss-4.2.0.el6.x86_64.rpm
zenoss-core-zenpacks-4.2.0.el6.x86_64.rpm
 
安装前最好是升级一下python
cd ython-3.2.3
./configure --prefix=
make
make install
ln -s ...........
 
升级后需要修改 vim /usr/bin/yum
把#!/usr/bin/python改为#!/usr/bin/python2.6否则yum将不可用
yum install memcache*
service memcached start
chkconfig memcached on
 
yum install net-snmp*
service snmpd start
chkconfig snmpd on
yum -y --nogpgcheck --enablerepo=epel localinstall zenoss-4.2.0.el6.x86_64.rpm
启动前需要到/opt/zenoss/etc下修改global.conf (由global.conf.example)得到
把设置的mysql密码添加上去,zodb-admin-password,zep-admin-password后面也是要添加的,要不然初始化的时候就会报错
service zenoss start
安装zenpacks
yum -y --nogpgcheck localinstall zenoss-core-zenpacks-4.2.0.el6.x86_64.rpm
 
此时就可以登录http://xxx.xxx.xxx.xxx:8080来进行监控了
 
备注:

配置本机snmp

编辑snmp配置文件/etc/snmp/snmpd.conf

修改:

com2sec notConfigUser default public

改为:

com2sec notConfigUser 127.0.0.1 public

修改:

access notConfigGroup "" any noauth exact systemview none none

改为:

access notConfigGroup "" any noauth exact all none none

添加view systemview included .1

去掉这句的注释

#view all included .1 80

重启snmp服务并测试

#service snmpd restart

验证:snmpwalk -v 2c -c public localhost if



(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容