Step-by-Step Guide
- 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
- Install Required Dependencies
Install the required dependencies for Zabbix:
sudo yum install -y wget gnupg2
- 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
- Update the Package Index Again
Update the package index to include the Zabbix repository:
sudo yum update -y
- Install Zabbix Server, Frontend, and Agent
Install Zabbix server, frontend, and agent using theyum
package manager:
sudo yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent -y
- Install MariaDB Server
Install MariaDB server to use as the database for Zabbix:
sudo yum install mariadb-server -y
- Start and Enable MariaDB
Start and enable the MariaDB service:
sudo systemctl start mariadb
sudo systemctl enable mariadb
- 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.
- 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;
- 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
- Configure Zabbix Server
Edit the Zabbix server configuration file:sudo nano /etc/zabbix/zabbix_server.conf
Set theDBPassword
parameter to the password you set for thezabbix
MySQL user:DBPassword=your_password
- 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
ReplaceEurope/Riga
with your appropriate timezone. Save and close the file. - 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
- Access the Zabbix Web Interface
Open your web browser and navigate tohttp://your_server_ip/zabbix
. You should see the Zabbix frontend installation wizard. - 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”.
- Log In to Zabbix
The default username isAdmin
and the password iszabbix
. Log in and start configuring your Zabbix server.