I needed to do several repeated installs of Zabbix, on both a CentOS 5.6 and Centos 6.1 system. I also noted that Zabbix had been updated, along with a couple of other version changes. This version also allows you to do upgrades on an existing system. However, the upgrade has only been tested on installations done by previous versions of this script. Anything else and you’re on your own.
There were a bunch of other changes I made, the complete list is below:
1.4 If webtatic installed, don't reinstall it If the user doesn't want to update the OS in the beginning, ask if the OS should be updated after completion If checkinstall is installed, don't rebuild Ask for a builddir, create if necessary If the zabbix database already exists, ask if it should be reinitialized If upgrade or keeping install, don't install zabbix-config When doing upgrade at end, manually install libxml2-python due to dependency on older libxml2 Updated libxml version to 2.7.8-1 updated Zabbix version to 1.8.9 If a PHP accelerator is installed, don't ask to install another Removed install of rpm from libxlmsoft due to dependency problems Added exclude line to /etc/yum.conf when building on an x86_64 system to avoid loading 386/686 packages Merged versions for the 5.* and 6.* into one script Fixed bug for 6.* script which prevented PHP from being installed Made entry of MySql passwords hidden Added choice of accelerators: apc, eaccelerator or xcache Added ability to do an upgrade of previous installs using this script For upgrade, added backup of database For upgrade, added backup of zabbix directories For x86_64 systems, added remove of all *86 rpms due to some dependency problems
Detection of a 5.* vs a 6.* system is done two ways. First, it looks for the number in /etc/issue. After that, to confirm, it looks for the directory /etc/init, which only exists on the 6.* series. /etc/init is from the new upstart package. Added module to disable unneeded apache modules Added disable of iptables Added exclude line to the epel repo when on os version 6+, to exclude zabbix from being read