Zabbix server on Ubuntu 18.04

Get network interface up and running

sudo nano /etc/netplan/01-netcfg.yaml
sudo netplan apply

Zabbix repository

sudo dpkg -i zabbix-release_3.4-1+bionic_all.deb
sudo dpkg -i zabbix-release_3.5-1+bionic_all.deb

Required software

sudo apt update && sudo apt-get upgrade
sudo apt install apache2 mysql-server
sudo apt install php php7.2-cli php7.2-mysql php7.2-common php7.2-curl php7.2-json php7.2-cgi libapache2-mod-php7.2 php7.2
sudo apt install php-gd php-xml php-ldap php-mysql
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent

Set root password
Zabbix DBName=zabbix
Zabbix DBUser=zabbixuser
Zabbix DBPassword=password

sudo mysql -u root -p
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbixuser@localhost identified by 'password';
mysql> quit;

Import the initial schema

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

Change Timezone

sudo nano /etc/zabbix/apache.conf
php_value date.timezone Asia/Singapore

Change Timezone in php

sudo nano /etc/php/PHP_VERSION/apache2/php.ini

date.timezone = 'Asia/Singapore'

Change zabbix config

sudo nano /etc/zabbix/zabbix_server.conf



Restart required services to browse to http://localhost/zabbix/ (default id/password: Admin/zabbix)

sudo systemctl enable zabbix-server zabbix-agent apache2

Auto start zabbix after reboot

sudo systemctl enable zabbix-server zabbix-agent apache2



Check installed
sudo apt list --installed

Main Repos
deb bionic main universe 
deb-src bionic main universe

Update Repos
deb bionic-security main universe
deb bionic-updates main universe
deb-src bionic-security main universe
deb-src bionic-updates main universe

sudo apt-get clean 
sudo dpkg --configure -a 
sudo apt-get -f install 
sudo apt-get update

#Remove all custom repositories
sudo rm /etc/apt/sources.list.d/*

# Restart
sudo service zabbix-server restart
sudo service apache2 restart

Timezone change

sudo dpkg-reconfigure tzdata

Change time in frontend

sudo nano /etc/apache2/conf-enabled/zabbix.conf

<IfModule mod_php5.c>
    php_value max_execution_time 300
    php_value date.timezone Asia/Singapore


For Server: TCP Port: 10051
For Agent: TCP Port: 10050

Leave a Comment

Your email address will not be published. Required fields are marked *