Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

https://www.zabbix.com/documentation/3.4/manual/installation/install_from_packages

You can view here to find latest package:

http://repo.zabbix.com/zabbix/

See here for LifeCycle Policy, as they seem to post guides for installing packages that don't exist yet!

http://www.zabbix.com/life_cycle_and_release_policy

(When I first tried to install Zabbix, I was trying to use a URL from the guide that didn't work, and ended up getting an old version from Ubuntu repo) (3.4)

A Ubuntu Example:

http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/

You want the file "zabbix-release_#+{DISTRO}_all.deb"

Eg:

http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+trusty_all.deb

cat << 'EOL' >install_zabbix_ubuntu14.sh
#!/bin/bash

#MySQL Password
password=zabbix

#PHP TimeZone
timezone="America/New_York"

#Latest Package URL
latest="http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+trusty_all.deb"

#Install Zabbix Agent + Server + Pre-Reqs
wget $latest
dpkg -i zabbix-release*.deb
apt-get update
apt-get install -y zabbix-server-mysql php5-mysql zabbix-frontend-php zabbix-agent zabbix-get

#Create Database + Zabbix User + Import DB Configs
mysql -p -e "create database zabbix character set utf8"
mysql -p -e "grant all on zabbix.* to 'zabbix'@'localhost' identified by '$password'"
zcat /usr/share/doc/zabbix-server-mysql/*.sql.gz | mysql -uzabbix -p"$password" zabbix

#Configure Zabbix to use SQL Backend
sh -c 'echo "DBHost=localhost\nDBName=zabbix\nDBUser=zabbix\nDBPassword=" >> /etc/zabbix/zabbix_server.conf'
sed -i 's,^\(DBPassword[ ]*=\).*,\1'$password',g' /etc/zabbix/zabbix_server.conf

#Enable Pre-Defined Apche Configs
echo "Uncomment # php_value date.timezone Europe/Riga"
echo "Set TimeZone to $timezone"
echo "If  First File is empty, just close it and edit second file"
sleep 5
nano /etc/apache2/conf-available/zabbix.conf
nano /etc/apache2/conf.d/zabbix.conf
ln -s /etc/zabbix/apache.conf /etc/apache2/conf-enabled/zabbix.conf
service apache2 restart

#Start services and enable on boot
#Reboot to test services at startup
service zabbix-server start
service zabbix-agent start
update-rc.d zabbix-server defaults
update-rc.d zabbix-agent defaults

echo "####################################"
echo "Visit http://domain/zabbix/"
echo "Loging = admin/zabbix"
echo "####################################"
sleep 5
reboot

EOL
chmod +x install_zabbix_ubuntu14.sh
./install_zabbix_ubuntu14.sh
  • No labels