下载zabbix-2.4.3.tar.gz解压
# tar zxvf zabbix-2.4.3.tar.gz
2.数据库准备
启动mysqld服务并进入mysql,创建zabbix库和用户
mysql> create database zabbix default charset utf8;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on zabbix.* to zabbix@'localhost'
-> identified by '123';
mysql> grant all on zabbix.* to zabbix@'127.0.0.1'
-> identified by '123';
导入zabbix基础数据到数据库,注意按顺序导入
# cd /root/zabbix-2.4.3/database/mysql/
# mysql -u zabbix -p123 zabbix < schema.sql
# mysql -u zabbix -p123 zabbix < images.sql
# mysql -u zabbix -p123 zabbix < data.sql
***********************************************************
* Now run 'make install' *
* *
* Thank you for using Zabbix! *
* <http://www.zabbix.com> *
***********************************************************
依赖环境ok
# make && make install
拷贝zabbix web 文件到html目录下并改名
# cp -rf /root/zabbix-2.4.3/frontends/php /var/www/html/
# cd /var/www/html/ && mv php zabbix
# chown zabbix:zabbix /var/www/html/zabbix/
启动服务
# cp /root/zabbix-2.4.3/misc/init.d/fedora/core/zabbix_server /etc/init.d/
# vim /etc/init.d/zabbix_server
BASEDIR=/usr/local/zabbix
# service zabbix_server start
查看启动端口
# lsof -i:10051
添加开机启动
# chkconfig --add zabbix_server
# chkconfig --level zabbix_server on
配置zabbix agent端
# vim /usr/local/zabbix/etc/zabbix_agentd.conf
Server=127.0.0.1 ---填写server端IP,server链接agent获取数据
ServerActive=127.0.0.1 ---填写server端IP,agent主动提交数据
Hostname=Zabbix server ---给agent设定一个名字,默认为Zabbix server
启动服务
#cp /root/zabbix-2.4.3/misc/init.d/fedora/core/zabbix_agentd /etc/init.d/
# vim /etc/init.d/zabbix_agentd
BASEDIR=/usr/local/zabbix
# service zabbix_agentd start
添加开机启动
# chkconfig --add zabbix_agentd
# chkconfig --level zabbix_agentd on