Official Zabbix 4.0 LTS packages for Debian, Ubuntu, and Raspberry Pi OS (Raspbian) are available on Zabbix website.
Packages are available with either MySQL/PostgreSQL database and Apache web server support.
Install the repository configuration package. This package contains apt (software package manager) configuration files.
For Debian 10, run the following commands:
Note! For Debian 9, substitute 'buster' with 'stretch' in the commands. For Debian 8, substitute 'buster' with 'jessie' in the commands.
For Ubuntu 20.04 (focal), run the following commands:
For Raspbian, run the following commands:
To install Zabbix server with MySQL support:
To install Zabbix proxy with MySQL support:
To install Zabbix frontend:
Substitute 'mysql' in the commands with 'pgsql' to use PostgreSQL, or with 'sqlite3' to use SQLite3 (proxy only).
Separate databases are needed for Zabbix server and Zabbix proxy; they cannot use the same database. Therefore, if they are installed on the same host, their databases must be created with different names!
Now import initial schema and data for the server with MySQL:
You will be prompted to enter your newly created database password.
For proxy, import initial schema:
For proxy with PostgreSQL (or SQLite):
Edit zabbix_server.conf (and zabbix_proxy.conf) to use their respective databases. For example:
In DBPassword use Zabbix database password for MySQL; PostgreSQL user password for PostgreSQL.
DBHost= with PostgreSQL. You might want to keep the default setting
DBHost=localhost (or an IP address), but this would make PostgreSQL use a network socket for connecting to Zabbix. Refer to the respective section for RHEL/CentOS for instructions.
It's time to start Zabbix server process and make it start at system boot:
Substitute 'zabbix-server' with 'zabbix-proxy' to start Zabbix proxy process.
Refer to the respective section for RHEL/CentOS.
As frontend and SELinux configuration is done, you need to restart Apache web server:
Apache configuration file for Zabbix frontend is located in /etc/apache2/conf-enabled/zabbix.conf. Some PHP settings are already configured. But it's necessary to uncomment the "date.timezone" setting and set the right timezone for you.
Now you are ready to proceed with frontend installation steps which will allow you to access your newly installed Zabbix.
Note that a Zabbix proxy does not have a frontend; it communicates with Zabbix server only.
To install the agent, run
To start the agent, run:
If you want to run Zabbix agent as root, see here.
It is required to install Java gateway only if you want to monitor JMX applications. Java gateway is lightweight and does not require a database.
Once the required repository is added, you can install Zabbix Java gateway by running:
Proceed to setup for more details on configuring and running Java gateway.