- 2cpu, 4Gmem, 40Gdisk
- Zabbix Server: 200.21.101.14/centos651
- Zabbix Client: 200.21.101.15/centos652
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpmphp
yum install zabbix-get zabbix-server zabbix-server-mysql zabbix-web-mysql mysql-server -ymysql
開啓數據庫服務 service mysqld start chkconfig mysqld on 初始化數據庫設置 mysql_secure_installation
> create database zabbix character set utf8 collate utf8_bin; > grant all privileges on zabbix.* to zabbix[@localhost](http://my.oschina.net/u/570656) identified by 'zabbix_password'; > flush privileges; > exit
cd /usr/share/doc/zabbix-server-mysql-2.4.8/create mysql -uzabbix -pzabbix_password zabbix < schema.sql mysql -uzabbix -pzabbix_password zabbix < images.sql mysql -uzabbix -pzabbix_password zabbix < data.sql
編輯/etc/zabbix/web/zabbix.conf.phplinux
<?php // Zabbix GUI configuration file. global $DB; $DB["TYPE"] = 'MYSQL'; $DB["SERVER"] = 'localhost'; $DB["PORT"] = '0'; $DB["DATABASE"] = 'zabbix'; $DB["USER"] = 'zabbix'; $DB["PASSWORD"] = 'zabbix_password'; // Schema name. Used for IBM DB2 and PostgreSQL. $DB["SCHEMA"] = ''; $ZBX_SERVER = 'localhost'; $ZBX_SERVER_PORT = '10051'; $ZBX_SERVER_NAME = 'Zabbix Server'; $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; ?>
DBHost = localhost DBName = zabbix DBUser = zabbix DBPassword = zabbix_password
service zabbix-server start chkconfig zabbix-server on
sed -i "s/#\ php_value date.timezone\ Europe\/Riga/php_value date.timezone\ Asia\/Shanghai/g" /etc/httpd/conf.d/zabbix.conf
sed -i "s/#ServerName www.example.com:80/ServerName 200.21.101.114/g" /etc/httpd/conf/httpd.conf service httpd start chkconfig httpd on
yum install zabbix-agent -y
sed -i "s/Server=127.0.0.1/Server=200.21.101.114/g" /etc/zabbix/zabbix_agentd.conf sed -i "s/ServerActive=127.0.0.1/ServerActive=200.21.101.114/g" /etc/zabbix/zabbix_agentd.conf sed -i "s/Hostname='Zabbix Server'/Hostname='centos651'/g" /etc/zabbix/zabbix_agentd.conf service zabbix-agent restart chkconfig zabbix-agent on