Zabbix Documentation 2.2

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


manual:installation:install_from_packages

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
manual:installation:install_from_packages [2017/03/27 11:21]
manual:installation:install_from_packages [2018/07/20 04:46] (current)
martins-v http -> https
Line 1: Line 1:
 +==== 3 Installation from packages ====
  
 +==== From distribution packages ​ ====
 +
 +Several popular OS distributions have Zabbix packages provided. You can use these packages to install Zabbix.
 +
 +<​note>​OS distributions may lack the latest version of Zabbix in their repositiories.</​note>​
 +
 +==== From Zabbix official repository ====
 +
 +Zabbix SIA provides official RPM and DEB packages for Red Hat Enterprise Linux, Debian and Ubuntu LTS. 
 +
 +Package files are available at //​repo.zabbix.com//​ . yum and apt repositories are also available on the server. A step-by-step tutorial for installing Zabbix from packages is provided here.
 +
 +==== Red Hat Enterprise Linux / CentOS ====
 +
 +Supported for versions: RHEL 5, RHEL 6, RHEL 7, Oracle Linux 5, Oracle Linux 6, Oracle Linux 7, CentOS 5, CentOS 6, CentOS 7
 +
 +=== Installing repository configuration package ===
 +
 +Install the repository configuration package. This package contains yum configuration files.
 +
 +Zabbix 2.2 for RHEL5, Oracle Linux 5, CentOS 5:
 +
 +  # rpm -ivh https://​repo.zabbix.com/​zabbix/​2.2/​rhel/​5/​x86_64/​zabbix-release-2.2-1.el5.noarch.rpm
 +
 +Zabbix 2.2 for RHEL6, Oracle Linux 6, CentOS 6:
 +
 +  # rpm -ivh https://​repo.zabbix.com/​zabbix/​2.2/​rhel/​6/​x86_64/​zabbix-release-2.2-1.el6.noarch.rpm
 +
 +Zabbix 2.2 for RHEL7, Oracle Linux 7, CentOS 7:
 +
 +  # rpm -ivh https://​repo.zabbix.com/​zabbix/​2.2/​rhel/​7/​x86_64/​zabbix-release-2.2-1.el7.noarch.rpm
 +=== Installing Zabbix packages ===
 +
 +Install Zabbix packages. Example for Zabbix server and web frontend with mysql database.
 +
 +<​note>​Zabbix official repository provides fping, iksemel, libssh2 packages as well. These packages are located in the //​non-supported//​ directory.</​note>​
 +
 +  # yum install zabbix-server-mysql zabbix-web-mysql
 +
 +Example for installing Zabbix agent only.
 +
 +  # yum install zabbix-agent
 +
 +=== Creating initial database ===
 +
 +Create zabbix database and user on MySQL.
 +
 +  # mysql -uroot
 +  mysql> create database zabbix character set utf8 collate utf8_bin;
 +  mysql> grant all privileges on zabbix.* to [email protected] identified by '​zabbix';​
 +  mysql> exit
 +
 +Import initial schema and data.
 +
 +  # cd /​usr/​share/​doc/​zabbix-server-mysql-2.2.0/​create
 +  # mysql -uroot zabbix < schema.sql
 +  # mysql -uroot zabbix < images.sql
 +  # mysql -uroot zabbix < data.sql
 +
 +=== Starting Zabbix server process ===
 +
 +Edit database configuration in zabbix_server.conf
 +
 +  # vi /​etc/​zabbix/​zabbix_server.conf
 +  DBHost=localhost
 +  DBName=zabbix
 +  DBUser=zabbix
 +  DBPassword=zabbix
 +
 +Start Zabbix server process.
 +
 +  # service zabbix-server start
 +
 +=== Editing 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.
 +
 +  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 date.timezone Europe/Riga
 +
 +It's necessary to uncomment the "​date.timezone"​ setting and set the right timezone for you. After changing the configuration file restart the apache web server.
 +
 +  # service httpd restart
 +
 +Zabbix frontend is available at http://​zabbix-frontend-hostname/​zabbix in the browser. Default username/​password is Admin/​zabbix.
 +
 +
 +==== Debian / Ubuntu ====
 +
 +Supported for version: Debian 6 (Squeeze), Debian 7 (Wheezy), Ubuntu 12.04 LTS (Precise Pangolin), Ubuntu 14.04 LTS (Trusty Tahr)
 +
 +=== Installing repository configuration package ===
 +
 +Install the repository configuration package. This package contains apt configuration files.
 +
 +Zabbix 2.2 for Debian 6:
 +
 +  # wget https://​repo.zabbix.com/​zabbix/​2.2/​debian/​pool/​main/​z/​zabbix-release/​zabbix-release_2.2-1+squeeze_all.deb
 +  # dpkg -i zabbix-release_2.2-1+squeeze_all.deb
 +  # apt-get update
 +
 +Zabbix 2.2 for Debian 7:
 +
 +  # wget https://​repo.zabbix.com/​zabbix/​2.2/​debian/​pool/​main/​z/​zabbix-release/​zabbix-release_2.2-1+wheezy_all.deb
 +  # dpkg -i zabbix-release_2.2-1+wheezy_all.deb
 +  # apt-get update
 +
 +Zabbix 2.2 for Ubuntu 12.04 LTS:
 +
 +  # wget https://​repo.zabbix.com/​zabbix/​2.2/​ubuntu/​pool/​main/​z/​zabbix-release/​zabbix-release_2.2-1+precise_all.deb
 +  # dpkg -i zabbix-release_2.2-1+precise_all.deb
 +  # apt-get update
 +
 +Zabbix 2.2 for Ubuntu 14.04 LTS:
 +
 +  # wget https://​repo.zabbix.com/​zabbix/​2.2/​ubuntu/​pool/​main/​z/​zabbix-release/​zabbix-release_2.2-1+trusty_all.deb
 +  # dpkg -i zabbix-release_2.2-1+trusty_all.deb
 +  # apt-get update
 +
 +
 +=== Installing Zabbix packages ===
 +
 +
 +Install Zabbix packages. dbconfig-common will create the database and populate the initial schema and data automatically. If backend db is located on a different server, please set dbc_remote_questions_default='​true'​ in /​etc/​dbconfig-common/​config.
 +
 +Example for Zabbix server and web frontend with mysql database.
 +
 +  # apt-get install zabbix-server-mysql zabbix-frontend-php
 +
 +<note tip>The zabbix-frontend-php package, during installation,​ will configure a font, which is used on generated images. If you updated the package from any other repository and text is empty on graphs or maps, please check if a "​ttf-dejavu-core"​ package is installed and try to execute "​dpkg-reconfigure zabbix-frontend-php"​ command.</​note>​
 +
 +Example for installing Zabbix agent only.
 +
 +  # apt-get install zabbix-agent
 +
 +=== Editing PHP configuration for Zabbix frontend ===
 +
 +Apache configuration file for Zabbix frontend is located in /​etc/​apache2/​conf.d/​zabbix. Some PHP settings are already configured. (For ubuntu 14.04, the file is located in /​etc/​apache2/​conf-available/​zabbix.conf)
 +
 +  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 date.timezone Europe/Riga
 +
 +It's necessary to uncomment the "​date.timezone"​ setting and set the correct timezone for you. After changing the configuration file restart the apache web server.
 +
 +  # service apache2 restart
 +
 +Zabbix frontend is available at http://​zabbix-frontend-hostname/​zabbix in the browser. Default username/​password is Admin/​zabbix.
 +==== Troubleshooting ====
 +
 +See the section on [[manual:​appendix:​install:​troubleshooting|installation-specific issue troubleshooting]].