Thursday, 5 November 2015

How to Install Zabbix on Red Hat Linux or Cent OS Step by Step



How to Install Zabbix on Red Hat Linux or Cent OS


Zabbix is the fastest growing monitoring tool today in market. Lot oc companies want to cut down the cost on monitoring and move to Opensource and Zabbix has emerged as the prefered choice.

Step 1: Installing repository configuration package


  • Install the repository configuration package. This package contains yum configuration files.


Command:

# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm



Step 2: Installing Zabbix packages

Install Zabbix packages. This example  install Zabbix server and web frontend with mysql database on same server

Command:

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

If you want to install agent only for monitoring follow the below steps

# yum install zabbix-agent



Step 3:Creating initial database

Create zabbix database and user on MySQL. Import initial schema and data.

Command:

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

Edit database configuration in zabbix_server.conf

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

You can give any complex password you want.

Step 4:Start Zabbix server process:

# service zabbix-server start

Step 5:Editing PHP configuration for Zabbix frontend

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

# vi /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
It's necessary to uncomment the “date.timezone” setting and set the right timezone for your location.

After changing the configuration file restart the apache web server.

# service httpd restart

Step 6: Done Your server is ready


  • Zabbix frontend is available at http://ipddress/zabbix in the browser. 


Default username/password is Admin/zabbix.


Enjoy!