Skip to content

Instantly share code, notes, and snippets.

@vazhnov
Last active May 4, 2019 10:42
Show Gist options
  • Save vazhnov/04098a00ae4d78412825a3f69c03ec6c to your computer and use it in GitHub Desktop.
Save vazhnov/04098a00ae4d78412825a3f69c03ec6c to your computer and use it in GitHub Desktop.
Quick install Zabbix 3.2.9 in Ubuntu 17.10 artful with PostgreSQL
# License: CC0 1.0 or newer
# https://creativecommons.org/publicdomain/zero/1.0/
# You can download this script here: https://gist.github.com/vazhnov/04098a00ae4d78412825a3f69c03ec6c
wget "http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb"
sudo dpkg -i zabbix-release_3.2-1+xenial_all.deb
sudo apt-get update
sudo apt-get install zabbix-server-pgsql zabbix-frontend-php libapache2-mod-php php-bcmath php-mbstring php-xml php-pgsql
# Zabbix can't work without password (with ident), so you need to create user with password:
sudo -u postgres createuser --no-superuser --pwprompt zabbix
sudo -u postgres createdb zabbix --owner=zabbix
# Get link to fresh sources here: http://www.zabbix.com/download.php
wget "https://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/3.2.9/zabbix-3.2.9.tar.gz"
tar -xzpf zabbix-3.2.9.tar.gz
sudo -u zabbix psql zabbix < zabbix-3.2.9/database/postgresql/schema.sql
sudo -u zabbix psql zabbix < zabbix-3.2.9/database/postgresql/images.sql
sudo -u zabbix psql zabbix < zabbix-3.2.9/database/postgresql/data.sql
# Set DBPassword
sudo editor /etc/zabbix/zabbix_server.conf
sudo service zabbix-server restart
sudo systemctl enable zabbix-server
# Take list from http://php.net/manual/en/timezones.php
sudo sed -i 's/\;date\.timezone\ =/date.timezone\ =\ Asia\/Yekaterinburg/' /etc/php/7.1/apache2/php.ini
sudo service apache2 restart
# Now login to http://zabbix.example.com/zabbix/
# After setup wizard, use login/password: admin/zabbix
# If you use Nginx as proxy, add this to Nginx config:
# proxy_buffer_size 128k;
# proxy_buffers 4 256k;
# proxy_busy_buffers_size 256k;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment