X

How To Install Zabbix 5.0 On Ubuntu 20.04 Server

In this tutorial how to install zabbix 5.0 on your ubuntu 20.04 server. Zabbix is an open source network monitoring tools. Zabbix support are many operating system like ubuntu, centos, debian or fedora etc.

How To Install CloudStack Management Server v4.14 On Ubuntu 18.04

Private Cloud Setup Step By Step Using Apache Cloud Stack

My server info :
Server IP : 10.66.10.15
Disk: 25 GB
RAM: 1GB
vCPU: 2
Operating System: Ubuntu 20.04
Web Server: Apache
Database: Mysql 8 or MariaDB
PHP: 7.2 Must

Step #01: Must be server update and upgrade then change host name.

Zabbix-Srv:~# apt update && apt upgrade -y
Zabbix-Srv:~# apt autoremove -y
Zabbix-Srv:~# cat /etc/hosts
127.0.0.1 localhost
10.66.10.15 Zabbix-Srv.technologyrss.local Zabbix-Srv

See hostname file like as below.

Zabbix-Srv:~# cat /etc/hostname
Zabbix-Srv

Must be change preserve_hostname: false to preserve_hostname: true
Then reboot your server.

Zabbix-Srv:~# reboot

Step #02: Download zabbix 5.0 file then install.

Zabbix-Srv:~# wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb
Zabbix-Srv:~# dpkg -i zabbix-release_5.0-1+focal_all.deb
Zabbix-Srv:~# apt update

Step #03: Setup php repo and install php7.2.

Zabbix-Srv:~# add-apt-repository -y ppa:ondrej/php
Zabbix-Srv:~# apt-get update
Zabbix-Srv:~# apt-get install -y php7.2 php7.2-cli php7.2-common php7.2-curl php7.2-gd php7.2-json php7.2-mbstring php7.2-intl php7.2-mysql php7.2-xml php7.2-zip php7.2-bcmath

Now install zabbix main package and mysql server 8. When I create video then using MariaDB but this web guide is using mysql 8 latest version. So if you want use any database for zabbix.

Zabbix-Srv:~# apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent mysql-server

Edit time zone from php.ini file.

Zabbix-Srv:~# vi /etc/php/7.2/apache2/php.ini

Like as below:

date.timezone=Asia/Dhaka

Also change from below file.

Zabbix-Srv:~# vi /etc/zabbix/apache.conf

Like as below:

php_value date.timezone Asia/Dhaka

Step #04: Create database and import default database.

Zabbix-Srv:~# mysql -uroot -p

Then run below command for MariaDB

MariaDB [(none)]> create database zabbix_db character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on zabbix_db.* to 'zabbix_user'@'localhost' identified by 'passw0rd@123';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit

Below command for mysql 8

Mysql > create user 'zabbix_user'@'localhost' identified by 'zabbix_user123';
Mysql > grant all privileges on zabbix_db.* to 'zabbix_user'@'localhost' with grant option;
Mysql > alter user 'zabbix_user'@'localhost' identified with mysql_native_password BY 'zabbix_user123';
Mysql > flush privileges;
Mysql > exit

Then mysql service restart using below command.

Zabbix-Srv:~# service mysql restart

Import database using zcat command.

Zabbix-Srv:~# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uroot -p zabbix_db    //Mysql default root password is blank

Must be edit zabbix_server.conf file DBName, DBUser and DBPassword.

Zabbix-Srv:~# vi /etc/zabbix/zabbix_server.conf

Insert all below lines into zabbix_server.conf file.

DBName=zabbix_db
DBUser=zabbix_user
DBPassword=passw0rd@123

Finally restart all service and enable.

Zabbix-Srv:~# systemctl restart zabbix-server zabbix-agent apache2
Zabbix-Srv:~# systemctl enable zabbix-server zabbix-agent apache2

You can see zabbix official guide for install any operating system on linux.

Now access web url for installation process.

http://10.66.10.15/zabbix

Step #05: Now frontend install using browser. New welcome page for Zabbix 5.0.

This is welcome page. Click Next step

Step #06: Check of pre-requisites for before installation Zabbix 5.0.

Check pre-requisite all is ok then Click Next step

Step #07: Check configuration database connection.

Configure database connection already created from Step #04 Click Next step

Step #08: You can edit host and Name.

Zabbix server details Click Next step

Step #09: If any missing so now check pre-installation summary.

Pre-installation summary just see this then Click Next step

Step #10: Finally Congratulations! You have successfully installed Zabbix frontend.

Click Finish

Now login and see new look for Zabbix 5.0 version as like below.

If any problem so please see my YouTube video for more details. Don’t for get share any social network.

0 0 votes
Article Rating
Admin: I am system administrator as Windows and Linux platform. I have 4 years skilled from the professional period. I have to configure Linux based system such as an Asterisk VOIP system, Network monitoring tools (ZABBIX), Virtualization (XEN Server), Cloud computing (Apache CloudStack) etc. Now share my professional skill each interested person. Thanks to all.
Leave a Comment