How To Install Zabbix 5.0 On Ubuntu 18.04: Step #01

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

Sysadmin/GilbertoRibeiro

How To Install Zabbix 5.0 On


Ubuntu 18.04 6 min read
BY ADMIN · PUBLISHED APRIL 29, 2020 · UPDATED MAY 20, 2020
Sharing is caring!

 Share0
 Tweet0
 Pin0
 LinkedIn
0SHARES

Great news! Zabbix already release two beta version. Now I want to share
how to install zabbix 5.0 on Ubuntu 18.04. Zabbix 5.0 is is new look for
dashboard and other settings is same as old.

★ How To Multiple Databases Replication On Ubuntu 16.04


★ How To Install OsTicket v1.14 On Centos 7 With Apache
My serve info :

 Server IP : 10.66.10.6
 Disk : 25 GB
 RAM : 1GB
 vCPU : 2
 Web Server : Apache
 Database : MariaDB
 PHP : 7.2 Must be for Zabbix 5.0

Step #01: For ready update and


upgrade and change host name.
root@ubuntu-1804:~# apt update
root@ubuntu-1804:~# apt upgrade -y
root@ubuntu-1804:~# apt autoremove -y

Change hostname

root@ubuntu-1804:~# vi /etc/hosts
10.66.10.6 Zabbix-Srv
root@ubuntu-1804:~# vi /etc/hostname
Zabbix-Srv
root@ubuntu-1804:~# vi /etc/cloud/cloud.cfg
preserve_hostname: true
root@ubuntu-1804:~# reboot

N.B: Must be preserve_hostname: true otherwise not save server host name


for ubuntu 18.04.

Step #02: Install php package and


Zabbix 5.0
root@Zabbix-Srv:~# wget https://repo.zabbix.com/zabbix/4.5/ubuntu/pool/main/z/zabbix-
release/zabbix-release_4.5-1+bionic_all.deb
root@Zabbix-Srv:~# dpkg -i zabbix-release_4.5-1+bionic_all.deb
root@Zabbix-Srv:~# apt update
root@Zabbix-Srv:~# add-apt-repository -y ppa:ondrej/php
root@Zabbix-Srv:~# apt-get update
root@Zabbix-Srv:~# apt-get install 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 -y
root@Zabbix-Srv:~# apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-
conf zabbix-agent -y

Edit date and time zone from /etc/php/7.2/apache2/php.ini

root@Zabbix-Srv:~# vi /etc/php/7.2/apache2/php.ini
Comment out and change to date.timezone=Asia/Dhaka
root@Zabbix-Srv:~# vi /etc/zabbix/apache.conf
Comment out and change to php_value date.timezone Asia/Dhaka
Step #03: Create database and
import database into created
database.
root@Zabbix-Srv:~# mysql -uroot -p
By default mysql root password is blank. after login mysql terminal then create
database with user password.

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
root@Zabbix-Srv:~# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql
-uroot -p zabbix_db

Check Zabbix server config file for database name, database password  and
database user are included.

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

DBName=zabbix_db

DBUser=zabbix_user

DBPassword=passw0rd@123

Now restart all service using below command.

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


root@Zabbix-Srv:~# systemctl enable zabbix-server zabbix-agent apache2
Browse server ip address using any browser. This is default user name and
password for Zabbix server.

Server URL : http://10.66.10.6/zabbix


User Name : Admin [Must be use ‘A’]
Password : zabbix

Step #04: Now frontend install


using browser. New welcome page
for Zabbix 5.0.
This is welcome page. Click Next step

Step #05:  Check of pre-requisites


for before installation Zabbix 5.0.

Check pre-requisite all is ok then Click Next step

Step #06: Check configuration


database connection.
Configure database connection already created from Step #03 Click Next step

Step #07: You can edit host and


Name.
Zabbix server details Click Next step

Step #08: If any missing so now


check pre-installation summary.
Pre-installation summary just see this then Click Next step

Step #09: 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.
 

 Author
 

 Recent Posts

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.

0
Article Rating

We really appreciate for your support for


buying me a
How To Install Zabbix Server On
Ubuntu 19.04
 My Zabbix Server IP address is : 10.66.50.20
 Zabbix Server Default User Name : Admin
 Zabbix Server Default Password : zabbix
Remember it user name Admin is ‘A’ must be capital

Step #01: Must be server update and upgrade


root@Zabbix-Server:~# apt update && apt upgrade -y
After complete this operation then server reboot needed.

root@Zabbix-Server:~# reboot
Apache web server install using command. It’s popular web server on the
world.

root@Zabbix-Server:~# apt install apache2 -y


Now Service apache start

root@Zabbix-Server:~# service apache2 start


Step #02: Downlaod Zabbix latest repo from below link.

root@Zabbix-Server:~# wget http://repo.zabbix.com/zabbix/4.2/ubuntu/pool/main/z/zabbix-


release/zabbix-release_4.2-1%2Bbionic_all.deb

After download then run below command for extract

root@Zabbix-Server:~#  dpkg -i zabbix-release_4.2-1+bionic_all.deb


Run update command for latest update.

root@Zabbix-Server:~# apt update
Then install zabbix main package using below command.

root@@Zabbix-Server:~# apt install zabbix-server-mysql zabbix-frontend-php

Step #03: Create database and user for store all data. I am using mysql database.
You can using another database.
root@Zabbix-Server:~# mysql -u root -p
If you using mysql user password then type root password otherwise press
Enter.

MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by
'passw0rd';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> cd database/mysql
-> mysql -uzabbix -ppassw0rd zabbix < schema.sql
-> mysql -uzabbix -ppassw0rd zabbix < images.sql
-> mysql -uzabbix -ppassw0rd zabbix < data.sql
-> \q

Step #04: Now goto below location for import Zabbix default database.
root@Zabbix-Server:~# cd /usr/share/doc/zabbix-server-mysql/
Then run below command

root@Zabbix-Server:/usr/share/doc/zabbix-server-mysql/# zcat create.sql.gz |
mysql -uroot zabbix -p
Zabbix server config file must be insert below lines.

root@Zabbix-Server:~# vi /etc/zabbix/zabbix_server.conf

DBName=zabbix

DBUser=zabbix

DBPassword=passw0rd

Save it Esc. :wq

Step #05: Edit php date time zone. Open php file then enter your location time
zone.
root@Zabbix-Server:~# vi /etc/php/7.2/apache2/php.ini
My time zone Asia/Dhaka

Now restart zabbix and apache service using below command.


root@Zabbix-Server:~# service apache2 restart
root@Zabbix-Server:~# service zabbix-server start

Finally browser your server ip address like as bwlow.

http://10.66.50.20/zabbix/

You might also like