国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Table of Contents
Prerequisites
Step 1: Install LAMP in Rocky/Alma Linux
Installing Apache in Rocky/Alma Linux
Installing MariaDB in Rocky/Alma Linux
Installing PHP in Rocky/Alma Linux
Step 2: Install Zabbix in Rocky/Alma Linux
Step 3: Configure PHP-FPM in Rocky/Alma Linux
Step 4: Configure SELinux & Firewall in Rocky/Alma Linux
Step 5: Complete Zabbix Installation in Rocky/Alma Linux
Home System Tutorial LINUX How to Install Zabbix on Rocky Linux and AlmaLinux

How to Install Zabbix on Rocky Linux and AlmaLinux

Jul 07, 2025 am 09:09 AM

Proper monitoring is an essential ingredient for the effective management of your overall IT infrastructure. A robust real-time monitoring solution provides detailed visibility of your network and application performance.

It helps to identify actual moments when errors and incidents occur and sends alerts. By doing so, operation teams can take intervention measures in a timely fashion and ensure business continuity in the shortest time possible.

This helps you make the most of your IT resources and, in turn, maximize your revenue. As such, one cannot undermine the importance of investing in an efficient and reliable monitoring tool.

Zabbix is a free and open-source enterprise-grade monitoring tool that is used for monitoring your entire IT infrastructure. It can monitor anything including network devices, servers (cloud and on-premise) applications, databases, and even docker containers. It also detects errors and sends alerts to enable prompt action by IT teams to resolve the problem.

In this guide, we will focus on the installation of the Zabbix monitoring tool on Rocky Linux / AlmaLinux. At the time of writing this guide, the latest version of Zabbix is Zabbix 6.0 pre-release.

Prerequisites

For this guide, this is what you need to have:

  • An instance of Rocky Linux with SSH access.
  • An instance of Alma Linux with SSH access.
  • A sudo user configured for performing privileged tasks.

Step 1: Install LAMP in Rocky/Alma Linux

Zabbix is a monitoring application that is driven by PHP on the frontend and Java & C in the backend. It also requires a relational database to collect and store its data. As such we need to install a hosting stack on which we will install Zabbix.

LAMP, short for Linux, Apache, MariaDB/MySQL, and PHP is a big household name in developer circles. It comprises the Apache webserver, MariaDB or MySQL (relational databases), and PHP which is a server-side scripting engine.

Installing Apache in Rocky/Alma Linux

We will start off by installing the Apache webserver. To do so, execute the command:

$ sudo dnf install @httpd

Once installed, start Apache and enable it to run on system startup.

$ sudo systemctl start httpd
$ sudo systemctl enable httpd

To verify that Apache is running, execute the command:

$ sudo systemctl status httpd

How to Install Zabbix on Rocky Linux and AlmaLinux

The output confirms that Apache is installed and running as expected.

Installing MariaDB in Rocky/Alma Linux

As mentioned earlier, Zabbix requires a relational database to store all of its data. We have chosen to install MariaDB given its reliability and numerous security and performance enhancements it provides.

The latest version of Zabbix requires MariaDB version 10.5 to function as expected. To get started, you need to enable the MariaDB YUM repository.

So, create a repository file:

$ sudo vim  /etc/yum.repos.d/mariadb.repo

Paste the following lines.

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/rhel8-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
module_hotfixes=1

Save the changes and exit the configuration file.

Next, import the MariaDB GPG signing key:

$ sudo --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

Finally, to install the MariaDB server and client, run the command:

$ sudo dnf install MariaDB-server MariaDB-client

When the installation is complete, start the MariaDB server and enable it so that it starts automatically on boot.

$ sudo systemctl start mariadb
$ sudo systemctl enable mariadb

Confirm that the database server is running:

$ sudo systemctl status mariadb

How to Install Zabbix on Rocky Linux and AlmaLinux

To confirm the version of MariaDB installed, run the command:

$ mysql -V

Alternatively, you can log in to the database server as follows.

$ sudo mysql -u root -p

The version of MariaDB will be printed on the welcome message.

How to Install Zabbix on Rocky Linux and AlmaLinux

Typically, MariaDB’s settings are not configured to the required security recommendations. Thankfully, MariaDB provides the mysql_secure_installation script for enhancing the security of the database server.

So, execute the script as shown.

$ sudo mysql_secure_installation

You will be required to perform a list of tasks. First, switch to the UNIX socket authentication plugin.

How to Install Zabbix on Rocky Linux and AlmaLinux

For the remaining prompts, type 'Y' and hit ENTER. This allows you to remove anonymous users, disallow remote users from logging in as root and remove the test database which can be exploited by hackers. Then finally reload privilege tables to save changes.

How to Install Zabbix on Rocky Linux and AlmaLinux

The UNIX_socket authentication plugin allows the root user to log in to the database server without a password. To enable MariaDB password authentication, log in to MariaDB:

$ sudo mysql -u root -p

Then set the root password as follows.

set password = password("<strong>yourpassword</strong>");

To switch from UNIX socket authentication to mysql_native_password authentication, run the command

ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD("<strong>yourpassword</strong>");

Now every time you login back in, you will be required to provide a password.

Installing PHP in Rocky/Alma Linux

The last component of the LAMP stack to install is PHP. This is provided in the default AppStream repositories. You can verify this as follows:

$ sudo dnf module list PHP

By default, PHP 7.2 is enabled by default. We need to change this to PHP 7.4.

$ sudo dnf module reset php
$ sudo dnf module install php:7.4

Next, install the required PHP modules for Zabbix installation.

$ sudo dnf install php php-curl php-fpm php-mysqlnd

To check the version of PHP, run.

$ php -v

How to Install Zabbix on Rocky Linux and AlmaLinux

We have installed PHP-FPM (FastCGI Process Manager) service which is a popular alternative implementation of PHP FastCGI.

Start and enable it on boot time.

$ sudo systemctl start php-fpm
$ sudo systemctl enable php-fpm

Then verify its status.

$ sudo systemctl status php-fpm

How to Install Zabbix on Rocky Linux and AlmaLinux

At this point, we have successfully installed the LAMP stack. In subsequent steps, will delve into the installation of Zabbix.

Step 2: Install Zabbix in Rocky/Alma Linux

With the LAMP stack in place, Let’s now install Zabbix by installing the Zabbix repository.

$ sudo rpm -Uvh https://repo.zabbix.com/zabbix/5.5/rhel/8/x86_64/zabbix-release-5.5-1.el8.noarch.rpm

Once the repository is installed, install the Zabbix server, Zabbix agent, and the associated Zabbix packages as follows.

$ sudo dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent

When the installation is complete, you need to create a Zabbix database and a database user that Zabbix will use to access the database.

$ sudo mysql -u root -p
CREATE USER zabbix_user@localhost IDENTIFIED BY '<strong>P@ssword321</strong>';

Then grant permissions to the database user to execute all tasks on the database.

GRANT ALL PRIVILEGES ON zabbix_db.* TO zabbix_user@localhost;

Then effect the changes and exit the database server

FLUSH PRIVILEGES;
EXIT;

How to Install Zabbix on Rocky Linux and AlmaLinux

Next, import the database schema:

$ sudo zcat /usr/share/doc/zabbix-sql-scripts/mysql/create.sql.gz | mysql -u zabbix_user -p zabbix_db

When prompted for a password, provide the Zabbix user’s password and not the root account’s password.

Additionally, edit the Zabbix configuration file

$ sudo vim /etc/zabbix/zabbix_server.conf

Ensure that the DBName, DBUser, DBPassword values reflect the values you provided for your database

DBHost=localhost
DBName=zabbix_db
DBUser=zabbix_user
DBPassword=P@ssword321

Save the changes and exit the configuration file.

Step 3: Configure PHP-FPM in Rocky/Alma Linux

Next, some additional configuration is needed for the PHP-FPM service. Edit the www.conf configuration file.

$ sudo vim /etc/php-fpm.d/www.conf 

Ensure that the following lines appear as they are.

listen = /run/php-fpm/www.sock
 
user = apache
group = apache

listen.allowed_clients = 0.0.0.0
listen.owner = apache
listen.group = apache
listen.mode = 0660
pm = dynamic

Save the changes and exit the file.

Additionally, specify the timezone setting in the Zabbix.conf configuration file.

$ sudo vim /etc/php-fpm.d/zabbix.conf

Add the line shown.

php_value[date.timezone] = Africa/Nairobi

Save and exit.

To apply all the changes made, restart all the services as shown

$ sudo systemctl restart zabbix-server zabbix-agent httpd php-fpm

Additionally, consider enabling them on startup.

$ sudo systemctl enable zabbix-server zabbix-agent httpd php-fpm

Step 4: Configure SELinux & Firewall in Rocky/Alma Linux

You need to set SELinux to permissive in order to access the frontend from a browser. To do that, run the command:

$ sudo sed -i 's/SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config

Next, head over to the firewall and allow HTTP service along with ports 10050 and 10051 which Zabbix server and agent listen on.

$ sudo firewall-cmd --add-port=80/tcp --permanent
$ sudo firewall-cmd --add-port={10050,10051}/tcp --permanent
$ sudo firewall-cmd --reload

Step 5: Complete Zabbix Installation in Rocky/Alma Linux

Lastly, launch your browser, and go to the URL shown

http://server-ip/zabbix

The first page that greets you is the Zabbix welcome page that boldly displays the version you are installing. Select the installation language and click on the ‘Next step’ button.

How to Install Zabbix on Rocky Linux and AlmaLinux

In the list of prerequisites, scroll all the way down and ensure all the prerequisites get the ‘OK’ label in the last column. It’s mandatory that all the requirements are satisfied. Then hit the ‘Next step’ button.

How to Install Zabbix on Rocky Linux and AlmaLinux

On the ‘Configure DB Connection’ page. Fill out your database details. For the database port, leave it at 0. The press ‘Next step’.

How to Install Zabbix on Rocky Linux and AlmaLinux

Then specify your server’s name, confirm your time zone and feel free to select your preferred theme. Then press ‘Next step’.

How to Install Zabbix on Rocky Linux and AlmaLinux

Confirm all the settings and if all looks well, press on ‘Next step’ to finalize the installation.

How to Install Zabbix on Rocky Linux and AlmaLinux

If all the settings you provided are correct, you will get a congratulatory message notifying you of the successful setup of Zabbix’s front end. Press on the ‘Finish’ button.

How to Install Zabbix on Rocky Linux and AlmaLinux

This directs you to the Zabbix login page. Log in with the following credentials:

Admin:	Admin
Password:   zabbix

Then click on ‘Sign in’ to access the Zabbix dashboard. You can change the password later for added security, so don’t worry about that.

How to Install Zabbix on Rocky Linux and AlmaLinux

Finally, you will get access to Zabbix’s dashboard.

How to Install Zabbix on Rocky Linux and AlmaLinux

And there you have it. We have successfully installed the Zabbix monitoring tool on Rocky Linux / AlmaLinux.

The above is the detailed content of How to Install Zabbix on Rocky Linux and AlmaLinux. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1502
276
How to troubleshoot DNS issues on a Linux machine? How to troubleshoot DNS issues on a Linux machine? Jul 07, 2025 am 12:35 AM

When encountering DNS problems, first check the /etc/resolv.conf file to see if the correct nameserver is configured; secondly, you can manually add public DNS such as 8.8.8.8 for testing; then use nslookup and dig commands to verify whether DNS resolution is normal. If these tools are not installed, you can first install the dnsutils or bind-utils package; then check the systemd-resolved service status and configuration file /etc/systemd/resolved.conf, and set DNS and FallbackDNS as needed and restart the service; finally check the network interface status and firewall rules, confirm that port 53 is not

Install Guacamole for Remote Linux/Windows Access in Ubuntu Install Guacamole for Remote Linux/Windows Access in Ubuntu Jul 08, 2025 am 09:58 AM

As a system administrator, you may find yourself (today or in the future) working in an environment where Windows and Linux coexist. It is no secret that some big companies prefer (or have to) run some of their production services in Windows boxes an

How to Install NodeJS 14 / 16 & NPM on Rocky Linux 8 How to Install NodeJS 14 / 16 & NPM on Rocky Linux 8 Jul 13, 2025 am 09:09 AM

Built on Chrome’s V8 engine, Node.JS is an open-source, event-driven JavaScript runtime environment crafted for building scalable applications and backend APIs. NodeJS is known for being lightweight and efficient due to its non-blocking I/O model and

How to find my private and public IP address in Linux? How to find my private and public IP address in Linux? Jul 09, 2025 am 12:37 AM

In Linux systems, 1. Use ipa or hostname-I command to view private IP; 2. Use curlifconfig.me or curlipinfo.io/ip to obtain public IP; 3. The desktop version can view private IP through system settings, and the browser can access specific websites to view public IP; 4. Common commands can be set as aliases for quick call. These methods are simple and practical, suitable for IP viewing needs in different scenarios.

System requirements to install linux System requirements to install linux Jul 20, 2025 am 03:49 AM

Linuxcanrunonmodesthardwarewithspecificminimumrequirements.A1GHzprocessor(x86orx86_64)isneeded,withadual-coreCPUrecommended.RAMshouldbeatleast512MBforcommand-lineuseor2GBfordesktopenvironments.Diskspacerequiresaminimumof5–10GB,though25GBisbetterforad

How to Install MySQL 8.0 on Rocky Linux and AlmaLinux How to Install MySQL 8.0 on Rocky Linux and AlmaLinux Jul 12, 2025 am 09:21 AM

Written in C, MySQL is an open-source, cross-platform, and one of the most widely used Relational Database Management Systems (RDMS). It’s an integral part of the LAMP stack and is a popular database management system in web hosting, data analytics,

Ubuntu 25.04 'Plucky Puffin”: A Bold Leap Forward with GNOME 48 and HDR Brilliance Ubuntu 25.04 'Plucky Puffin”: A Bold Leap Forward with GNOME 48 and HDR Brilliance Jul 12, 2025 am 09:28 AM

Ubuntu has long stood as a bastion of accessibility, polish, and power in the Linux ecosystem. With the arrival of Ubuntu 25.04, codenamed “Plucky Puffin”, Canonical has once again demonstrated its commitment to delivering a

How to Install MongoDB on Rocky Linux and AlmaLinux How to Install MongoDB on Rocky Linux and AlmaLinux Jul 12, 2025 am 09:29 AM

MongoDB is a high-performance, highly scalable document-oriented NoSQL database built to manage heavy traffic and vast amounts of data. Unlike traditional SQL databases that store data in rows and columns within tables, MongoDB structures data in a J

See all articles