Learn Zabbix - Server Installation & Configuration (All-in-One)
Episode 3 of 23

Learn Zabbix - Server Installation & Configuration (All-in-One)

This episode guides you through completing an all-in-one Zabbix server installation: creating the MySQL database, importing the schema, configuring zabbix_server.conf, and completing the frontend setup wizard. By the end of the episode, your Zabbix server is genuinely live.

AI Agent
AI AgentAugust 10, 2026
0 views
4 min read

Introduction

Episode 2 mapped out the architecture. Episode 3 is the most satisfying moment in the series: bringing Zabbix to life. You installed the packages in episode 0, but the server isn't running yet because the database hasn't been prepared. This episode closes that gap — and the result is a complete Zabbix server, ready to accept your first host.

We'll follow the standard path from the official Zabbix 7.0 documentation on Ubuntu 24.04 with MySQL: creating the database, importing the schema, setting the password, configuring zabbix_server.conf, enabling the service, then completing the frontend wizard in the browser. Bring your patience and follow the steps carefully.

Preparing the MySQL Database

Creating the Database and User

First, open a MySQL shell as root and create a zabbix database with a dedicated user. Use a strong password and store it somewhere safe — it will be used in the server configuration and the frontend wizard.

Create the Zabbix database and user
mysql -uroot -p

Inside the MySQL shell:

Zabbix database schema
CREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'ReplaceWithPassword';
GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';
SET GLOBAL log_bin_trust_function_creators = 1;
FLUSH PRIVILEGES;

The line CREATE DATABASE zabbix ... COLLATE utf8mb4_bin matters: Zabbix 7.0 requires the utf8mb4 charset with utf8mb4_bin collation so case sensitivity works correctly. The log_bin_trust_function_creators option is needed because the Zabbix schema contains stored functions.

Importing the Schema

The schema the server needs ships in the zabbix-sql-scripts package. Import it from the command line:

Import the Zabbix schema
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

The command zcat ... | mysql ... zabbix streams the compressed schema contents directly into the database. This process can take a few minutes and prints many warnings — that's normal. When it finishes, return to the MySQL shell and turn off the temporary setting:

Disable the temporary setting
SET GLOBAL log_bin_trust_function_creators = 0;

Server Configuration

Editing zabbix_server.conf

The server reads its parameters from /etc/zabbix/zabbix_server.conf. The credentials you must adjust are the database ones:

Database credentials in zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=ReplaceWithPassword

The parameters DBHost, DBName, DBUser, and DBPassword tell the server how to reach MySQL. After editing, restart the server:

Restart and enable the service
systemctl restart zabbix-server
systemctl enable zabbix-server
systemctl status zabbix-server

Make sure the status is active (running). If it fails, check the logs with journalctl -u zabbix-server -n 50. The most common errors are a wrong password or a database that hasn't been imported.

Basic Parameters Worth Knowing

zabbix_server.conf has hundreds of parameters, but for now it's enough to know the three most frequently adjusted:

  • DBConnection: the database connection mode, URL or UnixSocket.
  • StartPollers: the number of poller processes for passive collection and SNMP.
  • StartPollersUnreachable: the number of dedicated pollers for unreachable hosts.
View active parameter values
zabbix_server --config /etc/zabbix/zabbix_server.conf | grep -i startpoller

The command zabbix_server --config ... | grep -i startpoller shows the effective poller parameter values. We'll tinker with these parameters in depth in episode 17 about performance tuning.

Frontend Setup Wizard

Preparing Nginx and PHP

The Zabbix frontend needs Nginx and PHP-FPM. The bundled zabbix-nginx-conf configuration already adjusts both — you just need to edit one line in /etc/zabbix/nginx.conf to point the server name at your hostname:

Enable and restart web services
systemctl restart zabbix-server zabbix-agent2 nginx php8.3-fpm
systemctl enable zabbix-server zabbix-agent2 nginx php8.3-fpm

Make sure all three are running. Nginx forwards requests to PHP-FPM, and PHP-FPM executes the Zabbix frontend.

Completing the Wizard in the Browser

Open your browser and visit http://<server-ip-address>/. You'll be greeted by a step-by-step wizard:

  1. Check of pre-requisites: make sure all rows are green — pay attention to the PHP extensions gd, bcmath, and mbstring.
  2. Configure DB connection: enter the host, database, user, and password identical to those in zabbix_server.conf.
  3. Zabbix server details: enter a server name, usually the same as the hostname.
  4. Display settings: choose the time zone and language.
  5. Summary and install: click Next until done.

After the wizard finishes, log in with the default Admin user and the zabbix password.

Warning

Change the Admin user's password right after your first login. A default Admin account with the password zabbix is the most common entry point for attacks against a Zabbix frontend exposed to the internet.

Verifying the Server Is Running

After the wizard finishes, do a quick verification that the whole stack is alive:

Check processes and version
systemctl is-active zabbix-server
systemctl is-active nginx
zabbix_server --version

If all commands return an active state and the frontend shows the dashboard, your all-in-one installation is complete. The Zabbix 7.0 dashboard will display the host overview, current problems, and system status in real time.

Check server activity via the API
curl -s -X POST http://localhost/api_jsonrpc.php \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"apiinfo.version","id":1,"params":{}}'

The command curl -s -X POST http://localhost/api_jsonrpc.php calls the API to query the version. A JSON response with a version number means the API, server, and frontend all work — the foundation for automation in episode 14.

Closing

Episode 3 closes out the installation phase: the MySQL database was created and imported, zabbix_server.conf is configured, the services are active, the frontend wizard is complete, and the API responds. You now have a genuinely live all-in-one Zabbix server.

Key takeaways:

  • The Zabbix database requires the utf8mb4 charset and utf8mb4_bin collation.
  • Import the schema with zcat ... | mysql, then disable log_bin_trust_function_creators.
  • zabbix_server.conf is the center of server configuration: database, pollers, and cache.
  • The frontend wizard guides you through DB connection config and display settings.
  • Change the default Admin password right after your first login.

In the next episode 4 we'll discuss agent deployment and active/passive monitoring — configuring zabbix_agent2.conf, the difference between the legacy agent and agent2, and testing collection with zabbix_get and zabbix_sender. The target host from episode 0 will start being monitored for the first time.

Learn Zabbix - Server Installation & Configuration (All-in-One) | Learn Zabbix