How To Install Zabbix Server 6.2 On Ubuntu 22.044 min read
In this tutorial how to install Zabbix server 6.2 on Ubuntu 22.04. Zabbix 6.2 is newly latest release from officially. So lets start this guide for install step by step.
####################################### Operating system: Ubuntu 22.04 IP address : 10.66.10.4 RAM : 2GB DISK space : 50GB vCPU : 2 Service : ZABBIX 6.2 PHP version : 8.1 Mysql : 8.0 must be Hostname : Zbx-Server.technologyrss.local #######################################
Step #01: Install zabbix 6.2.
root@Zbx-Server:~# apt update && apt -y upgrade root@Zbx-Server:~# wget https://repo.zabbix.com/zabbix/6.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.2-1+ubuntu22.04_all.deb root@Zbx-Server:~# dpkg -i zabbix-release_6.2-1+ubuntu22.04_all.deb root@Zbx-Server:~# apt update root@Zbx-Server:~# apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent
Step #02: Install mysql database and configure.
root@Zbx-Server:~# apt install -y mysql-server root@Zbx-Server:~# systemctl start mysql root@Zbx-Server:~# systemctl enable mysql root@Zbx-Server:~# systemctl status mysql
Step #03: Create database for zabbix user.
root@Zbx-Server:~# mysql -uroot -p
type mysql root password for login terminal then create database, user and password.
create database zabbix_db character set utf8 collate utf8_bin; create user zabbix_user@localhost identified by 'zabbix@123'; GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES, RELOAD on *.* TO 'zabbix_user'@'localhost' WITH GRANT OPTION; grant all privileges on zabbix_db.* to zabbix_user@localhost; SET GLOBAL log_bin_trust_function_creators = 1; FLUSH PRIVILEGES; \q
Step #04: Import zabbix default database into created DB.
root@zabbix-server:~# zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uroot -p zabbix_db
Then type mysql root password.
After import done then change global config.
root@zabbix-server:~# mysql -uroot -p
Then run below command
SET GLOBAL log_bin_trust_function_creators = 0; \q
Step #05: Add database name, user and password into zabbix config file.
root@zabbix-server:~# nano /etc/zabbix/zabbix_server.conf
Insert below config into zabbix conf file.
DBName=zabbix_db DBUser=zabbix_user DBPassword=zabbix@123
Step #06: Setup nginx web server.
root@zabbix-server:~# nano /etc/zabbix/nginx.conf
Remove # from below section and must be replace your server ip address.
listen 80; server_name 10.66.10.4
Step #07: Restart and enable all services.
root@zabbix-server:~# systemctl restart zabbix-server zabbix-agent nginx php8.1-fpm root@zabbix-server:~# systemctl enable zabbix-server zabbix-agent nginx php8.1-fpm
Access your server ip address and complete web installation process.
http://10.66.10.4/setup.php
Click Next step for check pre-requisites.
Click Next step for configure DB connection.
Click Next step for select theme or skip this step.
Click Next step for see pre installation summary.
Click Next step for installation done!
Click Finish for redirect default login.
Check Zabbix dashboard as like below.
If you see any error so please see my YouTube channel for more details, Please subscribe my channel for get new updates.
- 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!
Hello admin,
I can’t start Zabbix Server services on Ubuntu 2204. I dont know fix it. Can you help me?
Thank you
Sure, Send me what is error?
Thanks.
Hi Admin
I am facing the issue in nginx.cnf
File is different as you shown
I am facing issue in ubuntu 22.04
Send me log error from SS, check nginx status, what is see error.
Thanks.
muy bien, muchas gracias, excelente tutorial
Thank you so much!
Correction! for DB error
zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql –default-character-set=utf8mb4 -uroot -p zabbix_db
Hi Admin,
I’m new in Linux.
Many thanks for the Guide on how to install Zabbix but I stuck under ‘Configure DB Connection’.
Can help on this?
Thank you.
Must be add your zabbix user password into config file, See Step #05: again also see video.
Thanks.
Please replace
/usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz
with
/usr/share/zabbix-sql-scripts/mysql/server.sql.gz
Follow step #04:
zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql –default-character-set=utf8mb4 -uroot -p zabbix_db
Hello admin,
I have problem during “Configure DB connection”.
Can you help me?
Step #03: and Step #04: are success? If success then no access denied from database, Please try again Step #03: and Step #04:
Thanks.
Hey Admin, Can you try a HA Zabbix installation? What Keeplive program installed.
ok, I will try to.
Thanks.
Getting nginx error..
Running this command : systemctl restart zabbix-server zabbix-agent nginx php8.1-fpm
Job for nginx.service failed because the control process exited with error code.
See “systemctl status nginx.service” and “journalctl -xeu nginx.service” for details.
Error Log:
2023/05/23 12:15:19 [emerg] 47627#47627: bind() to 0.0.0.0:80 failed (98: Unknown error)
Check your server have another web service running like apache then stop it, Then start nginx service.
service apache2 stop
service nginx start
Thanks.
Hello,
I have a problem in the conection DB, I followed the steps 3 and 4, and i test login in ubuntu mysql.
Only diference with you tutorial i selected spanish language and i change in ubuntu server too. can you give me some ideas?
Thank you.
Must be check create database info like user password. Then try again. Thanks.