Zabbix Documentation 4.2

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


manual:installation:install_from_packages:debian_ubuntu

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Previous revision
manual:installation:install_from_packages:debian_ubuntu [2018/10/02 08:07]
manual:installation:install_from_packages:debian_ubuntu [2019/07/22 08:26] (current)
martins-v deb 10 packages
Line 1: Line 1:
 +==== 2 Debian/​Ubuntu/​Raspbian ====
  
 +==== Overview ====
 +
 +Official Zabbix packages are available for: 
 +
 +  * Debian 10 (Buster)
 +  * Debian 9 (Stretch)
 +  * Debian 8 (Jessie)
 +  * Ubuntu 18.04 (Bionic Beaver) LTS
 +  * Ubuntu 16.04 (Xenial Xerus) LTS
 +  * Ubuntu 14.04 (Trusty Tahr) LTS
 +  * Raspbian (Buster)
 +  * Raspbian (Stretch)
 +
 +==== Adding Zabbix repository ====
 +
 +Install the repository configuration package. This package contains apt (software package manager) configuration files. ​
 +
 +For **Debian 10**, run the following commands:
 +
 +**Note!** For Debian 9, substitute '​buster'​ with '​stretch'​ in the commands. For Debian 8, substitute '​buster'​ with '​jessie'​ in the commands.
 +
 +  # wget https://​repo.zabbix.com/​zabbix/​4.2/​debian/​pool/​main/​z/​zabbix-release/​zabbix-release_4.2-1+buster_all.deb
 +  # dpkg -i zabbix-release_4.2-1+buster_all.deb
 +  # apt update
 +
 +For **Ubuntu 18.04 (bionic)**, run the following commands:
 +
 +  # wget https://​repo.zabbix.com/​zabbix/​4.2/​ubuntu/​pool/​main/​z/​zabbix-release/​zabbix-release_4.2-1+bionic_all.deb
 +  # dpkg -i zabbix-release_4.2-1+bionic_all.deb
 +  # apt update
 +
 +  * For Ubuntu 16.04, substitute '​bionic'​ with '​xenial'​ in the commands.
 +  * For Ubuntu 14.04, substitute '​bionic'​ with '​trusty'​ in the commands.
 +
 +For **Raspbian**,​ run the following commands:
 +
 +  # wget https://​repo.zabbix.com/​zabbix/​4.2/​raspbian/​pool/​main/​z/​zabbix-release/​zabbix-release_4.2-1+buster_all.deb
 +  # dpkg -i zabbix-release_4.2-1+buster_all.deb
 +  # apt update
 +
 +==== Server/​proxy/​frontend installation ====
 +
 +To install Zabbix server with MySQL support:
 +
 +  # apt install zabbix-server-mysql
 +
 +To install Zabbix proxy with MySQL support:
 +
 +  # apt install zabbix-proxy-mysql
 +
 +To install Zabbix frontend:
 +
 +  # apt install zabbix-frontend-php
 +
 +Substitute '​mysql'​ in the commands with '​pgsql'​ to use PostgreSQL, or with '​sqlite3'​ to use SQLite3 (proxy only).
 +
 +=== Creating database ===
 +
 +For Zabbix [[manual:​concepts:​server|server]] and [[manual:​concepts:​proxy|proxy]] daemons a database is required. It is not needed to run Zabbix [[manual:​concepts:​agent|agent]]. ​
 +
 +<note warning>​Separate databases are needed for Zabbix server and Zabbix proxy; they cannot use the same database. Therefore, if they are installed on the same host, their databases must be created with different names!</​note>​
 +
 +Create the database using the provided instructions for [[manual:​appendix:​install:​db_scripts#​mysql|MySQL]] or [[manual:​appendix:​install:​db_scripts#​postgresql|PostgreSQL]].
 +
 +=== Importing data ===
 +
 +Now import initial schema and data for the **server** with MySQL:
 +
 +  # zcat /​usr/​share/​doc/​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/​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/​zabbix-server-pgsql*/​timescaledb.sql.gz | sudo -u <​username>​ psql zabbix
 +
 +<note warning>​TimescaleDB is supported with Zabbix server only.</​note>​
 +
 +For **proxy**, 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 <​username>​ psql zabbix
 +  # zcat /​usr/​share/​doc/​zabbix-proxy-sqlite3/​schema.sql.gz | sqlite3 zabbix.db
 +
 +=== Configure database for Zabbix server/​proxy ===
 +
 +Edit 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. Refer to the [[:​manual/​installation/​install_from_packages/​rhel_centos#​selinux_configuration|respective section]] for RHEL/CentOS for instructions.
 +
 +=== Starting Zabbix server process ===
 +
 +It's time to start Zabbix server process and make it start at system boot:
 +
 +  # service zabbix-server start
 +  # update-rc.d zabbix-server enable
 +
 +Substitute '​zabbix-server'​ with '​zabbix-proxy'​ to start Zabbix proxy process.
 +
 +=== SELinux configuration ===
 +
 +Refer to the [[:​manual/​installation/​install_from_packages/​rhel_centos#​selinux_configuration|respective section]] for RHEL/​CentOS.
 +
 +As frontend and SELinux configuration is done, you need to restart Apache web server:
 +
 +  # service apache2 restart
 +
 +=== Frontend configuration ===
 +
 +Apache configuration file for Zabbix frontend is located in /​etc/​apache2/​conf-enabled/​zabbix.conf. Some PHP settings are already configured. But it's necessary to uncomment the "​date.timezone"​ setting and [[http://​php.net/​manual/​en/​timezones.php|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
 +
 +Now you are ready to proceed with [[manual/​installation/​install#​installing_frontend|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.
 +==== Agent installation ====
 +
 +To install the agent, run
 +
 +  # apt install zabbix-agent
 +
 +To start the agent, run:
 +
 +  # service zabbix-agent start
 +
 +==== Java gateway installation ====
 +
 +It is required to install [[:​manual/​concepts/​java|Java gateway]] only if you want to monitor JMX applications. Java gateway is lightweight and does not require a database.
 +
 +Once the required [[#​adding_zabbix_repository|repository]] is added, you can install Zabbix Java gateway by running:
 +
 +  # apt install zabbix-java-gateway
 +
 +Proceed to [[:​manual/​concepts/​java/​from_debian_ubuntu|setup]] for more details on configuring and running Java gateway.