How to install Zabbix on CentOS 6.8 and Ubuntu 12.04

Zabbix is an enterprise-grade open-source monitoring solution for networks, servers, and applications. This guide covers installing the Zabbix server and agent on CentOS 6.8 and Ubuntu 12.04.

Installing Zabbix on CentOS 6.8

Step 1: Add the Zabbix repository

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

Step 2: Install Zabbix server, frontend, and agent

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

Step 3: Create the database

mysql -u root -p

In the MySQL shell:

CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'your_password';
FLUSH PRIVILEGES;
EXIT;

Step 4: Import the initial schema

zcat /usr/share/doc/zabbix-server-mysql-*/create.sql.gz | mysql -u zabbix -p zabbix

Step 5: Configure the Zabbix server

Edit /etc/zabbix/zabbix_server.conf:

DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=your_password

Step 6: Start services

service zabbix-server start
service zabbix-agent start
service httpd start
chkconfig zabbix-server on
chkconfig zabbix-agent on

Installing Zabbix on Ubuntu 12.04

Step 1: Add the Zabbix repository

wget http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_2.4-1+precise_all.deb
dpkg -i zabbix-release_2.4-1+precise_all.deb
apt-get update

Step 2: Install packages

apt-get install zabbix-server-mysql zabbix-frontend-php zabbix-agent

Step 3: Create the database

mysql -u root -p
CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'your_password';
FLUSH PRIVILEGES;
EXIT;

Step 4: Import schema

zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -u zabbix -p zabbix

Step 5: Configure and start

Edit /etc/zabbix/zabbix_server.conf with your DB credentials, then:

service zabbix-server start
service zabbix-agent start

Accessing the web frontend

Navigate to http://your-server-ip/zabbix and complete the setup wizard. Default credentials: Admin / zabbix.

On this page