How to install Zabbix on Oracle Linux 9.3
To Install Zabbix On Oracle Linux 9.3
Introduction:
Zabbix is an open-source software solution designed for monitoring various aspects of IT infrastructure, such as networks, servers, virtual machines, and cloud services. This tool efficiently gathers and presents critical metrics pertaining to network usage, CPU performance, and disk space utilization.
Procedure:
Step1: Check the OS Version by using the below Command
[root@linuxhelp ~]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="9.3"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Oracle Linux Server 9.3"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:9:3:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 9"
ORACLE_BUGZILLA_PRODUCT_VERSION=9.3
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=9.3
Step2: Now Install the MySQL and httpd by using the below Command
[root@linuxhelp ~]# dnf install mysql* -y
Oracle Linux 9 BaseOS Latest (x86_64) 24 kB/s | 3.6 kB 00:00
Oracle Linux 9 BaseOS Latest (x86_64) 8.9 MB/s | 26 MB 00:02
Oracle Linux 9 Application Stream Packages (x86_64) 27 kB/s | 3.9 kB 00:00
Oracle Linux 9 Application Stream Packages (x86_64) 9.4 MB/s | 35 MB 00:03
Oracle Linux 9 UEK Release 7 (x86_64) 21 kB/s | 3.0 kB 00:00
Oracle Linux 9 UEK Release 7 (x86_64) 9.4 MB/s | 34 MB 00:03
Last metadata expiration check: 0:00:07 ago on Wednesday 05 June 2024 01:42:55 AM.
Dependencies resolved.
==============================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================
Installing:
mysql x86_64 8.0.36-1.el9_3 ol9_appstream 2.7 M
mysql-common x86_64 8.0.36-1.el9_3 ol9_appstream 101 k
mysql-errmsg x86_64 8.0.36-1.el9_3 ol9_appstream 523 k
mysql-release-el9 x86_64 1.0-1.el9 ol9_baseos_latest 14 k
mysql-selinux noarch 1.0.10-1.el9 ol9_appstream 35 k
mysql-server x86_64 8.0.36-1.el9_3 ol9_appstream 17 M
Upgrading:
selinux-policy noarch 38.1.35-2.0.2.el9_4 ol9_baseos_latest 57 k
selinux-policy-targeted noarch 38.1.35-2.0.2.el9_4 ol9_baseos_latest 7.8 M
Installing dependencies:
mecab x86_64 0.996-3.el9.4 ol9_appstream 384 k
protobuf-lite x86_64 3.14.0-13.el9 ol9_appstream 233 k
yum-utils noarch 4.3.0-11.0.1.el9_3 ol9_baseos_latest 53 k
Transaction Summary
==============================================================================================================================================
Install 9 Packages
Upgrade 2 Packages
Total download size: 29 M
Downloading Packages:
(1/11): mysql-release-el9-1.0-1.el9.x86_64.rpm 66 kB/s | 14 kB 00:00
(2/11): yum-utils-4.3.0-11.0.1.el9_3.noarch.rpm 219 kB/s | 53 kB 00:00
(3/11): mysql-common-8.0.36-1.el9_3.x86_64.rpm 1.3 MB/s | 101 kB 00:00
(4/11): mecab-0.996-3.el9.4.x86_64.rpm 1.1 MB/s | 384 kB 00:00
(5/11): mysql-selinux-1.0.10-1.el9.noarch.rpm 1.2 MB/s | 35 kB 00:00
----------------------------------------------------------------------------------------------------------------------------------------------
Total 9.2 MB/s | 29 MB 00:03
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Running scriptlet: selinux-policy-targeted-38.1.35-2.0.2.el9_4.noarch 1/1
Preparing : 1/1
Installing : mysql-common-8.0.36-1.el9_3.x86_64 1/13
Upgrading : selinux-policy-38.1.35-2.0.2.el9_4.noarch 2/13
Running scriptlet: selinux-policy-38.1.35-2.0.2.el9_4.noarch 2/13
libsemanage.semanage_direct_install_info: Overriding mysql module at lower priority 100 with module at priority 200.
Installing : mysql-8.0.36-1.el9_3.x86_64 5/13
Running scriptlet: mysql-selinux-1.0.10-1.el9.noarch 13/13
Running scriptlet: selinux-policy-targeted-38.1.23-1.0.1.el9.noarch 13/13
Verifying : mysql-release-el9-1.0-1.el9.x86_64 1/13
Verifying : yum-utils-4.3.0-11.0.1.el9_3.noarch 2/13
Upgraded:
selinux-policy-38.1.35-2.0.2.el9_4.noarch selinux-policy-targeted-38.1.35-2.0.2.el9_4.noarch
Installed:
mecab-0.996-3.el9.4.x86_64 mysql-8.0.36-1.el9_3.x86_64 mysql-common-8.0.36-1.el9_3.x86_64 mysql-errmsg-8.0.36-1.el9_3.x86_64
mysql-release-el9-1.0-1.el9.x86_64 mysql-selinux-1.0.10-1.el9.noarch mysql-server-8.0.36-1.el9_3.x86_64 protobuf-lite-3.14.0-13.el9.x86_64
yum-utils-4.3.0-11.0.1.el9_3.noarch
Complete!
[root@linuxhelp ~]# dnf install httpd* -y
MySQL 8.0 for Oracle Linux 9 (x86_64) 2.5 MB/s | 1.5 MB 00:00
MySQL 8.0 Tools Community for Oracle Linux 9 (x86_64) 1.1 MB/s | 525 kB 00:00
MySQL 8.0 Connectors Community for Oracle Linux 9 (x86_64) 29 kB/s | 12 kB 00:00
Dependencies resolved.
==============================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================
Installing:
httpd x86_64 2.4.57-8.0.1.el9 ol9_appstream 65 k
httpd-manual noarch 2.4.57-8.0.1.el9 ol9_appstream 2.5 M
httpd-tools x86_64 2.4.57-8.0.1.el9 ol9_appstream 95 k
Installing dependencies:
apr-devel x86_64 1.7.0-12.el9_3 ol9_appstream 279 k
oracle-logos-httpd noarch 90.2-1.0.4.el9 ol9_baseos_latest 37 k
Installing weak dependencies:
mod_http2 x86_64 2.0.26-2.el9_4 ol9_appstream 171 k
mod_lua x86_64 2.4.57-8.0.1.el9 ol9_appstream 59 k
Transaction Summary
==============================================================================================================================================
Install 13 Packages
Total download size: 5.5 M
Installed size: 15 M
Downloading Packages:
(1/13): oracle-logos-httpd-90.2-1.0.4.el9.noarch.rpm 153 kB/s | 37 kB 00:00
(2/13): apr-util-devel-1.6.1-23.el9.x86_64.rpm 387 kB/s | 110 kB 00:00
----------------------------------------------------------------------------------------------------------------------------------------------
Total 6.7 MB/s | 5.5 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : apr-devel-1.7.0-12.el9_3.x86_64 1/13
Installing : libdb-devel-5.3.28-53.0.1.el9.x86_64 2/13
Installing : httpd-tools-2.4.57-8.0.1.el9.x86_64 3/13
Running scriptlet: httpd-filesystem-2.4.57-8.0.1.el9.noarch 4/13
Installing : httpd-filesystem-2.4.57-8.0.1.el9.noarch 4/13
Verifying : oracle-logos-httpd-90.2-1.0.4.el9.noarch 1/13
Verifying : apr-devel-1.7.0-12.el9_3.x86_64 2/13
Installed:
apr-devel-1.7.0-12.el9_3.x86_64 apr-util-devel-1.6.1-23.el9.x86_64 expat-devel-2.5.0-1.el9.x86_64
httpd-2.4.57-8.0.1.el9.x86_64 httpd-core-2.4.57-8.0.1.el9.x86_64 httpd-devel-2.4.57-8.0.1.el9.x86_64
httpd-filesystem-2.4.57-8.0.1.el9.noarch httpd-manual-2.4.57-8.0.1.el9.noarch httpd-tools-2.4.57-8.0.1.el9.x86_64
libdb-devel-5.3.28-53.0.1.el9.x86_64 mod_http2-2.0.26-2.el9_4.x86_64 mod_lua-2.4.57-8.0.1.el9.x86_64
oracle-logos-httpd-90.2-1.0.4.el9.noarch
Complete!
Step 3: Start and enable the MySQL and httpd service by using the below command
[root@linuxhelp ~]# systemctl start mysqld.service httpd.service
[root@linuxhelp ~]# systemctl enable mysqld.service httpd.service
Created symlink /etc/systemd/system/multi-user.target.wants/mysqld.service → /usr/lib/systemd/system/mysqld.service.
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
Step 4: Check the status of the MySQL and httpd service by using the below Command
[root@linuxhelp ~]# systemctl status mysqld.service httpd.service
● mysqld.service - MySQL 8.0 database server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; preset: disabled)
Active: active (running) since Wed 2024-06-05 01:45:21 IST; 38s ago
Main PID: 31833 (mysqld)
Status: "Server is operational"
Tasks: 38 (limit: 21739)
Memory: 453.2M
CPU: 11.618s
CGroup: /system.slice/mysqld.service
└─31833 /usr/libexec/mysqld --basedir=/usr
Jun 05 01:45:09 linuxhelp systemd[1]: Starting MySQL 8.0 database server...
Jun 05 01:45:10 linuxhelp mysql-prepare-db-dir[29028]: Initializing MySQL database
Jun 05 01:45:21 linuxhelp systemd[1]: Started MySQL 8.0 database server.
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; preset: disabled)
Active: active (running) since Wed 2024-06-05 01:45:10 IST; 49s ago
Docs: man:httpd.service(8)
Main PID: 28989 (httpd)
Status: "Total requests: 0; Idle/Busy workers 100/0;Requests/sec: 0; Bytes served/sec: 0 B/sec"
Tasks: 177 (limit: 21739)
Memory: 28.7M
CPU: 308ms
CGroup: /system.slice/httpd.service
├─28989 /usr/sbin/httpd -DFOREGROUND
├─29307 /usr/sbin/httpd -DFOREGROUND
├─29308 /usr/sbin/httpd -DFOREGROUND
├─29312 /usr/sbin/httpd -DFOREGROUND
└─29313 /usr/sbin/httpd -DFOREGROUND
Step 5: Install the Zabbix repository by using the below command
[root@linuxhelp ~]# rpm -Uvh https://repo.zabbix.com/zabbix/6.4/rhel/9/x86_64/zabbix-release-6.4-1.el9.noarch.rpm
Retrieving https://repo.zabbix.com/zabbix/6.4/rhel/9/x86_64/zabbix-release-6.4-1.el9.noarch.rpm
warning: /var/tmp/rpm-tmp.W2Ac98: Header V4 RSA/SHA512 Signature, key ID 08efa7dd: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:zabbix-release-6.4-1.el9 ################################# [100%]
Step 6: Next Install Zabbix server, frontend, agent by using the below command
[root@linuxhelp ~]# dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
Zabbix Official Repository - x86_64 89 kB/s | 251 kB 00:02
Zabbix Official Repository non-supported - x86_64 574 B/s | 1.1 kB 00:01
Dependencies resolved.
==============================================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================================
Installing:
zabbix-agent x86_64 6.4.15-release1.el9 zabbix 561 k
zabbix-sql-scripts noarch 6.4.15-release1.el9 zabbix 7.9 M
zabbix-web-mysql noarch 6.4.15-release1.el9 zabbix 12 k
Installing dependencies:
OpenIPMI-libs x86_64 2.0.32-3.0.1.el9 ol9_appstream 518 k
fping x86_64 5.1-1.el9 zabbix-non-supported 35 k
nginx-filesystem noarch 1:1.20.1-14.0.2.el9_2.1 ol9_appstream 8.2 k
unixODBC x86_64 2.3.9-4.el9 ol9_appstream 550 k
zabbix-web noarch 6.4.15-release1.el9 zabbix 7.8 M
zabbix-web-deps noarch 6.4.15-release1.el9 zabbix 13 k
Transaction Summary
==============================================================================================================================================
Install 21 Packages
Total download size: 23 M
Installed size: 82 M
Is this ok [y/N]: y
Downloading Packages:
(1/21): php-bcmath-8.0.30-1.el9_2.x86_64.rpm 134 kB/s | 33 kB 00:00
(2/21): nginx-filesystem-1.20.1-14.0.2.el9_2.1.noarch.rpm 31 kB/s | 8.2 kB 00:00
(3/21): OpenIPMI-libs-2.0.32-3.0.1.el9.x86_64.rpm 1.6 MB/s | 518 kB 00:00
(4/21): php-gd-8.0.30-1.el9_2.x86_64.rpm 1.6 MB/s | 39 kB 00:00
(5/21): php-ldap-8.0.30-1.el9_2.x86_64.rpm 1.3 MB/s | 38 kB 00:00
----------------------------------------------------------------------------------------------------------------------------------------------
Total 1.7 MB/s | 23 MB 00:13
Zabbix Official Repository - x86_64 3.0 MB/s | 3.1 kB 00:00
Importing GPG key 0x08EFA7DD:
Userid : "Zabbix LLC (Jul 2022) <packager@zabbix.com>"
Fingerprint: D9AA 84C2 B617 479C 6E4F CF4D 19F2 4753 08EF A7DD
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-08EFA7DD
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : php-common-8.0.30-1.el9_2.x86_64 1/21
Installing : zabbix-web-6.4.15-release1.el9.noarch 2/21
Running scriptlet: zabbix-web-6.4.15-release1.el9.noarch 2/21
Installing : php-bcmath-8.0.30-1.el9_2.x86_64 3/21
Installing : php-gd-8.0.30-1.el9_2.x86_64 4/21
Installing : php-ldap-8.0.30-1.el9_2.x86_64 5/21
Verifying : OpenIPMI-libs-2.0.32-3.0.1.el9.x86_64 1/21
Verifying : nginx-filesystem-1:1.20.1-14.0.2.el9_2.1.noarch 2/21
Verifying : php-bcmath-8.0.30-1.el9_2.x86_64 3/21
Verifying : php-common-8.0.30-1.el9_2.x86_64 4/21
Verifying : php-fpm-8.0.30-1.el9_2.x86_64 5/21
Installed:
OpenIPMI-libs-2.0.32-3.0.1.el9.x86_64 fping-5.1-1.el9.x86_64
nginx-filesystem-1:1.20.1-14.0.2.el9_2.1.noarch php-bcmath-8.0.30-1.el9_2.x86_64
php-common-8.0.30-1.el9_2.x86_64 php-fpm-8.0.30-1.el9_2.x86_64
zabbix-server-mysql-6.4.15-release1.el9.x86_64 zabbix-sql-scripts-6.4.15-release1.el9.noarch
zabbix-web-6.4.15-release1.el9.noarch zabbix-web-deps-6.4.15-release1.el9.noarch
zabbix-web-mysql-6.4.15-release1.el9.noarch
Complete!
Step 7: Login to the MySQL console by using the below command command
[root@linuxhelp ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.36 Source distribution
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Step 8: Create a database and set the character set and collation by using the below command
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
Query OK, 1 row affected (0.01 sec)
Step 9: Create a new Zabbix user and set a password by using the below command
mysql> create user 'zabbix'@'%' identified by 'password';
Query OK, 0 rows affected (0.03 sec)
Step 10: Grant all privileges on the Zabbix database to the Zabbix user by using the below command
mysql> grant all privileges on zabbix.* to 'zabbix'@'%';
Query OK, 0 rows affected (0.01 sec)
Step 11: Enable log_bin_trust_function_creators option by using the below command
mysql> set global log_bin_trust_function_creators = 1;
Query OK, 0 rows affected, 1 warning (0.00 sec)
Step 12: Now exit from MySQL console.
mysql> \q
Bye
Step 13: Import initial schema and data on Zabbix server host. You will be prompted to enter your newly created password by using the below command
[root@linuxhelp ~]# zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
Enter password:
Step 14: Again login to the MySQL console by using the below command
[root@linuxhelp ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.36 Source distribution
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Step 15: Disable log_bin_trust_function_creators option after importing database schema by using the below command
mysql> set global log_bin_trust_function_creators = 0;
Query OK, 0 rows affected, 1 warning (0.00 sec)
Step 16: Exit from MySQL console.
mysql> \q
Bye
Step 17: Now configure the database for Zabbix server. Add the password in the configuration file by using the below command
[root@linuxhelp ~]# vim /etc/zabbix/zabbix_server.conf
DBPassword=password
Step 18: Now restart and enable Zabbix services by using the below command
[root@linuxhelp ~]# systemctl restart zabbix-server.service zabbix-agent.service httpd.service
[root@linuxhelp ~]# systemctl enable zabbix-server.service zabbix-agent.service httpd.service
Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-server.service → /usr/lib/systemd/system/zabbix-server.service.
Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-agent.service → /usr/lib/systemd/system/zabbix-agent.service.
Step 19: Now open the browser and search with the following URL. http://localhost/zabbix
Step 20: Now the Zabbix setup page, has been appear. Click next step as shown in the below image.
Step 21: Here it checks for pre-requisites. Then click next step as shown in the below image.
Step 22: Need to configure Database here, by entering your password. Then click next step as shown in the below image.
Step 23: Set your server name here and click next step as shown in the below image.
Step 24: Now check the summary, then click next step as shown in the below image.
Step 25: Configuration has been completed. Now click finish button to complete setup as shown in the below image
Step 26: Now the login page will display. Enter Admin as username and Zabbix as password as shown in the below image.
Step 27: This is the dashboard page of Zabbix
Conclusion:
We have reached the end of this article. In this guide, we have walked you through the steps required to installation of Zabbix on Oracle Linux 9.3. Your feedback is much welcome.