manual:installation:install_from_packages:debian_ubuntu

Differences

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

Link to this comparison view

Next revision
Previous revision
manual:installation:install_from_packages:debian_ubuntu [2017/03/27 11:19]
martins-v created; package installation for debian/ubuntu
manual:installation:install_from_packages:debian_ubuntu [2021/01/27 21:18] (current)
Line 1: Line 1:
-==== 2 Debian/​Ubuntu ====+==== 2 Debian/​Ubuntu/​Raspbian ​====
  
-=== Overview ===+==== Overview ​====
  
 Official Zabbix packages are available for:  Official Zabbix packages are available for: 
  
-  * Debian ​(Wheezy)  +|Debian ​10 (Buster ​|[[https://​www.zabbix.com/​download?​zabbix=5.4&​os_distribution=debian&​os_version=10_buster&​db=mysql|Download]] ​ | 
-  ​Debian 8 (Jessie) +|Debian 9 (Stretch) ​ |[[https://​www.zabbix.com/​download?​zabbix=5.4&​os_distribution=debian&​os_version=9_stretch&​db=mysql|Download]] ​ | 
-  Ubuntu ​14.04 (Trusty Tahr) LTS +|Debian 8 (Jessie)  ​|[[https://​www.zabbix.com/​download?​zabbix=5.4&​os_distribution=debian&​os_version=8_jessie&​db=mysql|Download]] ​ | 
-  ​Ubuntu 16.04 (Xenial Xerus) LTS+|Ubuntu ​20.04 (Focal Fossa) LTS  ​|[[https://​www.zabbix.com/​download?​zabbix=5.4&​os_distribution=ubuntu&​os_version=20.04_focal&​db=mysql|Download]] ​ | 
 +|Ubuntu 18.04 (Bionic Beaver) LTS  |[[https://​www.zabbix.com/​download?​zabbix=5.4&​os_distribution=ubuntu&​os_version=18.04_bionic&​db=mysql|Download]] ​ | 
 +|Ubuntu 16.04 (Xenial Xerus) LTS  ​|[[https://​www.zabbix.com/​download?​zabbix=5.4&​os_distribution=ubuntu&​os_version=16.04_xenial&​db=mysql|Download]] ​ | 
 +|Ubuntu 14.04 (Trusty Tahr) LTS  |[[https://​www.zabbix.com/​download?​zabbix=5.4&​os_distribution=ubuntu&​os_version=14.04_trusty&​db=mysql|Download]] ​ | 
 +|Raspbian (Buster) ​ |[[https://​www.zabbix.com/​download?​zabbix=5.4&​os_distribution=raspbian&​os_version=10_buster&​db=mysql|Download]] ​ | 
 +|Raspbian (Stretch) ​ |[[https://​www.zabbix.com/​download?​zabbix=5.4&​os_distribution=raspbian&​os_version=9_stretch&​db=mysql|Download]] ​ |
  
-=== Repository installation ===+Packages are available with either MySQL/​PostgreSQL database and Apache/​Nginx webserver support.
  
-Install the repository configuration packageThis package contains apt (software package manager) configuration files+<note important>​Zabbix 5.4 is not released yetThe download links lead to pre-5.4 packages.</​note>​
  
-For Debian **8**, run:+==== Notes on installation ====
  
-  # wget http://repo.zabbix.com/​zabbix/3.4/debian/​pool/​main/​z/​zabbix-release/​zabbix-release_3.4-1+jessie_all.deb +See the [[https://www.zabbix.com/​download?zabbix=5.0&​os_distribution=debian&​os_version=10_buster&​db=mysql|installation instructions]] per platform in the download page for:
-  # dpkg -i zabbix-release_3.4-1+jessie_all.deb +
-  # apt-get update+
  
-For Debian 7, substitute '​jessie'​ with '​wheezy'​ in the commands.+  * 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
  
-For Ubuntu ​**16.04**, run:+Zabbix agent 2 (zabbix-agent2) is supported only on Debian 9/10 and Ubuntu ​18.04.
  
-  # wget http://repo.zabbix.com/​zabbix/3.4/ubuntu/pool/main/z/​zabbix-release/​zabbix-release_3.4-1+xenial_all.deb +If you want to run Zabbix agent as root, see [[https://www.zabbix.com/​documentation/5.0/manual/appendix/install/run_agent_as_root|Running agent as root]].
-  # dpkg -i zabbix-release_3.4-1+xenial_all.deb +
-  # apt-get update+
  
-For Ubuntu 14.04, substitute '​xenial' ​with '​trusty'​ in the commands.+=== Importing data with Timescale DB ===
  
-=== Server/​proxy installation ===+With TimescaleDB,​ in addition to the import command for PostgreSQL, also run:
  
-To install ​server ​with MySQL:+  # zcat /​usr/​share/​doc/​zabbix-server-pgsql*/​timescaledb.sql.gz | sudo -u zabbix psql zabbix
  
-  # apt-get install zabbix-server-mysql zabbix-frontend-php+<note warning>​TimescaleDB is supported with Zabbix ​server ​only.</​note>​
  
-To install proxy with MySQL:+=== PHP 7.2 ===
  
-  # apt-get install zabbix-proxy-mysql+Zabbix frontend requires PHP version **7.2 or newer** starting with Zabbix 5.0.
  
-Substitute '​mysql'​ in the commands ​with '​pgsql'​ if using PostgreSQL, or with '​sqlite3'​ if using SQLite3 (proxy only).+See [[:​manual/​installation/​frontend/​frontend_on_rhel7|instructions]] for installing Zabbix frontend on distributions ​with PHP versions below 7.2.
  
-** Creating database **+=== SELinux configuration ===
  
-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]]. +See [[:manual/​installation/​install_from_packages/​rhel_centos#​selinux_configuration|SELinux configuration]] for RHEL/CentOS.
  
-<note warning>​If Zabbix server and proxy are installed on the same hosttheir databases must be created with different names!</​note>​+After the frontend and SELinux configuration is donerestart the Apache web server:
  
-Create the database using the provided [[:​manual:​appendix:​install:​db_scripts|database creation scripts]] for MySQL/​PostgreSQL.+  # service apache2 restart
  
-Now import initial schema and data for the server with MySQL:+==== Proxy installation ====
  
-  # zcat /​usr/​share/​doc/​zabbix-server-mysql/​create.sql.gz | mysql -uzabbix -p zabbix+Once the required repository is added, you can install Zabbix proxy by running:
  
-You will be prompted to enter your newly created database password.+  # apt install zabbix-proxy-mysql
  
-With PostgreSQL:+Substitute '​mysql'​ in the command with '​pgsql'​ to use PostgreSQL, or with '​sqlite3'​ to use SQLite3.
  
-  # zcat /​usr/​share/​doc/​zabbix-server-pgsql/​create.sql.gz | psql -U <​username>​ zabbix+== Creating database ==
  
-For proxy, import initial schema:+[[:manual/​appendix/​install/​db_scripts|Create]] a separate database for Zabbix proxy.
  
-  ​# zcat /​usr/​share/​doc/​zabbix-proxy-mysql/​create.sql.gz | mysql -uzabbix -p zabbix+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. 
 + 
 +== 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): For proxy with PostgreSQL (or SQLite):
  
-  # zcat /​usr/​share/​doc/​zabbix-proxy-pgsql/​create.sql.gz | psql -U <​username> ​zabbix +  # zcat /​usr/​share/​doc/​zabbix-proxy-pgsql/​schema.sql.gz | sudo -u zabbix psql zabbix 
-  # zcat /​usr/​share/​doc/​zabbix-proxy-sqlite/create.sql.gz | sqlite3 zabbix.db+  # zcat /​usr/​share/​doc/​zabbix-proxy-sqlite3/schema.sql.gz | sqlite3 zabbix.db
  
-** Configure database for Zabbix ​server/proxy **+== Configure database for Zabbix proxy ==
  
-Edit zabbix_server.conf or zabbix_proxy.conf ​to use the created database. For example:+Edit zabbix_proxy.conf:​
  
   # vi /​etc/​zabbix/​zabbix_server.conf   # vi /​etc/​zabbix/​zabbix_server.conf
Line 78: Line 91:
   DBUser=zabbix   DBUser=zabbix
   DBPassword=<​password>​   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. In DBPassword use Zabbix database password for MySQL; PosgreSQL user password for PosgreSQL.
Line 83: Line 98:
 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. 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 ​**+== Starting Zabbix ​proxy process ​==
  
-It's time to start Zabbix ​server ​process and make it start at system boot:+To start Zabbix ​proxy process and make it start at system boot:
  
-  # service ​zabbix-server start +  # systemctl restart ​zabbix-proxy 
-  # update-rc.d ​zabbix-server enable+  # systemctl enable ​zabbix-proxy
  
-Substitute '​zabbix-server'​ with '​zabbix-proxy'​ to start Zabbix proxy process. +== Frontend ​configuration ==
- +
-** PHP configuration for Zabbix frontend ** +
- +
-Apache configuration file for Zabbix frontend is located in /​etc/​httpd/​conf.d/​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 always_populate_raw_post_data -1 +
-  # php_value date.timezone Europe/​Riga +
- +
-== 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+
  
-** Installing ​frontend ​**+A Zabbix proxy does not have a frontend; it communicates with Zabbix server only.
  
-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.+==== Java gateway ​installation ​====
  
-=== Agent 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.
  
-To install ​the agentrun+Once the required repository is addedyou can install Zabbix Java gateway by running:
  
-  # apt-get install zabbix-agent+  # apt install zabbix-java-gateway
  
-To start the agent, run:+Proceed to [[:manual/​concepts/​java/​from_debian_ubuntu|setup]] for more details on configuring and running Java gateway.
  
-  # service zabbix-agent start