Learn about Zabbix installation on Ubuntu 20.04 Server with this detailed step-by-step guide. Ensure smooth installation and configuration of this powerful server monitoring tool for your infrastructure. #centlinux #linux #zabbix
Server monitoring software is a type of tool or application designed to monitor the performance, health, and availability of servers and IT infrastructure components. These software solutions continuously collect data from servers, network devices, databases, applications, and other system resources to provide insights into their operation and performance. Key features and functionalities of server monitoring software include:
Server monitoring software plays a crucial role in maintaining the reliability, performance, and security of IT infrastructure, enabling organizations to proactively identify and resolve issues before they impact business operations.
Zabbix Server is a powerful open-source server monitoring solution designed to monitor the performance, health, and availability of IT infrastructure components in real-time. It serves as the central component of the Zabbix monitoring platform, coordinating the collection, processing, and analysis of monitoring data from various sources. Key features and functionalities of Zabbix Server include:
Zabbix Server plays a critical role in maintaining the reliability, performance, and security of IT infrastructure, providing organizations with the visibility and control needed to ensure business continuity and operational efficiency.
Recommended Books: Zabbix 5 IT Infrastructure Monitoring Cookbook (PAID LINK) by Nathan Liefting
Recommended Online Training: Zabbix Application and Network Monitoring
We are using a minimal Ubuntu 20.04 LTS virtual machine with following specifications.
Connect with zabbix-01.centlinux.com as a privileged user by using a ssh client.
Execute apt command to update list of available packages.
$ sudo apt update
In our Ubuntu server, there are 65 packages that can be upgraded. The output may vary on your Ubuntu operating system.
Execute following command at Linux bash prompt to upgrade the listed software packages.
$ sudo apt -y upgrade
Zabbix website provides installation package for various Linux distros. You can install this package to add it’s official repository in Package Management System of your Ubuntu operating system.
Download software package for Zabbix 5.0 repository from their official website.
$ wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb
Use dpkg command to install download package.
$ sudo dpkg -i zabbix-release_5.0-1+focal_all.deb
Update list of available software packages for your Ubuntu operating system by using apt command.
$ sudo apt update
You have successfully added Zabbix official repository in your Linux operating system. Therefore, you can now easily install Zabbix on Ubuntu this software by using apt command.
$ sudo apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent
In this guide, we are using Apache web server and MySQL database server with Zabbix application. Therefore, you are required to have a MySQL database server.
If you do not have a MySQL database server in your network, then you have to install it on zabbix-01.centlinux.com machine.
$ sudo apt install -y mysql-server
After succesfull installation, check the status of MySQL service.
$ sudo systemctl status mysql
MySQL database service is already started.
Configure MySQL database server by using mysql_secure_installation command.
$ sudo mysql_secure_installation Securing the MySQL server deployment. Connecting to MySQL using a blank password. VALIDATE PASSWORD COMPONENT can be used to test passwords and improve security. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD component? Press y|Y for Yes, any other key for No: Y There are three levels of password validation policy: LOW Length >= 8 MEDIUM Length >= 8, numeric, mixed case, and special characters STRONG Length >= 8, numeric, mixed case, special characters and dictionary file Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2 Please set the password for root here. New password: Re-enter new password: Estimated strength of the password: 100 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : Y By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y Success. Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y Success. By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y - Dropping test database... Success. - Removing privileges on test database... Success. Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y Success. All done!
Connect to MySQL database server by using mysql command.
$ sudo mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 15 Server version: 8.0.23-0ubuntu0.20.04.1 (Ubuntu) Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
Create ‘zabbix’ database to be used by your monitoring server.
mysql> create database zabbix character set utf8 collate utf8_bin; Query OK, 1 row affected, 2 warnings (0.01 sec)
Create a database user ‘zabbix’ and set a strong password.
mysql> create user zabbix@localhost identified by 'P@ssw0rd'; Query OK, 0 rows affected (0.01 sec)
Grant all privileged on zabbix database to zabbix user.
mysql> grant all privileges on zabbix.* to zabbix@localhost; Query OK, 0 rows affected (0.00 sec) mysql> quit; Bye
Zabbix server documentation provides a SQL script to create it’s repository in MySQL database.
You can run this SQL script as follows.
$ zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -u zabbix -p zabbix Enter password:
Edit Zabbix server configuration file in nano text editor.
$ sudo nano /etc/zabbix/zabbix_server.conf
And set the zabbix database user’s password in this file.
DBPassword=P@ssw0rd
Edit Apache configuration file in nano text editor.
$ sudo nano /etc/zabbix/apache.conf
Uncomment and set your respective Time Zone. There are multiple occurrences of this directive, you should set each of them.
php_value date.timezone America/Santiago
Restart and Enable Zabbix Server, Agent and Apache services.
$ sudo systemctl restart zabbix-server zabbix-agent apache2 $ sudo systemctl enable zabbix-server zabbix-agent apache2 Synchronizing state of zabbix-server.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable zabbix-server Synchronizing state of zabbix-agent.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable zabbix-agent Synchronizing state of apache2.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable apache2 Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-server.service → /lib/systemd/system/zabbix-server.service.
Allow Apache service in Ubuntu Firewall by executing ufw command.
$ sudo ufw allow apache Rules updated Rules updated (v6)
Open URL http://zabbix-01.centlinux.com/zabbix/ in a web browser.
If you have performed the installation as described above, then you will see this welcome page of Zabbix web setup.
Click on ‘Next Step’.
If you have performed the configurations correctly, then you will get the ‘OK’ status for all the Zabbix perquisites.
Move on to ‘Next Step’.
Provide the connection details of your MySQL server, including database and user credentials.
Click on ‘Next Step’.
Enter the hostname/IP address and port number of the Linux server. You are required to provide the name of the installation (optional).
Continue to ‘Next Step’.
Web setup will display the configurations, that you have made so far.
Click on ‘Next Step’ if you are happy with them, otherwise go back and adjust them as per your requirement.
Configuration file has been created and the installation of Zabbix frontend completed successfully.
Login as default Zabbix user/password i.e. admin/zabbix.
After successful login, you will reach at the Zabbix dashboard.
Read Also: Create Local APT Repository in Ubuntu 20.04
If you found this guide of Zabbix installation on Ubuntu 20.04 Server helpful and need further assistance, consider hiring a professional. I offer comprehensive installation, configuration, and troubleshooting services for Zabbix and other server monitoring solutions.
Check out my Fiverr profile for more details and to book a service: Seasoned Linux Administrator
Let’s ensure your server monitoring system is up and running smoothly!
Puppy Linux is a fast, lightweight OS designed for speed and simplicity, perfect for old…
Learn how to change Apache document root in Linux by following this step-by-step guide. Adjust…
Discover how to change Apache port in Linux easily. Follow our simple guide to modify…
Learn how to create a virtual host in Apache Server with this comprehensive guide. Set…
Discover 10 practical tasks for the RHCSA exam with step-by-step solutions. Boost your Linux skills…
Discover the ultimate Fail2ban configuration guide. Learn how to set up, customize, and optimize Fail2ban…
This website uses cookies.
View Comments
no work:
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbix -p zabbixdb
Enter password: gzip: /usr/share/doc/zabbix-server-mysql*/create.sql.gz: No such file or directory
Try following command.
zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -u zabbix -p zabbixdb
update your guide
Please let me know exactly what can I update in this guide.
great guide. i appreciate the hard work