How to Install and Configure Zabbix on Ubuntu 16.04

Introduction

Prerequisites

Install LAMP Server

sudo apt-get update -y
sudo apt-get install apache2 libapache2-mod-php7.0 php7.0 php7.0-xml php7.0-bcmath php7.0-mbstring -y
sudo apt-get install mariadb-server -y
sudo systemctl start mysql
sudo systemctl enable mysql

Install Zabbix

wget http://repo.zabbix.com/zabbix/3.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.0-2+xenial_all.deb
sudo dpkg -i zabbix-release_3.0-2+xenial_all.deb
sudo apt-get update -y
sudo apt-get install zabbix-server-mysql zabbix-frontend-php -y
sudo apt-get install zabbix-agent -y
sudo systemctl restart zabbix-agent
sudo systemctl enable zabbix-agent

Configure Database for Zabbix

mysql -u root -p
CREATE DATABASE zabbix_db character set utf8 collate utf8_bin;
GRANT ALL PRIVILEGES on zabbix_db.* to zabbix_user@localhost identified by 'zabbix';
MariaDB [(none)]>FLUSH PRIVILEGES;
MariaDB [(none)]>exit;
cd /usr/share/doc/zabbix-server-mysql/
sudo zcat create.sql.gz | mysql -u zabbix_user -p zabbix_db

Configure Zabbix

sudo nano /etc/zabbix/zabbix_server.conf
DBName=zabbix_db
DBUser=zabbix_user
DBPassword=zabbix
sudo nano /etc/zabbix/apache.conf
# php_value date.timezone Europe/Riga
php_value date.timezone Asia/Shanghai
sudo systemctl restart apache2
sudo systemctl restart zabbix-server
sudo systemctl enable apache2
sudo systemctl enable zabbix-server

Access Zabbix Web Interface

Install and Configure Zabbix Client

wget http://repo.zabbix.com/zabbix/3.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.0-2+xenial_all.deb
sudo dpkg -i zabbix-release_3.0-2+xenial_all.deb
sudo apt-get update -y
sudo apt-get install zabbix-agent -y
sudo nano /etc/zabbix/zabbix_agentd.conf
##IP address of Zabbix Server
Server=192.168.0.103
ServerActive=192.168.0.103
Hostname=Zabbix-Client
sudo systemctl restart zabbix-agent
sudo systemctl enable zabbix-agent

Add Zabbix Client Machine to Zabbix Server for Monitoring

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store