2 minutes
Setting Zabbix on Ubuntu 18.04
I have recently been making some clean virtual machines on my home server and I am a big fan of Zabbix so here are my notes on getting it up and running.
Get the system ready
As with any installation the first thing to do is make sure the system is up to date, I tend to run the command below which will check for updates, install them and remove anything left over.
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
To use Zabbix we will be using MySQL for the backend and the standard php frontend so we will need to set up a quick LAMP server
sudo apt install lamp-server^
# "secure" MySQL
sudo mysql_secure_installation
# set php timezone
sudo sed -i "s/^;date.timezone =$/date.timezone = \"Europe\/London\"/" /etc/php/7.2/apache2/php.ini
create database and user
mysql -u root -p
create database zabbix;
grant all privileges on zabbix.* to zabbix@'localhost' identified by 'CorrectHorseBatteryStaple';
flush privileges;
Installing Zabbix
Download the deb package
wget https://repo.zabbix.com/zabbix/4.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.0-3+bionic_all.deb
sudo dpkg -i zabbix-release_4.0-3+bionic_all.deb
sudo apt update
Install the server and the front end
sudo apt install zabbix-server-mysql zabbix-frontend-php
Import initial database schema
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
Start Zabbix and turn on auto start
sudo systemctl restart zabbix-server apache2
sudo systemctl enable zabbix-server apache2
Configure Front End
When you first access http://host_or_ip/zabbix
you will be taken through the install steps where you will be asked for the database information. Once this is done you can login with the default username Admin
and password zabbix
The first thing I tend to do is swap the theme to Dark, Head to Administration > General, Now that is done it is time to do what the first change should really be and that is changing the default password for the internal admin account. Click on the user icon on the top right or go to Administration > Users > Admin then click change password
That is it, Now you have Zabbix up and running on Ubuntu 18.04