Installation guides

Installing Zabbix on Debian

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 apt update
  1. Install Required Dependencies
    Install the required dependencies for Zabbix:
   sudo apt install -y wget gnupg2
  1. 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
  1. Update the Package Index Again
    Update the package index to include the Zabbix repository:
   sudo apt update
  1. Install Zabbix Server, Frontend, and Agent
    Install Zabbix server, frontend, and agent using the apt package manager:
   sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent
  1. Install MariaDB Server
    Install MariaDB server to use as the database for Zabbix:
   sudo apt install mariadb-server
  1. 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;
  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
  1. 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
  1. 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 Replace Europe/Riga with your appropriate timezone. Save and close the file.
  2. 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
  3. 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.
  4. 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”.
  5. 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