Install & configure Zabbix Server in Ubuntu

Platform & Compoenent

Ubuntu Version: 20:04
Zabbix Version: 6.0 LTS
Database: MySQL
Web Server: Apache

Prerequisite

Step 1 – Install Zabbix repository


# sudo -s [ Become a root user ]
# wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-1+ubuntu20.04_all.deb
# dpkg -i zabbix-release_6.0-1+ubuntu20.04_all.deb
# apt update

Step 2 – Install Zabbix server, frontend, agent


# apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent

Step 3 – Create initial database

Make sure you have database server up and running.
Run the following on your database host.


# mysql -uroot -p
password
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@localhost identified by 'DevOpsSchool$123';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> GRANT SUPER ON *.* TO 'zabbix'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit;

On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.


$ ls /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz
$  zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix

# Alternate location
/usr/share/zabbix-sql-scripts/mysql
$ ls /usr/share/zabbix-sql-scripts/mysql/server.sql.gz
$  zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix

Step 4 – Configure the database for Zabbix server

Edit file /etc/zabbix/zabbix_server.conf


DBPassword=DevOpsSchool$123

Step 5 – Start Zabbix server and agent processes

Start Zabbix server and agent processes and make it start at system boot.


# systemctl restart zabbix-server zabbix-agent apache2
# systemctl enable zabbix-server zabbix-agent apache2
# systemctl status zabbix-server zabbix-agent apache2

Step 6 – Configure Zabbix frontend

Connect to your newly installed Zabbix frontend: http://server_ip_or_name/zabbix

Step 7 – Start using Zabbix

This is the Zabbix welcome screen. Enter the user name – “Admin” with password – “zabbix” to log in as a Zabbix superuser. Access to Configuration and Administration menus will be granted.

Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x