CentOS 7
Sponsored Link

Zabbix 2.4 : Install
2015/06/15
 
Install Zabbix 2.4 which is an enterprise open source monitoring system.
It's possible to monitor not only Linux but Windows, Solaris, IBM AIX and others.
[1]
[2]
[3]
[4] Install some other required packages and Zabbix repository.
[[email protected] ~]#
yum -y install php-mysql php-gd php-xml php-bcmath

[[email protected] ~]#
yum -y install http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm
[5] Install Zabbix server.
Install Zabbix Agent to monitor Zabbix server itself, too.
Furthermore, Zabbix 2.4 server fail to start with trousers 3.11 package on CentOS 7.1, so Update it to trousers 3.13 package which is provided from CentOS 6.6.
[[email protected] ~]#
yum -y install zabbix-get zabbix-server-mysql zabbix-web-mysql zabbix-agent

[[email protected] ~]#
yum -y update http://ftp.jaist.ac.jp/pub/Linux/CentOS/6/os/x86_64/Packages/trousers-0.3.13-2.el6.x86_64.rpm

[6] Create a database for Zabbix.
[[email protected] ~]#
mysql -u root -p

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 11
Server version: 5.5.41-MariaDB MariaDB Server

Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
create database zabbix;

Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on zabbix.* to [email protected]'localhost' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on zabbix.* to [email protected]'%' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
flush privileges;

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
exit

Bye
[[email protected] ~]#
cd /usr/share/doc/zabbix-server-mysql-*/create

[[email protected] create]#
mysql -u root -p zabbix < schema.sql

Enter password:
[[email protected] create]#
mysql -u root -p zabbix < images.sql

Enter password:
[[email protected] create]#
mysql -u root -p zabbix < data.sql

Enter password:
[7] Configure and start Zabbix server.
[[email protected] ~]#
vi /etc/zabbix/zabbix_server.conf
# line 73: add

DBHost=localhost
# line 107: add DB password for Zabbix

DBPassword=password
[[email protected] ~]#
systemctl start zabbix-server

[[email protected] ~]#
systemctl enable zabbix-server

[8] Configure and start Zabbix Agent to monitor Zabbix server itself.
[[email protected] ~]#
vi /etc/zabbix/zabbix_agentd.conf
# line 85: specify Zabbix server

Server=
127.0.0.1
# line 126: specify Zabbix server

ServerActive=
127.0.0.1
# line 137: change to the own hostname

Hostname=
dlp.srv.world
[[email protected] ~]#
systemctl start zabbix-agent

[[email protected] ~]#
systemctl enable zabbix-agent

[9] Change httpd settings like follows.
[[email protected] ~]#
vi /etc/httpd/conf.d/zabbix.conf
# line 10: add access permittion for Zabbix frontend

#
Require all granted
Require ip 127.0.0.1 10.0.0.0/24
# line 18: uncomment and change to your timezone

php_value date.timezone
Europe/Stockholm
[[email protected] ~]#
systemctl restart httpd