How to Install Zabix Server on Ubuntu 20.04.
Zabbix is a free and open-source monitoring resolution designed for real-time monitoring of servers, digital machines, networks, and cloud providers. It was developed by Alexei Vladishev and actively supported by Zabbix SIA. It’s primarily based on the client-server mannequin and able to monitoring hundreds of thousands of metrics, corresponding to CPU load, community utilization and disk area consumption from tens of hundreds of servers.
On this tutorial, we’ll clarify tips on how to set up Zabbix server on Ubuntu 20.04 LTS system.
We assume you’ve a working Ubuntu 20.04 system with sudo privileged account entry. Comply with the under steps to put in Zabbix server in your Ubuntu system.
Step 1 – Setup LAMP
Zabbix required PHP programming language to run, MySQL as database server and a Internet server like Apache or Nginx. We use Apache net server for this tutorial. Let’s have the set up of all of the required packages in your system by working the next instructions.
sudo apt replace
sudo apt set up apache2 libapache2-mod-php
sudo apt set up mysql-server
sudo apt set up php php-mbstring php-gd php-xml php-bcmath php-ldap php-mysql
Subsequent, you’ll want to set a robust password for the MySQL root consumer. Execute the under command and observe the directions. After finishing under command, you should have a password for the basis account of MySQL database server.
You replace the PHP configuration variables. Edit the PHP configuration file /and so on/php/7.4/apache2/php.ini for Apache and replace timezone as per your necessities.
vim /and so on/php/7.4/apache2/php.ini
date.timezone = ‘Asia/Kolkata’
Step 2 – Configure Zabbix Repository
Zabbix offical workforce supplies Apt bundle repositories for the Debian primarily based system. Use the next instructions so as to add the repository in your Ubuntu system.
sudo dpkg -i zabbix-release_5.0-1+focal_all.deb
Step 3 – Putting in Zabbix Server
When you added the Apt repository, use the next instructions to put in Zabbix server packages. Right here zabbix-server-mysql bundle consists of Zabbix server with MySQL assist. The zabbix-frontend-php bundle supplies the net interface for Zabbix server.
sudo apt replace
sudo apt set up zabbix-server-mysql zabbix-frontend-php zabbix-agent zabbix-apache-conf
Step 4 – Create Zabbix Database and Person
Subsequent, create a database schema for the Zabbix server. Login to the MySQL server with the basis account and create MySQL database and consumer with the next instructions.
mysql -u root -p
CREATE DATABASE zabbixdb character set utf8 collate utf8_bin;
CREATE USER ‘zabbix’@’localhost’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON zabbixdb.* TO ‘zabbix’@’localhost’ WITH GRANT OPTION;
After creating the database, load the default schema of Zabbix of database.
zcat create.sql.gz | mysql -u zabbix -p zabbixdb
Step 5 – Replace Zabbix Configuration
Edit Zabbix server configuration file /and so on/zabbix/zabbix_server.conf in your favourite textual content editor and replace the next database configurations. This might be utilized by Zabbix server to hook up with the database.
sudo vi /and so on/zabbix/zabbix_server.conf
Now, allow the Zabbix serivce to begin on system boot and restart service to reload new settings.
sudo systemctl allow zabbix-server
sudo systemctl restart zabbix-server
The Zabbix packages additionally creates its personal Apache configuration file ie /and so on/zabbix/apache.conf and make a hyperlink to Apache configuration listing. Let’s use the next command to restart Apache service.
sudo systemctl restart apache2
Now your system is prepared for the Zabbix set up. Simply go to the Zabbix net installer and end the set up.
Step 6 – Alter Firewall for Zabbix
Subsequent, you will have to permit the Zabbix ports 10050 and 10051. and HTTP service by means of firewalld. You’ll be able to permit them with the next command:
sudo firewall-cmd –permanent –add-service=http
sudo firewall-cmd –permanent –add-port=10050/tcp
sudo firewall-cmd –permanent –add-port=10051/tcp
Now, reload the firewalld service to implement the adjustments:
sudo firewall-cmd –reload
Step 7 – Operating Zabbix Internet Installer
Zabbix net installer might be accessed on /zabbix subdirectory URL in your servers IP or area. For instance, host.tecadmin.internet is pointed to my Zabbix server. Now entry the Zabbix utilizing the next URL. You need to change FQDN as per your setup.
And observe the steps as per given screenshots under.
Now, open your favourite net browser and sort the URL http://your-server-ip/zabbix. You’ll be redirected to the Zabbix net set up wizard within the following display:
Click on on the Subsequent step button. You need to see the next web page:
Be sure that all the necessities are fulfulls by the server. Then click on on the Subsequent step button. You need to see the next web page:
Present your database credentials created in above steps and click on on the Subsequent step button. You need to see the next web page:
Present your Zabbix server particulars and click on on the Subsequent step button. You need to see the next web page:
Be sure that all of the configuration parameters are appropriate then click on on the Subsequent step button. As soon as the set up has been accomplished efficiently, it’s best to see the next web page:
Click on on the End button. You’ll be redirected to the Zabbix login web page as proven under:
Use under credentials to login:
After profitable loign, you will note the Zabbix dashbaord as under screenshot.
Congratulations! you’ve efficiently put in the Zabbix server on Ubuntu 20.04 LTS system. Now you can begin exploring the Zabbix dashboard for extra particulars and add the consumer for monitoring.