See for the official Zabbix site.

InstallOnCentOS 6.x RHEL 6.x

Jump to: navigation, search

For latest changes always check

install epel repo

(add any mirror that u like from epel)

yum install
  • This guide will also work in Centos5/rhel5 when adding Epel5

Install packages with yum

yum install zabbix20-server zabbix20-agent zabbix20-web-mysql nmap httpd policycoreutils-python net-snmp net-snmp-utils
yum groupinstall "MySQL Database Client" "MySQL Database Server"
  • php-mysql is depended on the frontend you chose for example if u install zabbix20-web-pgsql php-pgsql will be installed same goes for mysql

Start next time automatic on boot

chkconfig httpd on
chkconfig mysqld on
chkconfig zabbix-server on
chkconfig zabbix-agent on

Start the mysql services now

service httpd start
service mysqld start

Make mysql secure


Configure mysql with user zabbix and database zabbix

mysql -uroot -p
mysql> create database zabbix character set utf8; (create db with name zabbix)
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'your_password'; (create user zabbix, set your own password)
mysql> exit

Import zabbix templates

mysql -uzabbix -p zabbix < /usr/share/zabbix-mysql/schema.sql
mysql -uzabbix -p zabbix < /usr/share/zabbix-mysql/images.sql
mysql -uzabbix -p zabbix < /usr/share/zabbix-mysql/data.sql

Edit Zabbix_server configuration

vi /etc/zabbix/zabbix_server.conf (change dbname and user with your own settings)
DBPassword=(your zabbix password)

Adjust php.ini configuration

vi /etc/php.ini

php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value date.timezone Europe/Brussels

Adjust selinux so that the zabbix server can access port 10051

semanage port -a -t http_port_t -p tcp 10051

To allow fping to be used by zabbix u need to create your own selinux rule

(u can only do this when u add some item with fping. Selinux needs to block it first )

grep fping /var/log/audit/audit.log | audit2allow -M zabbix_fping
semodule -i zabbix_fping.pp

Start / restart the services

service httpd restart
service zabbix-server start
service zabbix-agent start

Your zabbix installation is ready

don't forget to open your firewall ports on client and serverside!!

10051 for trapper
10050 for client
80 for httpd

This can be done easy by adding these lines in iptables

vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10051 -j ACCEPT

Don't forget to restart the firewall

service iptables restart

go to http://your_ip/zabbix

Send comments & idea's to patrik<at>