How to Install Zabbix Server on CentOS 8

Install Zabbix Server on CentOS 8

In this article, we will have explained the necessary steps to install and configure Zabbix Server on CentOS 8. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Zabbix is a free and open-source monitoring solution designed for real-time monitoring of servers, virtual machines, networks, and cloud services. It was developed by Alexei Vladishev and actively supported by Zabbix SIA. It is based on the client-server model and capable of monitoring millions of metrics, such as CPU load, network utilization, and disk space consumption from tens of thousands of servers.

Install Zabbix Server on CentOS

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

sudo dnf update

Step 2. Install the LAMP stack on CentOS.

It is assumed that you have already installed the LAMP stack on CentOS 8. If not, please check out the following tutorial:

Once the Database server is installed, you need to create a database for Zabbix user:

$ mysql -u root -p
GRANT ALL PRIVILEGES ON zabbix.* TO [email protected]'localhost' IDENTIFIED BY 'StrongPassword';

Step 3. Install Zabbix.

Zabbix packages are not available in the base OS repository. So, to get Zabbix packages, we need to install the Zabbix repository configuration package:

sudo dnf install

Then install Zabbix server packages on CentOS:

sudo dnf install zabbix-server-mysql zabbix-agent zabbix-web-mysql

Step 4. Configure Zabbix Server.

Now we edit the Zabbix configuration file /etc/zabbix/zabbix_server.conf and set the database name, user and password:

nano /etc/zabbix/zabbix_server.conf

Finally, start and set Zabbix services to start at boot:

sudo systemctl enable --now zabbix-server zabbix-agent

Step 5. Configure Firewall for Zabbix.

Configure the firewall to allow the Zabbix agent to reach the Zabbix server:

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

Step 5. Accessing Zabbix.

That’s it. It is time to use your favorite web browser and navigate to:

Install Zabbix Server on CentOS 8

Congratulation, you have learned how to install and configure Zabbix Server on CentOS 8. If you have any questions, please leave a comment below.