Zabbix is an ultimate enterprise software designed to track realtime of millions of data collected from tens of thoundsands of servers, virtual servers and network devices
Zabbix is an open source and added for free
I.Preparation
Install LAMP. Reference link here click here
Install configuration package
# rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
II.Proceeding
Install zabbix from package
# yum install -y zabbix-server-mysql zabbix-web-mysql
Creat a zabbix database and user on MySQL.
# mysql -u root -p
mysql> create database zabbix;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
mysql> exit
Enter the database
# cd /usr/share/doc/zabbix-server-mysql-2.2.11/create/
# mysql -u root -p zabbix < schema.sql
Enter password:pass data
# mysql -u root -p zabbix < images.sql
Enter password:pass data
# mysql -u root -p zabbix < data.sql
Enter password:pass data
Edit database configuration in zabbix_server.conf
# nano /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=data password
Start Zabbix server serivice
# service zabbix-server start
PHP apache configuration of zabbix is located at etc/httpd/conf.d/zabbix.conf . The configuration is as follows
# 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
# php_value date.timezone Europe/Riga
Remove '#' in the sentence php_value date.timezone Europe/Riga to setup date.timezone
Restart httpd
# service httpd restart
Now you can visit http://ip-vps/zabbix/ to start installing
By default you login zabbix with username = Admin ,password = zabbix
Install zabbix agent .link. Reference here click here
# yum install zabbix-agent -y
# service zabbix-agent start
Test what port zabbix runs through
[root@nguyenvietduc ~]# netstat -tunpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:10050               0.0.0.0:*                   LISTEN      25725/zabbix_agentd
tcp        0      0 0.0.0.0:10051               0.0.0.0:*                   LISTEN      25404/zabbix_server
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      12987/mysqld
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      2015/sshd
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      2158/master
tcp        0      0 :::10050                    :::*                        LISTEN      25725/zabbix_agentd
tcp        0      0 :::10051                    :::*                        LISTEN      25404/zabbix_server
tcp        0      0 :::80                       :::*                        LISTEN      24755/httpd
tcp        0      0 :::22                       :::*                        LISTEN      2015/sshd
tcp        0      0 ::1:25                      :::*                        LISTEN      2158/master
 
Open the port
# nano /etc/sysconfig/iptables
Add 2 lines
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10051 -j ACCEPT
 
Restart iptables
# service iptables restart
Reference link https://www.zabbix.com/documentation/2.2/manual/installation/install_from_packages