This is a translation of the original English documentation page. Help us make it better.

1 Red Hat Enterprise Linux

Overview

Official Zabbix 6.3 PRE-RELEASE packages for Red Hat Enterprise Linux and Oracle Linux are available on Zabbix website. Packages for Zabbix 6.4 will be available upon its release.

Packages are available with either MySQL/PostgreSQL database and Apache/Nginx web server support.

Zabbix agent packages and utilities Zabbix get and Zabbix sender are available on Zabbix Official Repository for RHEL 9, RHEL 8, RHEL 7, and RHEL 6.

Zabbix Official Repository provides fping, iksemel and libssh2 packages as well. These packages are located in the non-supported directory.

Notes on installation

See installation instructions per platform in the download page for:

  • installing the repository
  • installing server/agent/frontend
  • creating initial database, importing initial data
  • configuring database for Zabbix server
  • configuring PHP for Zabbix frontend
  • starting server/agent processes
  • configuring Zabbix frontend

If you want to run Zabbix agent as root, see Running agent as root.

Zabbix web service process, which is used for scheduled report generation, requires Google Chrome browser. The browser is not included into packages and has to be installed manually.

TimescaleDB使用時のデータのインポート

TimescaleDB使用時には、PostgreSQLのインポートコマンドに加えて、さらに以下のコマンドを実行します:

# cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb.sql | sudo -u zabbix psql zabbix

TimescaleDBは、Zabbixサーバーでのみサポートされています。

SELinuxの設定

Zabbixはソケットベースのプロセス間通信を使用します。SELinuxが有効なシステムでは、ZabbixがSocketDirディレクトリにUNIXドメインソケットを作成/使用するためのSELinuxのルールの追加が必要となる場合があります。現在、ソケットファイルは、サーバー(alerter、preprocessing、IPMI)とプロキシ(IPMI)で使用されています。ソケットファイルは永続的であり、プロセスの実行中には常に存在します。

SELinuxをenforcingモードで有効にした場合、次のコマンドを実行してZabbixのWebインターフェースとサーバー間の通信を有効にする必要があります:

RHEL 7以降:

# setsebool -P httpd_can_connect_zabbix on
       ネットワーク経由でデータベースにアクセスする場合(PostgreSQL'localhost'にアクセスする場合を含む)は、同様にZabbixのWebインターフェースからデータベースにアクセスできるようにする必要があります:
       # setsebool -P httpd_can_network_connect_db on

RHEL 7よりも前:

# setsebool -P httpd_can_network_connect on
       # setsebool -P zabbix_can_network on

WebインターフェースとSELinuxの設定変更後には、Apache Webサーバーを再起動してください:

# service httpd restart

In addition, Zabbix provides the zabbix-selinux-policy package as part of source RPM packages for RHEL 8 and RHEL 7. This package provides a basic default policy for SELinux and makes zabbix components work out-of-the-box by allowing Zabbix to create and use sockets and enabling httpd connection to PostgreSQL (used by frontend).

The source zabbix_policy.te file contains the following rules:

module zabbix_policy 1.2;
       
       require {
         type zabbix_t;
         type zabbix_port_t;
         type zabbix_var_run_t;
         type postgresql_port_t;
         type httpd_t;
         class tcp_socket name_connect;
         class sock_file { create unlink };
         class unix_stream_socket connectto;
       }
       
       #============= zabbix_t ==============
       allow zabbix_t self:unix_stream_socket connectto;
       allow zabbix_t zabbix_port_t:tcp_socket name_connect;
       allow zabbix_t zabbix_var_run_t:sock_file create;
       allow zabbix_t zabbix_var_run_t:sock_file unlink;
       allow httpd_t zabbix_port_t:tcp_socket name_connect;
       
       #============= httpd_t ==============
       allow httpd_t postgresql_port_t:tcp_socket name_connect;

This package has been created to prevent users from turning off SELinux because of the configuration complexity. It contains the default policy that is sufficient to speed up Zabbix deployment and configuration. For maximum security level, it is recommended to set custom SELinux settings.

プロキシのインストール

必要なリポジトリ情報が追加されていれば、以下を実行することでZabbixプロキシをインストールすることができます:

# dnf install zabbix-proxy-mysql zabbix-sql-scripts

コマンド内の'mysql'の部分を'pgsql'に変更してPostgreSQLを使用するか、'sqlite3'に変更してSQLite3 (プロキシのみ)を使用することができます。

パッケージ'zabbix-sql-scripts'には、ZabbixサーバーとZabbixプロキシの両方でサポートされているすべてのデータベース管理システムのデータベーススキーマが含まれていて、初期データのインポート時に使用されます。

データベースの作成

Zabbixプロキシ用のデータベースは分けて作成します。

ZabbixサーバーとZabbixプロキシは、同じデータベースを使用することができません。両者を同じホスト上にインストールする場合は、プロキシ用のデータベースは別の名前である必要があります。

データのインポート

初期のスキーマのインポートには以下を実行します:

# cat /usr/share/zabbix-sql-scripts/mysql/proxy.sql | mysql -uzabbix -p zabbix

PostgreSQL (またはSQLite)を使用するプロキシ用には以下を実行します:

# cat /usr/share/zabbix-sql-scripts/postgresql/proxy.sql | sudo -u zabbix psql zabbix
       # cat /usr/share/zabbix-sql-scripts/sqlite3/proxy.sql | sqlite3 zabbix.db
Zabbixプロキシ用のデータベース設定

zabbix_proxy.confを編集します:

# vi /etc/zabbix/zabbix_proxy.conf
       DBHost=localhost
       DBName=zabbix
       DBUser=zabbix
       DBPassword=<password>

Zabbixプロキシ用のDBNameは、Zabbixサーバーとは別のデータベースを使用します。

MySQLの場合は、DBPasswordにZabbix用データベースのパスワードを指定します。PostgreSQLの場合はPostgreSQL上のユーザーのパスワードを指定します。

PostgreSQLではDBHost=を使用します。デフォルト設定のDBHost=localhost (またはIPアドレス)をそのまま使用するのであれば、PostgreSQLはZabbixからネットワークソケットを使用して接続されます。手順についてはSELinuxの設定を参照してください。

Zabbixプロキシプロセスの起動

Zabbixプロキシプロセスを起動し、システムブート時に起動させるためには以下のように実行します:

# service zabbix-proxy start
       # systemctl enable zabbix-proxy
Webインターフェースの設定

Zabbixプロキシは、Webインターフェースを持ちません。Zabbixサーバーとのみ通信を行います。

Javaゲートウェイのインストール

JMXアプリケーションを監視したいときには、Javaゲートウェイをインストールすることが必要です。 Javaゲートウェイは軽量で、データベースを必要としません。

必要なリポジトリが追加されていたら、以下のように実行することでZabbix Javaゲートウェイをインストールすることができます:

# dnf install zabbix-java-gateway

Javaゲートウェイの設定の実行の詳細については設定を参照してください。

Installing debuginfo packages

Debuginfo packages are currently available for RHEL versions 9, 7, 6 and 5.

To enable debuginfo repository, edit /etc/yum.repos.d/zabbix.repo file. Change enabled=0 to enabled=1 for zabbix-debuginfo repository.

[zabbix-debuginfo]
       name=Zabbix Official Repository debuginfo - $basearch
       baseurl=http://repo.zabbix.com/zabbix/6.4/rhel/7/$basearch/debuginfo/
       enabled=0
       gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
       gpgcheck=1

This will allow you to install the zabbix-debuginfo package.

# yum install zabbix-debuginfo

This single package contains debug information for all binary Zabbix components.