Install Zabbix 6.4 On Ubuntu Server 22.04.1 In Under 10 Minutes

This guide will assume you have a working Ubuntu Server already installed with SSH enabled and ready to go. If you need help with installing Ubuntu server, refer here

If you’re more visual and prefer to watch an installation walk through, refer here

Aside from that, lets jump straight into installing Zabbix 6.4 PRE-RELEASE on top of Ubuntu Server 22.04.1 which as  the time of this writing, is latest and greatest versions of both ->

1. Install ubuntu server 22.04.1 and enable ssh

2. SSH to your Ubuntu server to run install commands

3. Install and configure Zabbix for your platform

Run the following cmds:

sudo wget https://repo.zabbix.com/zabbix/6.3/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.3-3%2Bubuntu22.04_all.deb
sudo dpkg -i zabbix-release_6.3-3+ubuntu22.04_all.deb
sudo apt update 
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent

4. Install sql server

sudo apt-get install mysql-server
sudo systemctl start mysql

5. Create initial database

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

6. On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.

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

7. Disable log_bin_trust_function_creators option after importing database schema.

sudo mysql
set global log_bin_trust_function_creators = 0;
quit;

8. Configure the database for Zabbix server

Edit file /etc/zabbix/zabbix_server.conf and set the DB password with ->

sudo vim /etc/zabbix/zabbix_server.conf

9. Start Zabbix server and agent processes

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

10. Open Zabbix UI web page and proceed with web ui config (should be self explanatory)

The default URL for Zabbix UI when using Apache web server is http://host/zabbix

Video walk through ->

Questions, comments, concerns? Feel free to contact us @ [email protected] Always glad to help.

 

 

13 thoughts on “Install Zabbix 6.4 On Ubuntu Server 22.04.1 In Under 10 Minutes

  1. I had these problems, can you help me?
    thanks

    The following packages have unmet dependencies:
    zabbix-agent : Depends: libc6 (>= 2.34) but 2.31-0ubuntu9.9 is to be installed
    Depends: libldap-2.5-0 (>= 2.5.4) but it is not installable
    Depends: libssl3 (>= 3.0.0~~alpha1) but it is not installable
    zabbix-server-mysql : Depends: libc6 (>= 2.34) but 2.31-0ubuntu9.9 is to be installed
    Depends: libldap-2.5-0 (>= 2.5.4) but it is not installable
    Depends: libodbc2 (>= 2.3.1) but it is not installable
    Depends: libopenipmi0 (>= 2.0.29) but it is not going to be installed
    Depends: libsnmp40 (>= 5.9.1+dfsg) but it is not installable
    Depends: libssl3 (>= 3.0.0~~alpha1) but it is not installable
    Recommends: snmpd but it is not going to be installed

  2. From the looks of it you may be installing a higher version than what is installable for. Try to install zabbix-agent2.

  3. Good write up, but i did get this error
    Unable to determine current Zabbix database version: the table “dbversion” was not found.

    but was able to connect to Zabbix database and run this to fix

    CREATE TABLE dbversion ( \
    mandatory varchar(128) NOT NULL, \
    optional varchar(128) NOT NULL, \
    value varchar(64) NOT NULL, \
    PRIMARY KEY (mandatory, optional) \
    ) ENGINE=InnoDB;

      • Лучше бы написал правильно как делать , а не радоваться то что сделали в место тебя

        • Эти указания оказались успешными для тысяч людей, если им следовать правильно. В конце концов, это руководство, и оно не может учитывать каждый конкретный вариант использования или потенциальную уникальную проблему, которая может возникнуть. Пробег может варьироваться

  4. Distributor ID: Ubuntu
    Description: Ubuntu 20.04.6 LTS
    Release: 20.04
    Codename: focal

    Distributor ID: Ubuntu
    Description: Ubuntu 20.04.6 LTS
    Release: 20.04
    Codename: focal

    First problem starts with this command:
    mysql> set global log_bin_trust_function_creators = 1;
    (Query OK, 0 rows affected, 1 warning (0.00 sec))

    Second problem is this command never completes:
    ~$ sudo zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql –default-character-set=utf8mb4 -uzabbix -p zabbix

    Third problem is “Unable to select configuration.” on webpage.

    Guidance please.

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

    after this command, everything freezes and does not go further.

  6. sudo vim /etc/zabbix/zabbix_server.conf
    sudo: vim: command not found

    everything is done well but it gives error while entering the above command.
    what is the IP for the zabbix server as it does not open through local host.

  7. I’m able to log in but I am stuck at this screen. Not sure what to look for can help please.

    Configure DB connection
    Please create database manually, and set the configuration parameters for connection to this database. Press “Next step” button when done.

    Details Cannot connect to the database.
    Unable to select configuration.

  8. When running the web UI after installing Zabbix 7.0 on Ubuntu 24.04 server minimal using a combination of your guide and the official docs, I got this error during the setup wizard:
    Locale for language “en_US” is not found on the web server

    I resolved it with:
    sudo apt install locales
    sudo locale-gen
    sudo locale-gen en_US.UTF-8
    sudo systemctl restart zabbix-server zabbix-agent apache2

    Then I refreshed the web page and it can find the locale data. Not sure if that first “sudo locale-gen” was needed but after running it I found that my system was set to C.utf8 instead of en_US so I ran the second command which switched it. Obviously, if you don’t want en_US then adjust that command appropriately.

Leave a Reply

Your email address will not be published. Required fields are marked *