Zabbix 7beta to Ubuntu with MySQL and Apache

Deploy Zabbix 7.0beta

Baseline Components

  • OS - Ubuntu 22.04 - Minimum server install with SSH
  • Zabbix Component - Server, Frontend, Agent
  • Database - MySQL
  • Web Server - Apache

Prerequisites

  • Additional Package Installations for Base Ubuntu 22 LTS
    • Locales for Zabbix
      • # sudo apt install locales
      • # sudo locale-gen en_US
      • # sudo locale-gen en_US.UTF-8
      • # sudo update-locale
    • Tools
      • VIM - # sudo apt install vim
      • DNS Utils - # sudo apt install dnsutils

Installation

  1. Install Zabbix repository
    1. # sudo wget https://repo.zabbix.com/zabbix/6.5/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.5-1+ubuntu22.04_all.deb
    2. # sudo dpkg -i zabbix-release_6.5-1+ubuntu22.04_all.deb
    3. # sudo apt update
  2. Install Zabbix server, frontend, agent
    1. # sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
  3. Install MySQL
    1. # sudo apt install mysql-server
    2. # sudo mysql_secure_installation
      • VALIDATE PASSWORD COMPONENT..
        • Press y|Y for Yes, any other key for No: y
      • …..password validation …..
        • Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1
      • Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
      • Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
      • Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
      • Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
  4. Create initial database
    1. # sudo mysql -uroot -p
      • Set ROOT_DBU_PW
    1. mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
    2. mysql> create user zabbix@localhost identified by 'ZABBIX_DBU_PW';
    3. mysql> grant all privileges on zabbix.* to zabbix@localhost;
    4. mysql> set global log_bin_trust_function_creators = 1;
    5. mysql> quit;
  5. On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.
    1. # sudo zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
    2. Disable log_bin_trust_function_creators option after importing database schema.
      1. # sudo mysql -uroot -p
        • ROOT_DBU_PW
      1. mysql> set global log_bin_trust_function_creators = 0;
      2. mysql> quit;
  6. Configure the database for Zabbix server
    1. Set zabbix database user password in config file /etc/zabbix/zabbix_server.conf
      • DBPassword=ZABBIX_DBU_PW
  7. Start Zabbix server and agent processes and make it start at system boot.
    1. # sudo systemctl restart zabbix-server zabbix-agent apache2
    2. # sudo systemctl enable zabbix-server zabbix-agent apache2
  8. Got to website http://serverip/zabbix
    • U: Admin
    • P: zabbix

Comments