X
    Categories: Zabbix

How To Install Zabbix Server 7.0 On AlmaLinux 9 Server

Sharing is caring!

Zabbix is smart monitoring system on your network. This software written by php mysql. So lets start using installation process on AlmaLinux 9 server.

Operating system: AlmaLinux 9
IP address : 192.168.0.20
RAM  : 2GB
DISK space : 50GB
vCPU  : 2
Service  : ZABBIX 7.0
PHP version : 8.0
Mysql  : 8.0 must be
Hostname : zbx.technologyrss.local

Check server version using below command.

[root@zabbix ~]# cat /etc/redhat-release && ip r

Step #01: Install zabbix 7.0 On AlmaLinux 9 Server

[root@zabbix ~]# dnf -y upgrade
[root@zabbix ~]# rpm -Uvh https://repo.zabbix.com/zabbix/7.0/alma/9/x86_64/zabbix-release-latest-7.0.el9.noarch.rpm
[root@zabbix ~]# dnf clean all
[root@zabbix ~]# dnf module switch-to php:8.2
[root@zabbix ~]# dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent

Step #02: Install mysql database and configure root user password

[root@zabbix ~]# dnf install -y mysql-server mysql
[root@zabbix ~]# systemctl start mysqld
[root@zabbix ~]# systemctl enable mysqld
[root@zabbix ~]# systemctl status mysqld
[root@zabbix ~]# mysql -u root -p

Default mysql root password is blank.

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'P@ssw0rd@123'; //mysql 8 reset password command
mysql> flush privileges;

Step #03: Create database for zabbix user with password.

create database zabbix_db character set utf8mb4 collate utf8mb4_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

Note: (you can replace user password from zabbix@123)

Step #04: Import zabbix default database on 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 mysql zabbix_user password.

After import database Disable log_bin_trust_function_creators option after importing database schema.

[root@zabbix ~]# mysql -uroot -p

Then type mysql root password. Run below command.

set global log_bin_trust_function_creators = 0;
FLUSH PRIVILEGES;
\q

Step #05: Add database name, user and password on zabbix server conf file.

[root@zabbix ~]# vi /etc/zabbix/zabbix_server.conf

Then Add below all lines into this file. But remember it DBName & DBUser remove or # mark from default.

DBName=zabbix_db
DBUser=zabbix_user
DBPassword=zabbix@123

Step #06: Setup nginx web server

[root@zabbix ~]# vi /etc/nginx/conf.d/zabbix.conf

Remove # mark from below line and replace ip address as your server ip.

listen          80;
server_name 192.168.0.20

Step #07: restart and enable all services using below command.

[root@zabbix ~]# systemctl restart zabbix-server zabbix-agent nginx php-fpm
[root@zabbix ~]# systemctl enable zabbix-server zabbix-agent nginx php-fpm

Step #08: Firewall settings On AlmaLinux 9 Server.

[root@zabbix ~]# systemctl start firewalld
[root@zabbix ~]# firewall-cmd --zone=public --add-port=80/tcp --permanent
[root@zabbix ~]# firewall-cmd --zone=public --add-port=443/tcp --permanent
[root@zabbix ~]# firewall-cmd --zone=public --add-port=10050/tcp --permanent
[root@zabbix ~]# firewall-cmd --zone=public --add-port=10051/tcp --permanent
[root@zabbix ~]# firewall-cmd --reload

Also disable selinux using below command.

[root@zabbix ~]# vi /etc/selinux/config

Edit and type it disabled

Then reboot your server using below command

[root@zabbix ~]# reboot

After reboot access your server ip address and complete web installation process.

http://192.168.0.20/setup.php

 

 

Click Next step

 

All status is OK, so Click Next step.

 

Click Next step.

 

Click Next step.

Click Finish.

Now default login using Admin user and password.

After successfully done web installation then login to dashboard.
Default login:
User name: Admin
Password: zabbix

 

 

If you face any error for installation process so please see my YouTube Channel more videos.

0 0 votes
Article Rating
Admin: I am system administrator as Windows and Linux platform. I have 4 years skilled from the professional period. I have to configure Linux based system such as an Asterisk VOIP system, Network monitoring tools (ZABBIX), Virtualization (XEN Server), Cloud computing (Apache CloudStack) etc. Now share my professional skill each interested person. Thanks to all.
Leave a Comment