
Monitoring, part 2: installing Zabbix 8.0 LTS on Ubuntu 24.04 with PostgreSQL and Nginx
🌐 Machine-translated from Russian. Show original
In this part:
- Which version to take
- Step 1. Connecting the Zabbix repository
- Step 2. Installing the server, web interface, and agent
- Step 3. Creating the database
- Step 4. Database password in the server config
- Step 5. Nginx
- Step 6. Launch
- Step 7. Web interface wizard
- Step 8. The first thing to do after logging in
- If something doesn't work
Which version to take#
Zabbix releases LTS versions (5 years of support) and intermediate ones. For work, use LTS: currently it's 8.0 LTS. If you want the most tested version — 7.0 LTS (commands are the same, the repository path number changes).
Where to download:
- Command builder for your OS: zabbix.com/download
- Agents for Windows, macOS, and other OSes: zabbix.com/download_agents
- Documentation 8.0: zabbix.com/documentation/8.0
Step 1. Connecting the Zabbix repository#
wget https://repo.zabbix.com/zabbix/8.0/release/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_8.0+ubuntu24.04_all.deb
sudo dpkg -i zabbix-release_latest_8.0+ubuntu24.04_all.deb
sudo apt update
Step 2. Installing the server, web interface, and agent#
sudo apt install -y postgresql \
zabbix-server-pgsql zabbix-frontend-php php8.3-pgsql \
zabbix-nginx-conf zabbix-sql-scripts zabbix-agent2
Step 3. Creating the database#
sudo -u postgres createuser --pwprompt zabbix # придумайте пароль и сохраните в менеджер паролей
sudo -u postgres createdb -O zabbix zabbix
zcat /usr/share/zabbix/sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix
Importing the schema takes a couple of minutes. If the path is not found, check it with the dpkg -L zabbix-sql-scripts | grep server.sqlcommand.
Step 4. Database password in the server config#
sudo nano /etc/zabbix/zabbix_server.conf
Find and comment:
DBPassword=ваш_пароль
Step 5. Nginx#
sudo nano /etc/zabbix/nginx.conf
Comment and correct two lines:
listen 8080;
server_name zabbix.company.local;
Port 8080 — so as not to interfere with other sites. If you want 80/443 — remove the default Nginx site and configure HTTPS (for example, via certbot or reverse proxy).
Step 6. Launch#
sudo systemctl restart zabbix-server zabbix-agent2 nginx php8.3-fpm
sudo systemctl enable zabbix-server zabbix-agent2 nginx php8.3-fpm
sudo ufw allow from 192.168.1.0/24 to any port 8080 proto tcp # веб-интерфейс
sudo ufw allow from 192.168.1.0/24 to any port 10051 proto tcp # активные агенты
Step 7. Web interface wizard#
Open http://192.168.1.11:8080:
- Language — Russian is allowed.
- Check of pre-requisites — all items are OK.
- DB connection — PostgreSQL, localhost,
zabbixdatabase, userzabbix, your password. - Settings — server name, time zone Asia/Almaty.
- Done. Login: Admin / zabbix.
Step 8. The first thing to do after logging in#
- Change the Admin password (User settings → Profile) or create your own superadmin and disable Admin.
- Enable two-factor authentication (Users → Authentication → MFA).
- Check the Zabbix server node — agent 2 is already running on it, data will appear in 1–2 minutes (Monitoring → Latest data).
- Set the retention period: Administration → Housekeeping (history 30–90 days, trends — one to two years).
If something doesn't work#
| Symptom | Where to watch |
|---|---|
| "Zabbix server is not running" in the | sudo tail -50 /var/log/zabbix/zabbix_server.log interface is most often an incorrect DBPassword |
| Error 502 in the | systemctl status php8.3-fpm |
| No data from agent | sudo tail /var/log/zabbix/zabbix_agent2.log, Server/ServerActive parameters |
The server is ready. Next, we connect the objects: Monitoring, part 3: Zabbix in practice — Linux and Windows agents, SNMP, websites, and alerts in Telegram.
Comments · 0
No comments yet.Sign in to comment, rate and see all comments.