Official Zabbix packages are available for:
Install the repository configuration package. This package contains yum (software package manager) configuration files.
SLES 15:
# rpm -Uvh --nosignature https://repo.zabbix.com/zabbix/5.0/sles/15/x86_64/zabbix-release-5.0-1.el15.noarch.rpm # zypper --gpg-auto-import-keys refresh 'Zabbix Official Repository'
SLES 12:
# rpm -Uvh --nosignature https://repo.zabbix.com/zabbix/5.0/sles/12/x86_64/zabbix-release-5.0-1.el12.noarch.rpm # zypper --gpg-auto-import-keys refresh 'Zabbix Official Repository'
To install Zabbix server/frontend/agent with MySQL support:
# zypper install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent
Substitute 'apache' in the command with 'nginx' if using the package for Nginx web server. See also: Nginx setup for Zabbix on SLES 12/15.
Substitute 'zabbix-agent' with 'zabbix-agent2' in these commands if using Zabbix agent 2 (only SLES 15 SP1+).
To install Zabbix proxy with MySQL support:
# zypper install zabbix-proxy-mysql
Substitute 'mysql' in the commands with 'pgsql' to use PostgreSQL.
For Zabbix server and proxy daemons a database is required. It is not needed to run Zabbix agent.
Create the database using the provided instructions for MySQL or PostgreSQL.
Now import initial schema and data for the server with MySQL:
# zcat /usr/share/doc/packages/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
You will be prompted to enter your newly created database password.
With PostgreSQL:
# zcat /usr/share/doc/packages/zabbix-server-pgsql*/create.sql.gz | sudo -u <username> psql zabbix
With TimescaleDB, in addition to the previous command, also run:
# zcat /usr/share/doc/packages/zabbix-server-pgsql*/timescaledb.sql.gz | sudo -u <username> psql zabbix
For proxy, import initial schema:
# zcat /usr/share/doc/packages/zabbix-proxy-mysql*/schema.sql.gz | mysql -uzabbix -p zabbix
For proxy with PostgreSQL:
# zcat /usr/share/doc/packages/zabbix-proxy-pgsql*/schema.sql.gz | sudo -u <username> psql zabbix
Edit /etc/zabbix/zabbix_server.conf (and zabbix_proxy.conf) to use their respective databases. For example:
# vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=<password>
In DBPassword use Zabbix database password for MySQL; PosgreSQL user password for PosgreSQL.
Use 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.
Depending on the web server used (Apache/Nginx) edit the corresponding configuration file for Zabbix frontend:
/etc/apache2/conf.d/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.php_value max_execution_time 300 php_value memory_limit 128M php_value post_max_size 16M php_value upload_max_filesize 2M php_value max_input_time 300 php_value max_input_vars 10000 php_value always_populate_raw_post_data -1 # php_value date.timezone Europe/Riga
/etc/nginx/conf.d/zabbix.conf. For Zabbix frontend to work, it's necessary to uncomment and set listen and/or server_name directives.# listen 80; # server_name example.com;
Its configuration file is located in /etc/php7/fpm/php-fpm.d/zabbix.conf. Some PHP settings are already configured. But it's necessary to set the right date.timezone setting for you.
php_value[max_execution_time] = 300 php_value[memory_limit] = 128M php_value[post_max_size] = 16M php_value[upload_max_filesize] = 2M php_value[max_input_time] = 300 php_value[max_input_vars] = 10000 ; php_value[date.timezone] = Europe/Riga
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.
Start Zabbix server and agent processes and make it start at system boot.
With Apache web server:
# systemctl restart zabbix-server zabbix-agent apache2 php-fpm # systemctl enable zabbix-server zabbix-agent apache2 php-fpm
Substitute 'apache2' with 'nginx' for Nginx web server.
To enable debuginfo repository edit /etc/zypp/repos.d/zabbix.repo file.
Change enabled=0 to enabled=1 for zabbix-debuginfo repository.
[zabbix-debuginfo] name=Zabbix Official Repository debuginfo type=rpm-md baseurl=http://repo.zabbix.com/zabbix/5.0/sles/15/x86_64/debuginfo/ gpgcheck=1 gpgkey=http://repo.zabbix.com/zabbix/5.0/sles/15/x86_64/debuginfo/repodata/repomd.xml.key enabled=0 update=1
This will allow you to install zabbix-<component>-debuginfo packages.