[comment]: # translation:outdated

[comment]: # ({83c2fbfb-83c2fbfb})
# 1 Red Hat Enterprise Linux/CentOS

[comment]: # ({/83c2fbfb-83c2fbfb})

[comment]: # ({a324317c-a324317c})
### Overview

Official Zabbix packages are available for:

|   |   |
|---|---|
|RHEL 8, CentOS 8 and Oracle Linux 8|[Download](https://www.zabbix.com/download?zabbix=5.0&os_distribution=red_hat_enterprise_linux&os_version=8&db=mysql)|
|RHEL 7, CentOS 7 and Oracle Linux 7|[Download](https://www.zabbix.com/download?zabbix=5.0&os_distribution=red_hat_enterprise_linux&os_version=7&db=mysql)|

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

::: noteclassic
 *Verify CA* [encryption
mode](/manual/appendix/install/db_encrypt/mysql) doesn't work on RHEL 7
with MySQL due to older MySQL libraries. 
:::

*Zabbix agent* packages and utilities *Zabbix get* and *Zabbix sender*
are available for [RHEL
6](https://repo.zabbix.com/zabbix/5.0/rhel/6/x86_64/) and [RHEL
5](https://repo.zabbix.com/zabbix/5.0/rhel/5/x86_64) as well.

Zabbix official repository provides fping, iksemel, libssh2 packages as
well. These packages are located in the
[non-supported](https://repo.zabbix.com/non-supported/) directory.

[comment]: # ({/a324317c-a324317c})

[comment]: # ({9ccd42dd-9ccd42dd})
### Notes on installation

See [installation
instructions](https://www.zabbix.com/download?zabbix=5.0&os_distribution=red_hat_enterprise_linux&os_version=8&db=mysql)
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](https://www.zabbix.com/documentation/5.0/manual/appendix/install/run_agent_as_root).

[comment]: # ({/9ccd42dd-9ccd42dd})

[comment]: # ({18eade42-18eade42})
#### Importing data with Timescale DB

With TimescaleDB, in addition to the import command for PostgreSQL, also
run:

    # zcat /usr/share/doc/zabbix-server-pgsql*/timescaledb.sql.gz | sudo -u zabbix psql zabbix

::: notewarning
TimescaleDB is supported with Zabbix server
only.
:::

[comment]: # ({/18eade42-18eade42})

[comment]: # ({65152cbc-65152cbc})
#### Frontend installation prerequisites

Zabbix frontend requires additional packages not available in basic
installation. You need to enable repository of optional rpms in the
system you will run Zabbix frontend on:

RHEL 7:

    # yum-config-manager --enable rhel-7-server-optional-rpms

::: noteclassic
 Note that Nginx for RHEL is available in Red Hat Software
Collections and in [EPEL](https://fedoraproject.org/wiki/EPEL). If Red
Hat Software Collections are used, simply install zabbix-nginx-conf-scl
package. 
:::

[comment]: # ({/65152cbc-65152cbc})

[comment]: # ({fbd9106d-fbd9106d})
#### PHP 7.2

Zabbix frontend requires PHP version **7.2 or newer** starting with
Zabbix 5.0.

Note that RHEL/CentOS 7 only provide PHP 5.4. See
[instructions](/manual/installation/frontend/frontend_on_rhel7) for
installing Zabbix frontend on Red Hat Enterprise Linux/CentOS 7.

[comment]: # ({/fbd9106d-fbd9106d})

[comment]: # ({084b0acc-084b0acc})
#### SELinux configuration

Having SELinux status enabled in enforcing mode, you need to execute the
following commands to enable communication between Zabbix frontend and
server:

RHEL 7 and later:

    # setsebool -P httpd_can_connect_zabbix on

If the database is accessible over network (including 'localhost' in
case of PostgreSQL), you need to allow Zabbix frontend to connect to the
database too:

    # setsebool -P httpd_can_network_connect_db on

RHEL prior to 7:

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

After the frontend and SELinux configuration is done, restart the Apache
web server:

    # service httpd restart

[comment]: # ({/084b0acc-084b0acc})

[comment]: # ({24298233-24298233})
### Proxy installation

Once the required repository is added, you can install Zabbix proxy by
running:

    # yum install zabbix-proxy-mysql

Substitute 'mysql' in the commands with 'pgsql' to use PostgreSQL, or
with 'sqlite3' to use SQLite3 (proxy only).

[comment]: # ({/24298233-24298233})

[comment]: # ({fe6abb8e-fe6abb8e})
##### Creating database

[Create](/manual/appendix/install/db_scripts) a separate database for
Zabbix proxy.

Zabbix server and Zabbix proxy cannot use the same database. If they are
installed on the same host, the proxy database must have a different
name.

[comment]: # ({/fe6abb8e-fe6abb8e})

[comment]: # ({7b4b5122-7b4b5122})
##### Importing data

Import initial schema:

    # zcat /usr/share/doc/zabbix-proxy-mysql*/schema.sql.gz | mysql -uzabbix -p zabbix

For proxy with PostgreSQL (or SQLite):

    # zcat /usr/share/doc/zabbix-proxy-pgsql*/schema.sql.gz | sudo -u zabbix psql zabbix
    # zcat /usr/share/doc/zabbix-proxy-sqlite3*/schema.sql.gz | sqlite3 zabbix.db

[comment]: # ({/7b4b5122-7b4b5122})

[comment]: # ({c3b44766-c3b44766})
##### Configure database for Zabbix proxy

Edit zabbix\_proxy.conf:

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

In DBName for Zabbix proxy use a separate database from Zabbix server.

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. See [SELinux
configuration](/manual/installation/install_from_packages/rhel_centos#selinux_configuration)
for instructions.

[comment]: # ({/c3b44766-c3b44766})

[comment]: # ({e4843785-e4843785})
##### Starting Zabbix proxy process

To start a Zabbix proxy process and make it start at system boot:

    # service zabbix-proxy start
    # systemctl enable zabbix-proxy

[comment]: # ({/e4843785-e4843785})

[comment]: # ({871a973b-871a973b})
##### Frontend configuration

A Zabbix proxy does not have a frontend; it communicates with Zabbix
server only.

[comment]: # ({/871a973b-871a973b})

[comment]: # ({01c6084b-01c6084b})
### Java gateway installation

It is required to install [Java gateway](/manual/concepts/java) 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:

    # yum install zabbix-java-gateway

Proceed to [setup](/manual/concepts/java/from_rhel_centos) for more
details on configuring and running Java gateway.

[comment]: # ({/01c6084b-01c6084b})

[comment]: # ({dace1783-dace1783})
### Installing debuginfo packages

::: noteclassic
 Debuginfo packages are currently available for RHEL/CentOS
versions 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/5.0/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.

[comment]: # ({/dace1783-dace1783})
