How to install Zabbix Server 5.0 on Ubuntu 20.04

The
You can download this article in PDF format to support us through the following link.

Download the guide in PDF format

turn off
The

The
The

Zabbix Server 5.0 LTS has many new features and beautiful improvements. This guide has been adjusted to help you install and configure Zabbix Server 5.0 on Ubuntu 20.04 (Focal Fossa). Zabbix is ​​the ultimate enterprise-grade software designed to monitor millions of metrics collected from thousands of servers, virtual machines and network devices in real time.

What’s new in Zabbix 5.0

Listed below is just the first layer of onions.

  • Vertical menu: The modern vertical menu in the sidebar replaces the horizontal menu in the new version.
  • Test items in the UI: Previously, it was difficult to determine whether the newly configured items were correctly configured. In the new version, you can even test the project (template project, project prototype, low-level discovery rules) from the user interface before saving. If the configuration is correct, you can return the true value.
  • Copy and paste widgets: you can copy and paste dashboard widgets into the new version
  • Manage a large number of hosts: Several improvements have been made to make the work of using a large number of hosts and other elements easier.
  • IPMI sensor discovery: Added a new ipmi.get IPMI item, which returns JSON with information about the IPMI sensor
  • Secure connection to Zabbix database: You can now configure a secure TLS connection to MySQL and PostgreSQL databases from the Zabbix front-end or server.
  • Stronger password encryption: stronger bcrypt encryption is now used to hash user passwords instead of MD5
  • SAML authentication: Login to Zabbix now supports SAML 2.0 authentication.
  • Webhook integration: Push Zabbix notifications to (Microsoft Teams, Jira, Telegram, Zendesk, Redmine, etc.)

Zabbix architecture

The Zabbix monitoring architecture consists of client and server models. The server communicates with native software agents that can be used in various operating systems (such as Linux, NIX, and Windows). For systems without agents, you can use common monitoring protocols, such as Simple Network Management Protocol (SNMP) or Intelligent Platform Management Interface (IPMI).

Install Zabbix Server 5.0 on Ubuntu 20.04 (Focal Fossa)

The next steps will cover the complete steps of installing Zabbix Server 5.0 on Ubuntu 20.04 (Focal Fossa). Zabbix server depends on the following software applications:

  • Apache Web server
  • PHP with required extension
  • MySQL / MariaDB database server

In this setup, we will run MySQL and Apache web server on the same server where Zabbix package is installed. To monitor on a large infrastructure, you need to use a dedicated database server to handle the load.

Step 1: Install Apache httpd server

Update your system, and then install the apache2 package by running the following command:

sudo apt update
sudo apt -y upgrade
sudo apt install -y apache2

After installing Apache, configure basic security by allowing only Prod server tokens /etc/apache2/conf-enabled/security.conf

sudo sed -i "s/^ServerTokens OS$/ServerTokens Prod/" /etc/apache2/conf-enabled/security.conf
sudo sed -i "s/^ServerSignature On$/ServerSignature Off/" /etc/apache2/conf-enabled/security.conf

instructionServerTokens Configure what is returned as a server HTTP response. Valid options are operating system | minimum secondary professional | product

After making changes, restart the Apache web service:

sudo systemctl restart apache2

If you have installed and enabled UFW firewall, allow access to ports 443 and 80:

sudo ufw allow proto tcp from any to any port 80,443

To enable UFW firewall on Ubuntu, use:

sudo ufw enable

Don’t forget to enable ssh service:

sudo ufw allow ssh

Step 2: Install MariaDB database server

Install MariaDB database server on Ubuntu 20.04 LTS.

sudo apt install mariadb-server

Secure database server:

sudo mysql_secure_installation

Update the root user’s authentication plugin.

$ sudo mysql -u root
UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE User = 'root';
FLUSH PRIVILEGES;
QUIT;

After the database server is installed, you need to create a database for Zabbix users. Replace “Strong password“And the database password you want to use.

export zabbix_db_pass="StrongPassword"
mysql -uroot -p <

Step 3: Install Zabbix 5.0 Server on Ubuntu 20.04 (Focal Fossa)

Now that we have installed and worked on the necessary dependencies, we can complete the installation by deploying the Zabbix 5.0 server.

Add the Zabbix 5.0 repository on Ubuntu 20.04 (Bionic Beaver) LTS:

wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb
sudo dpkg -i ./zabbix-release_5.0-1+focal_all.deb

Now install Zabbix 5.0 Server on Ubuntu 20.04 with front-end and MySQL support:

sudo apt update
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent

Import Zabbix Server database architecture

For Zabbix server and Zabbix agent daemon, a database is required. There is no need to run the Zabbix agent. If the Zabbix server and agent are installed on the same host, they must create their databases with different names!

Import the initial architecture and data of the server using MySQL:

sudo su -
zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix

When prompted, enter your Zabbix database user password.

Step 4: Configure and start the Zabbix server

Edit your Zabbix configuration file /etc/zabbix/zabbix_server.conf And set the database connection settings.

$ sudo vim /etc/zabbix/zabbix_server.conf
DBName=zabbix
DBUser=zabbix
DBPassword=StrongPassword

Configure PHP for Zabbix frontend

Edit the file /etc/zabbix/apache.conf, uncomment and set the correct time zone for you.

$ sudo vim /etc/zabbix/apache.conf
php_value date.timezone Africa/Nairobi

The entire part is shown below.

............

        php_value max_execution_time 300
        php_value memory_limit 128M
        php_value post_max_size 16M
        php_value upload_max_filesize 2M
        php_value max_input_time 300
        php_value max_input_vars 10000
        php_value always_populate_raw_post_data -1
        php_value date.timezone Africa/Nairobi

.....

After modifying this file, restart the Zabbix server:

sudo systemctl restart zabbix-server zabbix-agent apache2
sudo systemctl enable zabbix-server zabbix-agent apache2

Configure firewall

If you have installed and run ufw firewall on your system, make sure to allow port 5000 and port 5001:

sudo ufw allow proto tcp from any to any port 10050,10051

Restart apache2 And start the front-end installation:

sudo systemctl restart apache2

Step 5: Perform Zabbix initial setup

access"http: // (hostname or IP address of Zabbix server) / zabbix /'' Start Zabbix initial setup.

Step 1 is the welcome page, click "Next step" carry on.

Click Next to verify the dependency requirements.

How to install Zabbix Server 5.0 on Ubuntu 20.04

Configure database settings

How to install Zabbix Server 5.0 on Ubuntu 20.04

Enter the database details we set up earlier. If you want to encrypt in the database connection, you can configure TLS in this step. When finished, click "Next"

How to install Zabbix Server 5.0 on Ubuntu 20.04

Click "Next step"To complete the installation of Zabbix Server 5.0 on Ubuntu 20.04 Linux machine.

How to install Zabbix Server 5.0 on Ubuntu 20.04

Complete the installation to access the Zabbix management dashboard.

How to install Zabbix Server 5.0 on Ubuntu 20.04

After entering the login page, the default login credentials are:

Username: "Admin"
Password: "zabbix"

How to install Zabbix Server 5.0 on Ubuntu 20.04

Step 6: Change the administrator password

Log in to the Zabbix management console using administrator user name and password zabbix. For security reasons, you need to change the administrator user's password after logging in for the first time.

Navigation Administration> Users> Administrator> Password> Change Password

reference

Read the documentation: Quick start guide Start using Zabbix server monitoring system.

Further reading:

Install and configure LibreNMS on Ubuntu using Nginx

10 best open source Linux monitoring tools

The
You can download this article in PDF format to support us through the following link.

Download the guide in PDF format

turn off
The

The
The

Sidebar