[comment]: # ({d96d3275-d96d3275})
# 2 Debian/Ubuntu/Raspbian

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

[comment]: # ({8112dee9-5c0d1024})
### Overview

Official Zabbix 5.0 LTS packages for Debian, Ubuntu, and Raspberry Pi OS (Raspbian) are available on
[Zabbix website](https://www.zabbix.com/download).

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

[comment]: # ({/8112dee9-5c0d1024})

[comment]: # ({1d62f2b3-1d62f2b3})
### Notes on installation

See the [installation
instructions](https://www.zabbix.com/download?zabbix=5.0&os_distribution=debian&os_version=10_buster&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](/manual/appendix/install/run_agent_as_root).

Debian-based distributions usually provide their own Zabbix packages in
their repositories. These are not supported by Zabbix. Only the ones
from [Zabbix Official Repository](https://repo.zabbix.com/zabbix/) are.

[comment]: # ({/1d62f2b3-1d62f2b3})

[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]: # ({9082b90c-9082b90c})
#### PHP 7.2

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

See [instructions](/manual/installation/frontend/frontend_on_debian) for
installing Zabbix frontend on distributions with PHP versions below 7.2.

[comment]: # ({/9082b90c-9082b90c})

[comment]: # ({3b4fc21e-fa73411a})
#### SELinux configuration

See [SELinux
configuration](/manual/installation/install_from_packages/rhel_centos#selinux_configuration)
for RHEL/CentOS.

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

    # systemctl restart apache2

[comment]: # ({/3b4fc21e-fa73411a})

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

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

    # apt install zabbix-proxy-mysql

Substitute 'mysql' in the command with 'pgsql' to use PostgreSQL, or
with 'sqlite3' to use SQLite3.

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

[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]: # ({4f5fc656-4f5fc656})
##### 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]: # ({/4f5fc656-4f5fc656})

[comment]: # ({f27fd9c3-d0a225c7})
##### 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; PostgreSQL user
password for PostgreSQL.

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. Refer to the
[respective
section](/manual/installation/install_from_packages/rhel_centos#selinux_configuration)
for RHEL/CentOS for instructions.

[comment]: # ({/f27fd9c3-d0a225c7})

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

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

    # systemctl restart zabbix-proxy
    # systemctl enable zabbix-proxy

[comment]: # ({/27de2ced-27de2ced})

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

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

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

[comment]: # ({cd9340bd-cd9340bd})
### 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:

    # apt install zabbix-java-gateway

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

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