How To Install Zabbix 7.0 on Debian 126 min read
Zabbix is a strong monitoring tool for network monitor written by php mysql. Debian 12 is newly release, so I want to show how to install zabbix server 7.0 on debian 12 server.
#################################### Operating System: Debian 12 IP Address : 10.66.10.12 RAM : 2GB Disk : 50GB Service : Zabbix Host Name : zabbix.technologyrss.local ####################################
Step #01: Ensure Update and upgrade using below command.
root@zabbix:~# lsb_release -a && ip r root@zabbix:~# apt update && apt -y upgrade root@zabbix:~# apt install -y apt-transport-https lsb-release ca-certificates
Step #02: Install php on debian 12
root@zabbix:~# add-apt-repository ppa:ondrej/php root@zabbix:~# apt update root@zabbix:~# apt install -y php php-mysql php-common php-cli php-common php-json php-opcache php-readline php-mbstring php-gd php-dom php-zip php-curl
Check php is working. Create php infi file.
root@zabbix:~# nano /var/www/html/info.php
Insert below line into info.php file.
<?php phpinfo() ;?>
Now going to browser and type your server ip address:
http://10.66.10.12/info.php
Step #03: Install database server mariadb.
root@zabbix:~# apt install -y mariadb-server
When installing running then type mysql root password and remember it for use next time.
Step #04: Download and install zabbix main package.
root@zabbix:~# wget https://repo.zabbix.com/zabbix/6.5/debian/pool/main/z/zabbix-release/zabbix-release_6.5-1+debian12_all.deb root@zabbix:~# dpkg -i zabbix-release_6.5-1+debian12_all.deb root@zabbix:~# apt update root@zabbix:~# apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent
Step #05: Login mysql terminal for create database and user password.
root@zabbix:~# mysql -u root -p
Then type mysql root password. Then run below command from mysql terminal
SELECT user,authentication_string,plugin,host FROM mysql.user; ALTER USER root@localhost IDENTIFIED VIA mysql_native_password; SET PASSWORD = PASSWORD('P@ssw0rd0@123'); SELECT user,authentication_string,plugin,host FROM mysql.user; create database zabbix_db character set utf8mb4 collate utf8mb4_bin; create user zabbix_user@localhost identified by 'P@ssw0rd0@123'; grant all privileges on zabbix_db.* to zabbix_user@localhost; set global log_bin_trust_function_creators = 1; flush privileges; \q
Step #06: Export zabbix default database into my created database.
root@zabbix:~# zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix_user -p zabbix_db
Then type my created zabbix_user password, then wait ….
Again going to mysql terminal for change global settings.
root@zabbix:~# mysql -uroot -p
Run below command from mysql terminal.
set global log_bin_trust_function_creators = 0; flush privileges; \q
Step #07: Configure zabbix server conf file.
DBName=zabbix_db DBUser=zabbix_user DBPassword=P@ssw0rd0@123
Then save and exit.
Setup nginx web server.
root@zabbix:~# nano /etc/zabbix/nginx.conf
Remove # from below two lines and type your server ip address or domain name.
listen 80; server_name 10.66.10.12;
Note: If your server have multiple web server running so must be stop it first.
root@zabbix:~# service apache2 stop
Now restart service using below command.
root@zabbix:~# systemctl restart zabbix-server zabbix-agent nginx php8.2-fpm root@zabbix:~# systemctl enable zabbix-server zabbix-agent nginx php8.2-fpm
Done! All terminal installation. Now going to web browser and process installation.
http://10.66.10.12/setup.php
Click on Next step.
Click on Next step.
Insert below info:
Database name: zabbix_db
User: zabbix_user
Password: *********
Click on Next step.
Click on Next step.
Click on Next step.
Click on Sign in.
If you can any error please goto my YouTube for more details video.
- How To Install Zabbix Server 6.4 On AlmaLinux 8 Server - August 9, 2024
- How To Clear RAM Memory Cache Buffer Linux Server - February 29, 2024
- How To Install Apache Cloud Stack Management Server 4.17 On Ubuntu 22.04 - February 1, 2024
We really appreciate for your support for buying me a coffee.
It takes us a while to compose and upload new content, as they have to be checked to see if Properly works. We appreciate you if you help me for one cup of coffee to keep us awake and always deliver good quality content.
No contribution is small of an amount. We are grateful for any amount you support us with. Thank you!
Perfect !!
It work perfectly.
Welcome!
Worked. Thank you very much
Step 04 I got an error:
Solved using this:
Go to the very last and enter:
export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin
I think you use without root user so you can get this error. Thanks.
I was root. Just FYI for others in case they encounter the same issue.
okay, Thank you!
it works, thank you very much. However I can’t get SNMPv3 to work. Do you have any suggestions?
Should be SNMP enable from your device, You can find my blog or YT channel. Thanks.
SNMPv3 is enabled on my devices. I know it works because I have Zabbix 5.2 monitoring those devices. I can’t get it to work with Debian 12 & Zabbix 7. Not sure if it’s Zabbix or Debian that is causing the issue.
Can you check zabbix server log and get it error what is issue, Thank you!
Hi,
Can you please guide us, how to migrate zabbix server and it’s DB from location A to Location B. I want to test the migration features of zabbix. Please check and update us the process.
If you use only Zabbix server so easy, but If you use proxy zabbix server so all zabbix server same version install needed.
Process:
From A
1. Backup Database
From B
1. Install same version of zabbix server as your location A
2. After successfully install then going to mysql terminal and drop database. or create new database name as your location A
3. Then import your backup database from A.
If you face any issue so please let me know from whatsApp.
Thank you.