zabbix/README.md

2.5 KiB

zabbix

These instructions are for installing to an Ubuntu 22.04 LTS Host. See the Zabbix Download Page for additional steps and guidance based on your deployment platform.

Create and securely store credentials for the below:

• MySQL Root Password • Zabbix MySQL User Password • Admin Web GUI Password

ALTER USER 'root'@'localhost' IDENTIFIED BY 'ooleithahfaepho0eed8ohz9Xooto4';

create user zabbix@localhost identified by 'queY1queegoiN6oi7OoP8voo6Ahahm';

Install and configure Zabbix for your platform

a. Install Zabbix repository Documentation

wget https://repo.zabbix.com/zabbix/7.2/release/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.2+ubuntu22.04_all.deb

dpkg -i zabbix-release_latest_7.2+ubuntu22.04_all.deb

apt update

b. Install Zabbix server, frontend, agent2

apt install zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent2

c. Install Zabbix agent 2 plugins Documentation You may want to install Zabbix agent 2 plugins.

apt install zabbix-agent2-plugin-mongodb zabbix-agent2-plugin-mssql zabbix-agent2-plugin-postgresql

d. Create initial database Documentation Make sure you have database server up and running.

Run the following on your database host.

mysql -uroot -p

password 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; On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.

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

Disable log_bin_trust_function_creators option after importing database schema.

mysql -uroot -p

password mysql> set global log_bin_trust_function_creators = 0; mysql> quit; e. Configure the database for Zabbix server Edit file /etc/zabbix/zabbix_server.conf

DBPassword=password f. Start Zabbix server and agent processes Start Zabbix server and agent processes and make it start at system boot.

systemctl restart zabbix-server zabbix-agent2 nginx php8.1-fpm

systemctl enable zabbix-server zabbix-agent2 nginx php8.1-fpm

g. Open Zabbix UI web page The URL for Zabbix UI when using Nginx depends on the configuration changes you should have made.