How to install ZABBIX 6.2 on Ubuntu 22

2022-11-22 By Nathan 33471 Views linux zabbix monitoring
12 reviews

Zabbix is an open-source software developed and supported by Zabbix SIA, that monitors numerous parameters of a network and the health and integrity of servers, virtual machines, applications, services, databases, websites, the cloud and more.


Zabbix allows users to configure e-mail-based alerts for any event, excellent reporting and data visualization features based on the stored data.


All Zabbix reports and statistics, configuration parameters, network status, server health, etc. can be assessed from any location through a web-based frontend.


This guide will describe the steps to install Zabbix and its basic configuration.


Step 1 - Install Apache web server, PHP and MySQL database


  1. Install the Apache2 service.

    # apt-get install apache2 -y
    

    zabbix1

  2. Install MySQL database.

    # apt-get install mysql-server -y
    

    zabbix2

  3. Install PHP.

    # apt-get install php php-pear php-cgi php-common libapache2-mod-php php-mbstring php-net-socket php-gd php-xml-util php-mysql php-bcmath -y
    

    zabbix3


Step 2 - Download and Install Zabbix 6.2 in Ubuntu 22


  1. Download the Zabbix Repository in Ubuntu using wget.

    # wget https://repo.zabbix.com/zabbix/6.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.2-2%2Bubuntu22.04_all.deb
    

    zabbix4

  2. Install the repository using dpkg tool.

    # dpkg -i zabbix-release_6.2-2+ubuntu22.04_all.deb
    

    zabbix5

  3. Fetch the latest version of the package list.

    # apt-get update
    

    zabbix6

  4. Install Zabbix Server, Frontend and Agent.

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

    zabbix7


Step 3 - Database configuration


  1. Enter MySQL using the below command.

    # mysql
    
  2. Run the following on your database host.

    mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
    
    mysql> create user zabbix@localhost identified by 'password';
    
    mysql> grant all privileges on zabbix.* to zabbix@localhost;
    
    mysql> set global log_bin_trust_function_creators = 1;
    
    mysql> quit;
    

    zabbix8

  3. On the Zabbix server host imports theinitial schema and data.

    # zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
    


    Enter password when prompted:

    zabbix9

  4. Disable the log_bin_trust_function_creators option after importing the database schema.

    # mysql
    
    mysql> set global log_bin_trust_function_creators = 0;
    
    mysql> quit;
    

    zabbix10


Step 4 - Configure the Zabbix server and start the server processes


  1. Edit Zabbix configuration file /etc/zabbix/zabbix_server.conf.

    # vi /etc/zabbix/zabbix_server.conf
    

    zabbix11


    Uncomment DBPassword and enter the Zabbix database password:

    DBPassword=password
    

    zabbix12

  2. Start the Zabbix server and agent processes, and make it start at system boot. Follow the below-given commands.

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

    zabbix13

  3. Install language packs for Zabbix.

    # apt-get install language-pack-en
    

    zabbix14


Step 5 - Set up Zabbix monitoring tool


  1. Use the web browser and go to http://IPaddress/zabbix/setup.php, 111.111.111.111 is an example.

    http://111.111.111.111/zabbix/setup.php
    

    zabbix15


    Click Next step and continue to the next page.

  2. This page shows the prerequisites that are installed and verified.

    zabbix16


    Click Next step and continue to the next page.

  3. Here you have to enter your MySQL-Zabbix database password.

    zabbix17


    Click Next step and continue to the next page.

  4. Set your time zone, default theme, etc.

    zabbix18


    Click Next step and continue to the next page.

  5. Pre-installtion summary. Check all the configuration parameters.

    zabbix19

  6. After the installation process completes, a congratulations message will appear.

    zabbix20


    Click Finish.

  7. Log in to Zabbix using http://111.111.111.111/zabbix/.

    Default Username: Admin
    
    Default Password: zabbix
    


    Sign in using the above-mentioned credentials:

    zabbix21

  8. See Zabbix dashboard.

    zabbix22

  9. To change the Zabbix frontend admin account password, navigate to Administration -> Users –> and click on Admin.

    zabbix23

  10. Click on the Change password button and add your new password.

    zabbix24


    Click on the bottom Update button in order to save the admin account’s new password.


Related Tutorials

What do you think about this article?

Rate this article
Need assistance?

Try this guide to receive free bundled services at signup on a new free account.

Sign Up

Your Feedback Is Important

We hope you’ll give the new products and updates a try. If you have an idea for improving our products or want to vote on other user ideas so they get prioritized, please submit your feedback on our Community platform. And if you have any questions, please feel free to ask in the Community or contact our Technical Support team.