This is an old revision of the document!
Official Zabbix packages are available for:
Install the repository configuration package. This package contains apt (software package manager) configuration files.
For Debian 9, run:
# wget http://repo.zabbix.com/zabbix/3.4/debian/pool/main/z/zabbix-release/zabbix-release_3.4-1+stretch_all.deb # dpkg -i zabbix-release_3.4-1+stretch_all.deb # apt-get update
For Debian 8, substitute 'stretch' with 'jessie'. For Debian 7, substitute 'stretch' with 'wheezy' in the commands.
For Ubuntu 16.04, run:
# wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb # dpkg -i zabbix-release_3.4-1+xenial_all.deb # apt-get update
For Ubuntu 14.04, substitute 'xenial' with 'trusty' in the commands.
To install server with MySQL:
# apt-get install zabbix-server-mysql zabbix-frontend-php
To install proxy with MySQL:
# apt-get install zabbix-proxy-mysql
Substitute 'mysql' in the commands with 'pgsql' if using PostgreSQL, or with 'sqlite3' if using SQLite3 (proxy only).
Creating database
For Zabbix server and proxy daemons a database is required. It is not needed to run Zabbix agent.
Create the database using the provided database creation scripts for MySQL/PostgreSQL.
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 | psql -U <username> zabbix
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 | psql -U <username> zabbix # zcat /usr/share/doc/zabbix-proxy-sqlite3/schema.sql.gz | sqlite3 zabbix.db
Configure database for Zabbix server/proxy
Edit zabbix_server.conf or zabbix_proxy.conf to use the created database. 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 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.
PHP configuration for Zabbix frontend
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 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
Refer to the respective section for RHEL/CentOS.
As frontend and SELinux configuration is done, you need to restart Apache web server:
# service apache2 restart
Installing frontend
Now you are ready to proceed with frontend installation steps which will allow you to access your newly installed Zabbix.
To install the agent, run
# apt-get install zabbix-agent
To start the agent, run:
# service zabbix-agent start