Second VM Rocky Linux Zabbix Network Monitoring - sullivaneg/Raspberry-Pi-Proxmox-Lab GitHub Wiki
The goal of this lab is to install an open source network monitoring tool called Zabbix on a Rocky Linux VM. I'm creating a new VM because Open Project requires a lot of resources so I want to be able to turn it off to access this if I need to.
- Create New Rocky VM (Entry]
- Install Rabbix repo
sudo rpm -Uvh https://repo.zabbix.com/zabbix/7.4/release/rocky/10/noarch/zabbix-release-latest-7.4.el10.noarch.rpmsudo dnf clean all
- Install Zabbix server, frontend, agent
sudo dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
- SELinux Configuration
sudo setsebool -P httpd_can_connect_zabbix onsudo setsebool -P httpd_can_network_connect_db on
sudo dnf update -ysudo dnf install -y mariadb-serversudo systemctl enable --now mariadb- Checkpoint 1: Successfully Installed ->
sudo systemctl status mariadb

sudo mysql_secure_installation
- no current password
- set root password
- remove anonymous users
- disallow root login remotely
- remove test database
- reload privilege table
-
sudo marinade -u root -p-> enter password
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
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
- mariadb -uroot -p
- set global log_bin_trust_function_creators = 0;
- quit
sudo nano /etc/zabbix/zabbix_server.conf-
DBPassword=password-> Make sure this is the zabbix user password
systemctl restart zabbix-server zabbix-agent httpd php-fpmsystemctl enable zabbix-server zabbix-agent httpd php-fpmsudo firewall-cmd --zone=public --permanent --add-service=httpsudo firewall-cmd --zone=public --permanent --add-port=80/tcpsudo firewall-cmd --reload

sudo firewall-cmd --zone=public --permanent --add-service=zabbix-serversudo firewall-cmd --reloadsudo systemctl enable Zabbix-server httpd php-fpm --now- Access Zabbix by /zabbix in a web browser
- Check Prerequisites

- Configure DB Connection
- Settings

sudo mkdir -p /etc/zabbix/ssl && cd /etc/zabbix/sslsudo dnf install openssl -y- Generate CA Private Key ->
sudo openssl genrsa -out ca.key 2048 - Generate Certificate ->
sudo openssl req -new -x509 -days 3650 -key ca.key -out ca.crt-> I used defaults - Generate private key ->
sudo openssl genrsa -out server.key 2048. - Cert signing request ->
sudo openssl req -new -key server.key -out server.csr(set CN=zabbix-server) - Sign the certificate ->
sudo openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt - Generate frontend private key ->
sudo openssl genrsa -out frontend.key 2048. - Generate frontend Cert-signing request:
sudo openssl req -new -key frontend.key -out frontend.csr(set CN=zabbix-frontend) - Sign front end cert ->
sudo openssl x509 -req -days 365 -in frontend.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out frontend.crt - Set permissions ->
sudo chown zabbix:zabbix *.key *.crt && sudo chmod 600 *.key && sudo chmod 644 *.crt
sudo nano /etc/zabbix/zabbix_server.conf- Change config file
TLSFrontendAccept=cert
TLSCAFile=/etc/zabbix/ssl/ca.crt
TLSCertFile=/etc/zabbix/ssl/server.crt
TLSKeyFile=/etc/zabbix/ssl/server.key
sudo systemctl restart zabbix-server
-
cd /etc/zabbix/ssl->sudo chown zabbix:zabbix server.key frontend.key ca.key sudo chmod 600 server.key frontend.key ca.key-
sudo chmod 644 server.crt frontend.crt ca.crt-> Nope - Issue: I forgot this line in the config file: TLSFrontendAccept=cert
- Restart zabbix-server -> Still not working
- Changing Directory permissions:

- I'm just going to copy everything to the apache root directory
- I moved everything to my apache root directory and only changed the file path of the key file on the web interface and now it works! Writing this note in case it breaks later.