Installation guides

Installing Zabbix on RHEL

Step-by-Step Guide

  1. Update the Package Index
    Open a terminal and update the package index to ensure you have the latest information about available packages:
   sudo yum update -y
  1. Install Required Dependencies
    Install the required dependencies for Zabbix:
   sudo yum install -y wget gnupg2
  1. Add the Zabbix Repository
    Download and install the Zabbix repository configuration package:
   sudo rpm -Uvh https://repo.zabbix.com/zabbix/5.4/rhel/7/x86_64/zabbix-release-5.4-1.el7.noarch.rpm
  1. Update the Package Index Again
    Update the package index to include the Zabbix repository:
   sudo yum update -y
  1. Install Zabbix Server, Frontend, and Agent
    Install Zabbix server, frontend, and agent using the yum package manager:
   sudo yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent -y
  1. Install MariaDB Server
    Install MariaDB server to use as the database for Zabbix:
   sudo yum install mariadb-server -y
  1. Start and Enable MariaDB
    Start and enable the MariaDB service:
   sudo systemctl start mariadb
   sudo systemctl enable mariadb
  1. Secure MariaDB Installation
    Run the security script that comes pre-installed with MariaDB to improve the security of your installation:
   sudo mysql_secure_installation

This script will prompt you to set a root password, remove anonymous users, disallow root login remotely, remove test databases, and reload the privilege tables. Follow the prompts and answer accordingly.

  1. Create the Zabbix Database and User
    Log in to the MariaDB root administrative account:
   sudo mysql -uroot -p

In the MariaDB shell, run the following commands:

   CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
   CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'your_password';
   GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';
   FLUSH PRIVILEGES;
   EXIT;
  1. Import Zabbix Database Schema
    Import the initial schema and data into the Zabbix database: zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
  2. Configure Zabbix Server
    Edit the Zabbix server configuration file: sudo nano /etc/zabbix/zabbix_server.conf Set the DBPassword parameter to the password you set for the zabbix MySQL user: DBPassword=your_password
  3. Configure PHP for Zabbix Frontend
    Edit the PHP configuration file for Zabbix: sudo nano /etc/httpd/conf.d/zabbix.conf Adjust the timezone setting to your local timezone: php_value date.timezone Europe/Riga Replace Europe/Riga with your appropriate timezone. Save and close the file.
  4. Start and Enable Zabbix Server and Agent
    Start and enable the Zabbix server and agent: sudo systemctl restart zabbix-server zabbix-agent httpd sudo systemctl enable zabbix-server zabbix-agent httpd
  5. Access the Zabbix Web Interface
    Open your web browser and navigate to http://your_server_ip/zabbix. You should see the Zabbix frontend installation wizard.
  6. Complete the Zabbix Setup Wizard
    Follow the instructions in the setup wizard:
    • Step 1: Welcome – Click “Next step”.
    • Step 2: Check of pre-requisites – Ensure all requirements are met, then click “Next step”.
    • Step 3: Configure DB connection – Enter the database details (User: zabbix, Password: your_password), then click “Next step”.
    • Step 4: Zabbix server details – Enter localhost for server, then click “Next step”.
    • Step 5: Pre-installation summary – Review the settings, then click “Next step”.
    • Step 6: Install – Click “Finish”.
  7. Log In to Zabbix
    The default username is Admin and the password is zabbix. Log in and start configuring your Zabbix server.
Other Recent Posts