Zabbix 2.4 installation on Centos 6.5

From vpsget wiki
Revision as of 12:47, 2 June 2015 by Max (talk | contribs) (Created page with "Firstly add zabbix repository : rpm -ihv http://repo.zabbix.com/zabbix/2.4/rhel/6/i386/zabbix-release-2.4-1.el6.noarch.rpm Update OS: yum update Install Zabbix packages on ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Firstly add zabbix repository :

rpm -ihv http://repo.zabbix.com/zabbix/2.4/rhel/6/i386/zabbix-release-2.4-1.el6.noarch.rpm

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:

mysql_secure_installation

- 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:

DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix

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. http://yourdomain/zabbix