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 a Debian 12 system.

Download the Zabbix Repository Package

Visit the Zabbix download page and select your desired version, operating system, and database options.

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, SQL scripts, 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 MySQL 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 file:

sudo nano /etc/zabbix/zabbix_server.conf

Locate and update the database password:

DBPassword=StrongPasswordHere

Configure System Locale

Zabbix requires a valid UTF-8 locale. Check the available locales:

locale -a

If the required locale is missing, run:

sudo dpkg-reconfigure locales

Select the required locale, such as:

en_US.UTF-8

Start and Enable Services

Restart and enable the Zabbix Server, Zabbix Agent, and Apache services:

sudo systemctl restart zabbix-server zabbix-agent apache2 sudo systemctl enable zabbix-server zabbix-agent apache2

Verify the Zabbix Server status:

systemctl status zabbix-server

Complete the Web Installation Wizard

Open your browser and navigate to:

http://<server-ip>/zabbix

Follow the installation wizard and verify that all prerequisites pass.

Enter the database connection details.

Confirm the server settings.

Complete the installation.

Once installation is complete, log in using the default credentials:

Username: Admin Password: zabbix

#monitoring #zabbix

0 Comments