ZABBIX is the open source Enterprise-class Monitoring Solution. Everything inside your network can be monitored: Performance Servers, Web Applications, Databases, Networking Equipment and more. More info here.
Installing Zabbix daemons
Download the source archive
The sources can be downloaded from here: http://www.zabbix.com/download.php
[[email protected] ~]# wget http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/2.0.6/zabbix-2.0.6.tar.gz
Once downloaded, extract the sources, by running:
[[email protected] ~]# tar zxvf zabbix-2.0.6.tar.gz
Create user account
For all of the Zabbix daemon processes, an unprivileged user is required. If a Zabbix daemon is started from an unprivileged user account, it will run as that user.
However, if a daemon is started from a ‘root’ account, it will switch to a ‘zabbix’ user account, which must be present. To create such a user account (in its own group, “zabbix”) on Linux systems, run:
Create Zabbix database
For Zabbix server and proxy daemons, as well as Zabbix frontend, a database is required. It is not needed to run Zabbix agent.
mysql> create database zabbix character set utf8 collate utf8_bin; Query OK, 1 row affected (0.00 sec)
[[email protected] ~]# cd zabbix-2.0.6 [[email protected] zabbix-2.0.6]# mysql -u root -p zabbix < database/mysql/schema.sql [[email protected] zabbix-2.0.6]# mysql -u root -p zabbix < database/mysql/images.sql [[email protected] zabbix-2.0.6]# mysql -u root -p zabbix < database/mysql/data.sql
Configure the sources
When configuring the sources for a Zabbix server or proxy, you must specify the database type to be used. Only one database type can be compiled with a server or proxy process at a time.
To see all of the supported configuration options, inside the extracted Zabbix source directory run:
To configure the sources for a Zabbix server and agent, you may run something like:
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl
no acceptable C compiler found in $PATH
The solution depends on what has already been installed on the server. Usually `
yum install gcc` is all that is required.
Still not working? Try this:
yum update yum && yum remove gcc && yum install gcc
It should work!
Curl library not found
The solution is:
yum install curl libcurl libcurl-devel
Invalid NET-SNMP directory - unable to find net-snmp-config
The solution is:
yum install net-snmp-devel
Make and install everything
[[email protected] zabbix-2.0.6]# make install
make install will by default install the daemon binaries (
/usr/local/sbin and the client binaries (
Review and edit configuration files
[[email protected] zabbix-2.0.6]# vi /usr/local/etc/zabbix_agentd.conf
You need to configure this file for every host with zabbix_agentd installed.
You must specify the Zabbix server IP address in the file. Connections from other hosts will be denied.
[[email protected] zabbix-2.0.6]# vi /usr/local/etc/zabbix_server.conf
You must specify the database name, user and password (if using any).
The rest of the parameters will suit you with their defaults if you have a small installation (up to ten monitored hosts). You should change the default parameters if you want to maximize the performance of Zabbix server (or proxy) though.
Start up the daemons
Run zabbix_server on the server side.
[[email protected] ~]# zabbix_server
Run zabbix_agentd on all the monitored machines.
[[email protected] ~]# zabbix_agentd
Installing Zabbix web interface
Copying PHP files
Zabbix frontend is written in PHP, so to run it a PHP supported webserver is needed. Installation is done by simply copying the PHP files from
frontends/php to the webserver HTML documents directory.
[[email protected] ~]# cd zabbix-2.0.6 [[email protected] zabbix-2.0.6]# mkdir /var/www/html/zabbix [[email protected] zabbix-2.0.6]# cd frontends/php [[email protected] php]# cp -a . /var/www/html/zabbix
In your browser, open Zabbix URL: http://server_ip_or_name/zabbix
You should see the first screen of the frontend installation wizard.
Make sure that all software prerequisites are met. If there’s error, edit the file
/etc/php.ini and update the information until all errors are fixed (needed to install bcmath, i.e:
yum install php-bcmath).
Enter details for connecting to the database. Zabbix database must already be created.
Enter Zabbix server details.
Review a summary of settings.
Download the configuration file and place it under
Finish the installation.
Zabbix frontend is ready! The default user name is Admin, password zabbix.