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.
[email protected]:~# apt update && apt -y upgrade [email protected]:~# wget https://repo.zabbix.com/zabbix/6.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.2-1+ubuntu22.04_all.deb [email protected]:~# dpkg -i zabbix-release_6.2-1+ubuntu22.04_all.deb [email protected]:~# apt update [email protected]:~# apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent
Step #02: Install mysql database and configure.
[email protected]:~# apt install -y mysql-server [email protected]:~# systemctl start mysql [email protected]:~# systemctl enable mysql [email protected]:~# systemctl status mysql
Step #03: Create database for zabbix user.
[email protected]:~# 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 [email protected] identified by '[email protected]'; 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 [email protected]; SET GLOBAL log_bin_trust_function_creators = 1; FLUSH PRIVILEGES; \q
Step #04: Import zabbix default database into created DB.
[email protected]:~# 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.
[email protected]:~# 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.
[email protected]:~# nano /etc/zabbix/zabbix_server.conf
Insert below config into zabbix conf file.
DBName=zabbix_db DBUser=zabbix_user [email protected]
Step #06: Setup nginx web server.
[email protected]:~# 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.
[email protected]:~# systemctl restart zabbix-server zabbix-agent nginx php8.1-fpm [email protected]:~# 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 Odoo 16 on Ubuntu 22.04 - May 14, 2023
- 12 Steps to Organize Photos on Your Computer - March 20, 2023
- 9 Ways to Speed Up Your MacBook Yosemite - February 21, 2023
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.