Installing Zabbix 5.4 on Ubuntu Server 20.04
Installing Zabbix 5.4 on Ubuntu Server 20.04
Introduction
Zabbix is an Open Source monitoring solution similar to Nagios. In this post we will cover basic installation on Ubuntu Server 20.04 LTS. The steps listed here assume you have an Ubuntu Server 20.04 LTS installed and running.
Installation of Zabbix
First step is to add the Zabbix repository to your server.
$ wget https://repo.zabbix.com/zabbix/5.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.4-1+ubuntu20.04_all.deb
Now lets install the downloaded package.
$ sudo dpkg -i zabbix-release_5.4-1+ubuntu20.04_all.deb
Run apt update to update the repository
$ sudo apt update
If you have not installed mysql or NGINX you must do this before continuing.
# sudo apt install mysql-server nginx
Configure MySQL
Set basic security
# sudo mysql_secure_installation
MySQL is not installed and running.
# sudo systemctl status mysql.service
Next, install Zabbix server, front end, agent # sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent
Create initial database
Run the following on your database host. # mysql -uroot -p mysql> create database zabbix character set utf8 collate utf8_bin; mysql> create user zabbix@localhost identified by 'mypasword'; mysql> grant all privileges on zabbix.* to zabbix@localhost; mysql> quit;
On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.
# sudo zcat /usr/share/doc/zabbix-sql-scripts/mysql/create.sql.gz | mysql -uzabbix -p zabbix
Configure the database
Edit file /etc/zabbix/zabbix_server.conf. Find DBPassword and uncomment and add password.
DBPassword=password
Configure PHP
Next step is to configure the PHP server
Edit file /etc/zabbix/nginx.conf, uncomment and set ‘listen’ and ‘server_name’ directives.
# listen 80;
# server_name example.com;
Start Zabbix server and agent processes and make it start at system boot.
# sudo systemctl restart zabbix-server zabbix-agent nginx php7.4-fpm # sudo systemctl enable zabbix-server zabbix-agent nginx php7.4-fpm
Configure the frontend
Make sure the firewall is set to allow access to NGINX
We want to allow normal port 80 and 443 communication so we will use Nginx Full
# sudo ufw allow 'Nginx Full'
Check the status
# ufw status
We are now good to go. Connect to your newly installed frontend at http://server_ip_or_name using a browser.
Click Next step.
Review that all of the Prerequisites are good and click Next Step
Next we need to configure in the database credential
Enter in the server details
Set GUI Settings
The pre-installation screen will display
Installation is finished
Zabbix frontend is ready! The default user name is Admin, password zabbix.
Login and you will be presented with the Zabbix Dashboard.
Conclusion
Next step is to configure agents and start monitoring
Leave a Reply