Zabbix-server服務端安裝
安裝Zabbix官方源和epel源
rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
安裝Zabbix-Server
yum install -y zabbix zabbix-get zabbix-server zabbix-web-mysql zabbix-web zabbix-agent
安裝MySQL資料路服務
yum install -y mysql-server
修改MySQL配置檔案:
vim /etc/my.cnf
啟動服務
chkconfig mysqld on
service mysqld start
檢視服務是否啟動成功
ps aux |grep mysql
1、建立Zabbix的資料庫
設定MySQL的root使用者密碼
2、導入Zabbix-Server的資料庫
mysql -uzabbix -pzabbix
use zabbix
source /usr/share/doc/zabbix-server-mysql-2.2.8/create/schema.sql;
show tables;
配置zabbix_server.conf
vim /etc/zabbix/zabbix_server.conf
檢視修改後的參數
egrep -v "(^#|^$)" /etc/zabbix/zabbix_server.conf
mkdir /etc/zabbix/alertscripts /etc/zabbix/externalscripts
啟動Zabbix-Server服務
service zabbix-server start
service httpd start
添加開機啟動項
chkconfig zabbix-server on
chkconfig httpd on
防火牆、Selinux及權限的設定
1、防火牆的設定
vim /etc/sysconfig/iptables
service iptables restart
2、關閉Selinux
setenforce 0
getenforce #擷取目前Selinux的運作狀态
或直接關閉Selinux:
vim /etc/selinux/config
SELINUX=disabled (此方法需重新開機伺服器生效)
3、php.ini配置檔案的設定
vim /etc/httpd/conf.d/zabbix.conf
service httpd restart
配置web界面
http://192.168.0.136/zabbix

Zabbix-Agent用戶端安裝
安裝Zabbix官方源
安裝Zabbix-Agent用戶端
yum install -y zabbix zabbix-agent
關閉防火牆
iptables -F
配置zabbix_agentd.conf
egrep -v "(^#|^$)" /etc/zabbix/zabbix_agentd.conf
chkconfig zabbix-agent on
service zabbix-agent start