This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

3 Installation from packages

Overview

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: RHEL5 and RHEL6

Installing repository configuration package

Install the repository configuration package. This package contains yum configuration files.

Zabbix 2.0 for RHEL5:

# rpm -ivh http://repo.zabbix.com/zabbix/2.0/rhel/5/x86_64/zabbix-release-2.0-1.el5.noarch.rpm
Copy
✔ Copied

Zabbix 2.0 for RHEL6:

# rpm -ivh http://repo.zabbix.com/zabbix/2.0/rhel/6/x86_64/zabbix-release-2.0-1.el6.noarch.rpm
Copy
✔ Copied

Installing Zabbix packages

Install Zabbix packages. Example for Zabbix server and web frontend with mysql database.

Zabbix official repository provides fping, iksemel, libssh2 packages as well. These packages are located in the non-supported directory.

# yum install zabbix-server-mysql zabbix-web-mysql
Copy
✔ Copied

Example for installing Zabbix agent only.

# yum install zabbix-agent
Copy
✔ Copied

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 zabbix@localhost identified by 'zabbix';
       mysql> exit
Copy
✔ Copied

Import initial schema and data.

# cd /usr/share/doc/zabbix-server-mysql-2.0.4/create
       # mysql -uroot zabbix < schema.sql
       # mysql -uroot zabbix < images.sql
       # mysql -uroot zabbix < data.sql
Copy
✔ Copied

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
Copy
✔ Copied

Start Zabbix server process.

# service zabbix-server start
Copy
✔ Copied

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
Copy
✔ Copied

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
Copy
✔ Copied

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 10.04 LTS (Lucid Lynx), Ubuntu 12.04 LTS (Precise Pangolin)

Installing repository configuration package

Install the repository configuration package. This package contains apt configuration files.

Zabbix 2.0 for Debian 6:

# wget http://repo.zabbix.com/zabbix/2.0/debian/pool/main/z/zabbix-release/zabbix-release_2.0-1squeeze_all.deb
       # dpkg -i zabbix-release_2.0-1squeeze_all.deb
       # apt-get update
Copy
✔ Copied

Zabbix 2.0 for Debian 7:

# wget http://repo.zabbix.com/zabbix/2.0/debian/pool/main/z/zabbix-release/zabbix-release_2.0-1wheezy_all.deb
       # dpkg -i zabbix-release_2.0-1wheezy_all.deb
       # apt-get update
Copy
✔ Copied

Zabbix 2.0 for Ubuntu 10.04 LTS:

# wget http://repo.zabbix.com/zabbix/2.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_2.0-1lucid_all.deb
       # dpkg -i zabbix-release_2.0-1lucid_all.deb
       # apt-get update
Copy
✔ Copied

Zabbix 2.0 for Ubuntu 12.04 LTS:

# wget http://repo.zabbix.com/zabbix/2.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_2.0-1precise_all.deb
       # dpkg -i zabbix-release_2.0-1precise_all.deb
       # apt-get update
Copy
✔ Copied

Installing and configuring MySQL database

This step is for Debian 6 and Ubuntu 10.04 with MySQL database only.

dbconfig-common on Debian 6 and Ubuntu 10.04 cannot create database with utf-8 encoding. It is necessary to install mysql-server package and configure mysql configuration to use utf-8 in advance.

For Debian 7 and Ubuntu, this step is not necessary.

Install MySQL server package:

# apt-get install mysql-server
Copy
✔ Copied

Set character encoding parameter in /etc/mysql/my.cnf

[mysqld]
       default-character-set=utf8
Copy
✔ Copied

The encoding setting above is for MySQL 5.1. If you use MySQL 5.5 or later, please use "character-set-server=utf-8" instead.

Then start mysqld

# service mysql start
Copy
✔ Copied

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
Copy
✔ Copied

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.

Example for installing Zabbix agent only.

# apt-get install zabbix-agent
Copy
✔ Copied

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.

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
Copy
✔ Copied

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
Copy
✔ Copied

Zabbix frontend is available at http://zabbix-frontend-hostname/zabbix in the browser. Default username/password is Admin/zabbix.

Troubleshooting

See the section on installation-specific issue troubleshooting.

To toggle search highlight, press Ctrl+Alt+H
Have an improvement suggestion for this page? Select the text that could be improved and press Ctrl+Enter to send it to the editors.