Sie sind auf Seite 1von 3

InstallOnCentOS 6.x RHEL 6.

x
From Zabbix.org =================================================== 1 For latest changes always check

2 install epel repo 3 Install packages with yum 4 Start next time automatic on boot 5 Start the mysql services now 6 Make mysql secure 7 Configure mysql with user zabbix and database zabbix 8 Import zabbix templates 9 Edit Zabbix_server configuration o 9.1 Adjust php.ini configuration o 9.2 Adjust selinux so that the zabbix server can access port 10051 o 9.3 To allow fping to be used by zabbix u need to create your own selinux rule o 9.4 Start / restart the services o 9.5 don't forget to open your firewall ports on client and serverside!! o 9.6 Don't forget to restart the firewall

For latest changes always check


http://zabbix.usersgroup.be/index.php/topic,7.0.html http://blog.zabbix.com/zabbix-2-0-packages-for-rhel-centos-sl/1893/ Always check README included in the packages

install epel repo


(add any mirror that u like from epel)
yum install http://mirror.iprimus.com.au/epel/6/x86_64/epel-release-68.noarch.rpm

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 chkconfig chkconfig chkconfig httpd on mysqld on zabbix-server on zabbix-agent on

Start the mysql services now


service httpd start service mysqld start

Make mysql secure


/usr/bin/mysql_secure_installation

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) DBHost=localhost DBName=zabbix DBUser=zabbix 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 php_value php_value php_value

post_max_size 16M upload_max_filesize 2M max_input_time 300 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 -A -A -A /etc/sysconfig/iptables INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT INPUT -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT 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

Das könnte Ihnen auch gefallen