How to Install Zabbix 2.2 Server on CentOS 6.5

ZABBIX is an enterprise-class open source monitoring solution designed to monitor servers and various network services. Zabbix will perform simple checks can verify the availability and responsiveness of standard services. It was created by Alexei Vladishev. Follow this step to install zabbix 2.2 server on CentOS 6.5 :

1. Install httpd, php and MySQL :

[root@oss ~]# yum install php php-cli php-common php-devel php-pear php-gd php-mbstring php-mysql php-xml httpd httpd-devel mysql mysql-server -y

2. Zabbix package files are available at repo.zabbix.com :

[root@oss ~]# wget http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
--2014-08-12 22:19:07--  http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
Resolving repo.zabbix.com... 87.110.183.174
Connecting to repo.zabbix.com|87.110.183.174|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11256 (11K) [application/x-redhat-package-manager]
Saving to: âzabbix-release-2.2-1.el6.noarch.rpmâ

100%[==========================================================>] 11,256      7.09K/s   in 1.6s

2014-08-12 22:19:09 (7.09 KB/s) - âzabbix-release-2.2-1.el6.noarch.rpmâ
[root@oss ~]# ls
anaconda-ks.cfg  install.log  install.log.syslog  zabbix-release-2.2-1.el6.noarch.rpm
[root@oss ~]# rpm -Uvh zabbix-release-2.2-1.el6.noarch.rpm
warning: zabbix-release-2.2-1.el6.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEY
Preparing...                ########################################### [100%]
   1:zabbix-release         ########################################### [100%]

3. Install Zabbix server :

[root@oss ~]# yum install zabbix-agent zabbix-web-mysql zabbix-server-mysql zabbix-java-gateway -y

4. Editing PHP configuration for Zabbix frontend

See also  Download CentOS 6.5 x86_64 and x86 ISO

Apache configuration file for Zabbix frontend is located in /etc/httpd/conf.d/zabbix.conf. Some PHP settings are already configured.

    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 Asia/Kuala_Lumpur

5. Restart zabbix and make zabbix start at boot :

[root@oss ~]# service zabbix-server start
Starting Zabbix server:                                    [  OK  ]
[root@oss ~]# chkconfig zabbix-server on

6. Setup Zabbix database :

mysql> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit

7. Import initial schema and data :

[root@oss ~]# cd /usr/share/doc/zabbix-server-mysql-2.2.5/create

[root@oss create]# mysql -u zabbix -p zabbix < schema.sql
Enter password:
[root@oss create]# mysql -u zabbix -p zabbix < images.sql
Enter password:
[root@oss create]# mysql -u zabbix -p zabbix < data.sql
Enter password:

8. Start zabbix installation wizard :

See also  How to Upgrade Zimbra Collaboration Suite 8.0.5 to 8.0.6 on CentOS 6.5 x86_64

http://192.168.0.8/zabbix/setup.php
setup zabbix-1

setup zabbix-2

setup zabbix-3

setup zabbix-4

setup zabbix-5

setup zabbix-6

9. If the configuration file is not writable, manually edit database configuration in zabbix_server.conf as below :

# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=password

10. Open required port at iptables :

[root@oss ~]# netstat -plunt | grep LISTEN
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1124/sshd
tcp        0      0 0.0.0.0:10051               0.0.0.0:*                   LISTEN      4190/zabbix_server
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      4074/mysqld
tcp        0      0 :::80                       :::*                        LISTEN      1417/httpd
tcp        0      0 :::22                       :::*                        LISTEN      1124/sshd
tcp        0      0 :::10051                    :::*                        LISTEN      4190/zabbix_server
[root@oss ~]# vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-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 10051 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

Restart iptables :

[root@oss ~]# service iptables restart

11. Zabbix frontend is available at http://IP-address/zabbix in the browser.

See also  How to Secure MySQL Database Server on CentOS

The default username/password is Admin/zabbix.

setup zabbix-7

Zabbix server setup completed. You can start to setup zabbix agent now.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *