Zabbix Installation Guide for openEuler 22.03 LTS

Minimal openEuler Setup

Disable the system firewall:

shell
systemctl stop firewalld
systemctl disable firewalld

MySQL Installation and Setup

  1. Install MySQL components.

    shell
    dnf install mysql mysql-server mysql-common mysql-libs mysql-devel mysql-selinux --nogpgcheck
  2. Configure MySQL service.

    shell
    systemctl enable mysqld
    systemctl start mysqld
    systemctl status mysqld
  3. Set root password.

    mysql
    mysql -uroot -p
    > Press Enter when prompted
    ALTER USER 'root'@'localhost' IDENTIFIED BY 'secure_password';

Zabbix Service Installation

shell
dnf config-manager --add-repo https://repo.oepkgs.net/openeuler/rpm/openEuler-22.03-LTS/contrib/others/aarch64/
dnf clean all && dnf makecache
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent --nogpgcheck

Zabbix Environment Configuration

  1. Prepare the database.

    mysql
    mysql -uroot -p
    > Enter your password
    create database zabbix character set utf8mb4 collate utf8mb4_bin;
    create user zabbix@localhost identified by 'zabbix_password';
    grant all privileges on zabbix.* to zabbix@localhost;
    set global log_bin_trust_function_creators = 1;
    quit;
  2. Import initial data.

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

    Disable the temporary MySQL setting.

    mysql
    mysql -uroot -p
    > Enter your password
    set global log_bin_trust_function_creators = 0;
    quit;
  3. Update configuration files.

    shell
    vi /etc/zabbix/zabbix_server.conf
    ---
    DBPassword=zabbix_password
    ---
    vi /etc/nginx/conf.d/zabbix.conf
    ---
    listen 8080; # Uncomment
    server_name example.com; # Uncomment
    ---
  4. Update net-snmp.

    shell
    dnf install net-snmp net-snmp-devel net-snmp-utils --nogpgcheck
  5. Launch zabbix services.

    shell
    systemctl restart zabbix-server zabbix-agent nginx php-fpm
    systemctl enable zabbix-server zabbix-agent nginx php-fpm
  6. Access the web interface using port 8080.