Zabbix 2.4 installation on Centos 6.5

From vpsget wiki
Revision as of 13:07, 2 June 2015 by Max (talk | contribs)
Jump to: navigation, search

Firstly add zabbix repository :

rpm -ihv

Update OS:

yum  update

Install Zabbix packages on zabbix server:

yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent 

Install MySQL:

yum install mysql-server

Restart service MySQL:

service mysqld restart

Configure MySQL:


- Enter current password for root (enter for none): - Set root password? [Y/n] < Y>
- Remove anonymous users? [Y/n] < Y>
- Disallow root login remotely? [Y/n] < n>
- Remove test database and access to it? [Y/n] <n>
- Reload privilege tables now? [Y/n] < Y>

Create database zabbix and user in MySQL:

mysql -uroot -p
mysql> create database zabbix character set utf8;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> flush privileges;
mysql> exit

Import data:

cd /usr/share/doc/zabbix-server-mysql*/create
mysql -uroot -prootpass zabbix < schema.sql
mysql -uroot -prootpass zabbix < images.sql
mysql -uroot -prootpass zabbix < data.sql

Edit database:

nano /etc/zabbix/zabbix_server.conf

Uncomment end edit next:


Restart zabbix:

service zabbix-server restart

Edit Apache:

nano /etc/httpd/conf.d/zabbix.conf

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

Uncomment php_value date.timezone Europe/Riga and change on your time zone. Restart Apache

service httpd restart

Turn on auto booting:

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

Edit firewall:

iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 10051 -j ACCEPT
service iptables save
service iptables restart

Open Zabbix GUI on you browser and finish installation http://yourdomain/zabbix. Also you need to install zabbix-agent on your node:

yum install zabbix-agent

After this open:

nano /etc/zabbix/zabbix_agentd.conf

And insert:   # IP-address or DNS of your zabbix-server
Hostname=Zabbix server            # Host name must be similar with Configuration -> Hosts in GUI

Add autostarting and start the agent:

chkconfig zabbix-agent on
service zabbix-agent start

Now you need to add this node in zabbix GUI. How to do this, you can see in official zabbix documentation: