One of the core tasks of a good system administrator is monitoring systems, and responding to problems as quickly as possible.
Zabbix is an open source monitoring system which offers advanced monitoring, alerting and visualisation features today which are missing in other monitoring systems, even some of the best commercial ones.
Installing Zabbix, while not difficult, has a number of steps and requirements. To simplify the installation process, there are a number of HowTo’s on the web, as well as a few scripts. One of the better scripts on the web, which I have used, is a bit outdated. I’ve taken the script, updated it to CentOS 5.5 and Zabbix 1.8.3.
The attached script was originally written by Brendon Baumgartner, the URL for the original posting is:
This is an updated script to install Zabbix 1.8.3 on CentOS/Red Hat 5. I have tested it on CentOS 5.5. The script was made for Zabbix 1.8.3, but if you modify the ZBX_VER variable in the script, it should work on any version in the 1.8 series.
Basically, the script tries to do a few things and assumes some things:
- Only run this for NEW installations, you will lose data if you run on an existing installation
- Run at your own risk
- Installs Zabbix 1.8.3 on CentOS 5
- Do not corrupt an existing system
- Be able to run the script over and over in the event that it errors
- Be somewhat flexible
- The database server, web server, and zabbix server all run on one box
This is a reworked script. I’ve made the following changes:
The assumptions are that the server is a minimal install; no options at all are installed
during the OS install. All necessary packages will be installed by this script.
- Changed 20 second sleep at beginning to a query
- Installation of the mysql-server package, if necessary
- Installation of the checkinstall script
- Installs php 5.3
- Installion of the yum-priorities plugin
- Addition of webtatic to the package dir (for PHP5.3)
- Added install of php-mbstring
- Added update of php.ini to recommended values
- Install latest version of libxml2, getting code from xmlsoft.org
- Addition of priority lines to the CentOS-Base.repo, CentOS-Media.repo files
- Installation of Dag’s GPG key (needed for rpmforge)
- Calls the checkinstall script to make binary RPMS
- Installs the binary RPM
- Install selected configuration file for mySql, only if the script installs mysql-server
- Moved all minor functionality into seperate functions, useful for future expandability
When the script is done, there will be at least two RPMs in /usr/src/redhat/RPMS/$arch/zabbix…..
You can use these RPMs to install Zabbix on other identical systems, as well as use the rpm manager to remove Zabbix from the system if you so desire.
I’ll be updating this in a few days with the ability to build either a server, agent or both. Right now it automatically builds both the server and the agent.
If you are installing on a RHEL 6 system (or CentOS 6, SL 6), use this link instead for an updated version