You can get the very latest version of Zabbix by compiling it from the sources.
A step-by-step tutorial for installing Zabbix from the sources is provided here.
Go to the Zabbix download page and download the source archive. Once downloaded, extract the sources, by running:
$ tar -zxvf zabbix-5.2.0.tar.gz
For all of the Zabbix daemon processes, an unprivileged user is required. If a Zabbix daemon is started from an unprivileged user account, it will run as that user.
However, if a daemon is started from a 'root' account, it will switch to a 'zabbix' user account, which must be present. To create such a user account (in its own group, “zabbix”),
on a RedHat-based system, run:
groupadd --system zabbix useradd --system -g zabbix -d /usr/lib/zabbix -s /sbin/nologin -c "Zabbix Monitoring System" zabbix
on a Debian-based system, run:
addgroup --system --quiet zabbix adduser --quiet --system --disabled-login --ingroup zabbix --home /var/lib/zabbix --no-create-home zabbix
$HOME/.my.cnf) you are free to create it using the following commands.
On RedHat-based systems, run:
mkdir -m u=rwx,g=rwx,o= -p /usr/lib/zabbix chown zabbix:zabbix /usr/lib/zabbix
On Debian-based systems, run:
mkdir -m u=rwx,g=rwx,o= -p /var/lib/zabbix chown zabbix:zabbix /var/lib/zabbix
A separate user account is not required for Zabbix frontend installation.
If Zabbix server and agent are run on the same machine it is recommended to use a different user for running the server than for running the agent. Otherwise, if both are run as the same user, the agent can access the server configuration file and any Admin level user in Zabbix can quite easily retrieve, for example, the database password.
bin, or any other account with special rights is a security risk.
SQL scripts are provided for creating database schema and inserting the dataset. Zabbix proxy database needs only the schema while Zabbix server database requires also the dataset on top of the schema.
Having created a Zabbix database, proceed to the following steps of compiling Zabbix.
When configuring the sources for a Zabbix server or proxy, you must specify the database type to be used. Only one database type can be compiled with a server or proxy process at a time.
To see all of the supported configuration options, inside the extracted Zabbix source directory run:
To configure the sources for a Zabbix server and agent, you may run something like:
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
To configure the sources for a Zabbix server (with PostgreSQL etc.), you may run:
./configure --enable-server --with-postgresql --with-net-snmp
To configure the sources for a Zabbix proxy (with SQLite etc.), you may run:
./configure --prefix=/usr --enable-proxy --with-net-snmp --with-sqlite3 --with-ssh2
To configure the sources for a Zabbix agent, you may run:
or, for Zabbix agent 2:
Notes on compilation options:
config.logfile for more details on the error. For example, if
libsslis missing, the immediate error message may be misleading:
checking for main in -lmysqlclient... no configure: error: Not found mysqlclient library
config.log has a more detailed description:
/usr/bin/ld: cannot find -lssl /usr/bin/ld: cannot find -lcrypto
$ make dbschema
This step should be run as a user with sufficient permissions (commonly 'root', or by using
make install will by default install the daemon binaries (zabbix_server, zabbix_agentd, zabbix_proxy) in /usr/local/sbin and the client binaries (zabbix_get, zabbix_sender) in /usr/local/bin.
You need to configure this file for every host with zabbix_agentd installed.
You must specify the Zabbix server IP address in the file. Connections from other hosts will be denied.
You must specify the database name, user and password (if using any).
The rest of the parameters will suit you with their defaults if you have a small installation (up to ten monitored hosts). You should change the default parameters if you want to maximize the performance of Zabbix server (or proxy) though. See the performance tuning section for more details.
You must specify the server IP address and proxy hostname (must be known to the server), as well as the database name, user and password (if using any).
Run zabbix_server on the server side.
Run zabbix_agentd on all the monitored machines.
If you have installed Zabbix proxy, run zabbix_proxy.
Zabbix frontend is written in PHP, so to run it a PHP supported webserver is needed. Installation is done by simply copying the PHP files from the ui directory to the webserver HTML documents directory.
Common locations of HTML documents directories for Apache web servers include:
It is suggested to use a subdirectory instead of the HTML root. To create a subdirectory and copy Zabbix frontend files into it, execute the following commands, replacing the actual directory:
mkdir <htdocs>/zabbix cd ui cp -a . <htdocs>/zabbix
If installing from Zabbix Git repository and planning to use any other language than English, you must generate translation files. To do so, run:
msgfmt utility from gettext package is required.
In your browser, open Zabbix URL: http://<server_ip_or_name>/zabbix
You should see the first screen of the frontend installation wizard. Use the Default language drop-down menu to change system default language and continue the installation process in the selected language (optional).
Make sure that all software prerequisites are met.
|PHP memory_limit option||128MB||In php.ini:
memory_limit = 128M
|PHP post_max_size option||16MB||In php.ini:
post_max_size = 16M
|PHP upload_max_filesize option||2MB||In php.ini:
upload_max_filesize = 2M
|PHP max_execution_time option||300 seconds (values 0 and -1 are allowed)||In php.ini:
max_execution_time = 300
|PHP max_input_time option||300 seconds (values 0 and -1 are allowed)||In php.ini:
max_input_time = 300
|PHP session.auto_start option||must be disabled||In php.ini:
session.auto_start = 0
|Database support||One of: MySQL, Oracle, PostgreSQL.||One of the following modules must be installed:
mysql, oci8, pgsql
|PHP mbstring.func_overload option||must be disabled||In php.ini:
mbstring.func_overload = 0
|sockets||php-net-socket. Required for user script support.|
|gd||2.0.28||php-gd. PHP GD extension must support PNG images (--with-png-dir), JPEG (--with-jpeg-dir) images and FreeType 2 (--with-freetype-dir).|
Since Zabbix 2.2.1, the PHP gettext extension is not a mandatory requirement for installing Zabbix. If gettext is not installed, the frontend will work as usual, however, the translations will not be available.
Optional pre-requisites may also be present in the list. A failed optional prerequisite is displayed in orange and has a Warning status. With a failed optional pre-requisite, the setup may continue.
Enter details for connecting to the database. Zabbix database must already be created.
If the TLS encryption option is checked, then five additional fields for configuring the TLS connection to the database appear in the form (MySQL or PostgreSQL only).
Enter Zabbix server details.
Entering a name for Zabbix server is optional, however, if submitted, it will be displayed in the menu bar and page titles.
Set the default time zone and theme for the frontend.
Download the configuration file and place it under conf/ in the webserver HTML documents subdirectory where you copied Zabbix PHP files to.
Zabbix frontend is ready! The default user name is Admin, password zabbix.
Proceed to getting started with Zabbix.
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.
To install from sources, first download and extract the source archive.
To compile Java gateway, run the
./configure script with
--enable-java option. It is advisable that you specify the
--prefix option to request installation path other than the default /usr/local, because installing Java gateway will create a whole directory tree, not just a single executable.
$ ./configure --enable-java --prefix=$PREFIX
To compile and package Java gateway into a JAR file, run
make. Note that for this step you will need
jar executables in your path.
Now you have a zabbix-java-gateway-$VERSION.jar file in src/zabbix_java/bin. If you are comfortable with running Java gateway from src/zabbix_java in the distribution directory, then you can proceed to instructions for configuring and running Java gateway. Otherwise, make sure you have enough privileges and run
$ make install
Proceed to setup for more details on configuring and running Java gateway.