ZABBIX SERVER安装(源码)

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

ZABBIX SERVER源码安装

一、安装依赖包

#yum-y install gcc-4.4.6-3.el6.x86_64.rpm gcc-c++-4.4.6-3.el6.x86_64.rpm autoconf-2.63-5.1.el6.noarch.rpm httpd-2.2.15-15.el6.x86_64.rpm httpd-manual-2.2.15-15.el6.noarch.rpm httpd-tools-2.2.15-15.el6.x86_64.rpm httpd-devel-2.2.15-15.el6.i686.rpm httpd-devel-2.2.15-15.el6.x86_64.rpm php-5.3.3-3.el6_1.3.x86_64.rpm mysql-5.1.52-1.el6_0.1.x86_64.rpm mysql-server-5.1.52-1.el6_0.1.x86_64.rpm mysql-connector-java-5.1.12-2.el6.x86_64.rpm php-mysql-5.3.3-3.el6_1.3.x86_64.rpm mod_ssl-2.2.15-15.el6.x86_64.rpm mod_perl-2.0.4-10.el6.x86_64.rpm mod_auth_mysql-3.0.0-11.el6_0.1.x86_64.rpm php-gd-5.3.3-3.el6_1.3.x86_64.rpm php-xml-5.3.3-3.el6_1.3.x86_64.rpm php-ldap-5.3.3-3.el6_1.3.x86_64.rpm php-pear-1.9.4-4.el6.noarch.rpm php-xmlrpc-5.3.3-3.el6_1.3.x86_64.rpm mysql-connector-odbc-5.1.5r1144-7.el6.x86_64.rpm mysql-devel-5.1.52-1.el6_0.1.x86_64.rpm libdbi-dbd-mysql-0.8.3-5.1.el6.x86_64.rpm net-snmp-devel-5.5-37.el6.x86_64.rpm curl-7.19.7-26.el6_1.2.x86_64.rpm unixODBC-devel-2.2.14-11.el6.x86_64.rpm OpenEXR-libs-1.6.1-8.1.el6.x86_64.rpm OpenIPMI-libs-2.0.16-12.el6.x86_64.rpm java-1.5.0-gcj-devel-1.5.0.0-29.1.el6.x86_64.rpm

利用yum工具安装,不同平台软件包的名字略有差别。

二、安装Zabbix-Server

下载zabbix-2.4.4.tar.gz

/project/zabbix/ZABBIX%20Latest%20Stable/2.4.4/zabbix-2.4.4.tar.gz

增加zabbix用户

#groupadd zabbix–g201

#userass–g zabbix-u201-m zabbix

#tar xvf zabbix-2.4.4.tar.gz

#cd zabbix-2.4.4

#./configure--prefix=/usr/local/zabbix--enable-server--enable-agent--with-mysql--with-net-snmp --with-libcurl-enable-proxy

#make

#make install

如果缺少相应的依赖包,configure过程会给出提示,用yum安装确实得软件即可。

三、导入数据库

#cd zabbix-2.4.4

#chkconfig mysqld on

#service mysqld start

#mysqladmin-uroot-password‘root’;修改mysql root用户密码,默认为空

#mysql–uroot–proot

测试数据库连接是否正常,此时应该直接登录数据库了,正常连接,说明用户名跟密码没有问题,连接后正常退出。

Mysql>create database zabbix character set utf8;

(建库zabbix,数据库的字符集utf8)

Mysql>grant all privileges on zabbix.*to zabbix@localhost identified by‘zabbix’;

Mysql>flush privileges;

#mysql–uroot–proot zabbix

#mysql–uroot–proot zabbix

#mysql–uroot–proot zabbix

(/root/zabbix-2.4.4/database目录为zabbix-2.4.4的子目录)

#mkdir/var/log/zabbix_server

#chown zabbix:zabbix/var/log/zabbix_server

四、复制service启动脚本

#cd zabbix-2.4.4

#cp misc/init.d/fedora/core/zabbix_*/etc/init.d/

#chmod755/etc/init.d/zabbix_*

#sed-i“s#BASEDIR=/usr/local#BASEDIR=/usr/#g“/etc/init.d/zabbix_server #sed-i“s#BASEDIR=/usr/local#BASEDIR=/usr/#g“/etc/init.d/zabbix_agentd

五、配置服务端的文件zabbix_server.conf等文件、

1.添加服务端口,添加后如下

#grep zabbix/etc/services

zabbix-agent10050/tcp#Zabbix Agent

zabbix-agent10050/udp#Zabbix Agent

zabbix-trapper10051/tcp#Zabbix Trapper

zabbix-trapper10051/udp#Zabbix Trapper

2.#mkdir-p/etc/zabbix_server

#cp/root/zabbix-2.4.4/conf/zabbix_server.conf/etc/zabbix_server

#cp/root/zabbix-2.4.4/conf/zabbix_agent.conf/etc/zabbix_server

相关文档
最新文档