How to Install Zabbix Server (Step-by-Step Guide)

In this guide, we'll walk through the installation of Zabbix Server. 

The Zabbix server version we will be installing is 7.4 and we will be installing it on Debian 12 system.

Download the Zabbix Repository Package

Visit the Zabbix download page and select your desired versions


Install the repository package

wget https://repo.zabbix.com/zabbix/7.4/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.4+debian12_all.deb

sudo dpkg -i zabbix-release_latest_7.4+debian12_all.deb

sudo apt update

Install Zabbix Server Components

Install the Zabbix server, frontend, agent, Apache configuration, and MySQL support:

sudo apt install -y zabbix-server-mysql 
zabbix-frontend-php \
zabbix-apache-conf \
zabbix-sql-scripts \
zabbix-agent

Install MySQL Server

sudo apt install -y mysql-server

Secure the installation:

sudo mysql_secure_installation

Create the Zabbix Database

Log in to MySQL:

sudo mysql

Create the database and user:

CREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;

CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'StrongPasswordHere';

GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';

FLUSH PRIVILEGES;

EXIT;

Import the initial database schema

Import the Zabbix database structure:

zcat /usr/share/zabbix/sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix

Enter the password created in the previous step when prompted.

Depending on your server performance, this may take several minutes.


Configure Zabbix Server

Edit the server configuration:

sudo nano /etc/zabbix/zabbix_server.conf

Locate and update:

DBPassword=StrongPasswordHere

Save and exit.

Configure System Locale

Zabbix requires a valid UTF-8 locale.

Check available locales:

locale -a

If the required locale is missing:

sudo dpkg-reconfigure locales

Select the required locale, such as:

en_US.UTF-8

Finish the configuration and allow Debian to generate the locale files.

Start and Enable Services

Enable Zabbix, Apache, and Agent services:

sudo systemctl restart zabbix-server zabbix-agent apache2

sudo systemctl enable zabbix-server zabbix-agent apache2

Verify service status:

systemctl status zabbix-server



Complete the Web Installation Wizard Open your browser and navigate to: http://<server-ip>/zabbix Follow the installation wizard: Verify all prerequisites pass.

Enter database connection details.

Confirm server settings.




Complete the installation.


Once installation is complete, log in using:

Username: Admin
Password: zabbix


0 Comments