How to Install Zabbix Server 2.0 on CentOS 6 or CentOS 5

So you probably know this already but RHEL and CentOS are basically the same, as in they have full binary compatibility.  Here’s how you can install a Zabbix Monitoring Server on CentOS 5 or 6 (AKA RHEL 5 or 6). As well as installing the zabbix client side packages.

FIRST!  Setup the yum repo that you will pull the packages from:

Zabbix 2.0 for RHEL5:

  1. rpm -ivh

Zabbix 2.0 for RHEL6:

  1. rpm -ivh

Installing Zabbix packages

You’ll need a web server and database server so we’ll use apache and MySQL.  Here’s how to do a BASIC install of both.  You’ll need additional configuration to get those services up and running.  Maybe someday I’ll write something about that part:

1. yum install httpd

2. yum install mysql-server

  1. yum install zabbix-server-mysql zabbix-web-mysql

Example for installing Zabbix agent only.

  1. yum install zabbix-agent

Creating initial database

Create zabbix database and user on MySQL.

  1. mysql -uroot

mysql> create database zabbix character set utf8; mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ‘zabbix’; mysql> exit Import initial schema and data.

  1. cd /usr/share/doc/zabbix-server-mysql-2.0.4/create
  2. mysql -uroot zabbix < schema.sql
  3. mysql -uroot zabbix < images.sql
  4. mysql -uroot zabbix < data.sql

Starting Zabbix server process

Edit database configuration in zabbix_server.conf

  1. vi /etc/zabbix/zabbix_server.conf


Start Zabbix server process.

  1. service zabbix-server start
  2. chkconfig zabbix-server on

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.

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

  1. php_value date.timezone Europe/Riga

It’s necessary to uncomment the “date.timezone” setting and set the right timezone for you. After changing the configuration file restart the apache web server.

  1. service httpd restart

Zabbix frontend is available at http://zabbix-frontend-hostname/zabbix in the browser. Default username/password is Admin/zabbix.