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 apt update
- Install Required Dependencies
Install the required dependencies for Zabbix:
sudo apt install -y wget gnupg2
- Add the Zabbix Repository
Download and install the Zabbix repository configuration package:
wget https://repo.zabbix.com/zabbix/5.4/debian/pool/main/z/zabbix-release/zabbix-release_5.4-1+debian$(lsb_release -cs)_all.deb
sudo dpkg -i zabbix-release_5.4-1+debian$(lsb_release -cs)_all.deb
- Update the Package Index Again
Update the package index to include the Zabbix repository:
sudo apt update
- Install Zabbix Server, Frontend, and Agent
Install Zabbix server, frontend, and agent using theapt
package manager:
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent
- Install MariaDB Server
Install MariaDB server to use as the database for Zabbix:
sudo apt install mariadb-server
- Configure MariaDB for Zabbix
Start and enable MariaDB:
sudo systemctl start mariadb
sudo systemctl enable mariadb
Secure the MariaDB installation:
sudo mysql_secure_installation
Create the Zabbix database and user:
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 the DBPassword
parameter to the password you set for the zabbix
MySQL user:
DBPassword=your_password
- Configure PHP for Zabbix Frontend
Edit the PHP configuration file for Zabbix:sudo nano /etc/zabbix/apache.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 apache2 sudo systemctl enable zabbix-server zabbix-agent apache2
- 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.