The installation is a bit different of this one, please see this video:
Zabbix, the open source distributed monitoring solution, has been released as version 1.8.4 and I am here to show you how to install it in a server running CentOS 5.5.
Note: This is not the absolute guide and you should read the installation guide found in www.zabbix.com.
What you need:
- CentOS 5.5 Operating System media (DVD, CDs, ISO file) | can be downloaded here
- Zabbix 1.8.4 sources | can downloaded here
- XML parser library for jabber | can be downloaded here (please use version 1.4.1 and devel 1.4.1)
- Something to install all of this (PC, server, virtual machine, etc.)
After you got all the above you are ready to install zabbix. The network configuration is something up to you.
Zabbix pre-requisites and binaries installation
- Install CentOS with nothing more than the "Development Tools" installation group, set this with your IP, DNS, gateway, hostname, time zone.
- Connect to the server directly or using ssh.
- Install the zabbix server requirements. Use the following command to install Apache, MySql server, MySql client, php, mysql module for php (php-mysql), GD for php (php-gd), Binary Calculator for php (php-bcmath), Multibyte String for php (php-mbstring) and XML module for php (php-xml):
yum install httpd mysql mysql-server mysql-devel php php-mysql php-gd php-bcmath php-mbstring php-xml
- Continue the installation of zabbix requirements. Use the following command to install curl-devel net-snmp net-snmp-devel:
- Install iksemel packages, change to the download directory where you placed the two (2) rpm packages, then run the following command:
- Untar the zabbix source tarball using:
- Inside the created zabbix directory, run the "configure" script with the following parameters:
- The next step is to install zabbix running "make install", this will install zabbix in "/usr/local/zabbix-1.8.4".
yum install curl-devel net-snmp net-snmp-devel
rpm -ivh iksemel-1.4-1.el5.rf.i386.rpm iksemel-devel-1.4-1.el5.rf.i386.rpmNote: if your package version or package name is different, you need to modify this accordingly.
tar xvfz zabbix-1.8.4.tar.gz
./configure --prefix=/usr/local/zabbix-1.8.4 --enable-server --enable-agent --with-mysql --with-net-snmp --with-curl --with-jabber
- Initialize the MySQL data directory and create the system tables using:
- Start "mysqld" service with:
- Change the mysql root user password using mysqladmin command:
- Now that we have initialized MySQL, started it and changed its root password, connect to it using the mysql client with:
- Now create a database called zabbix with charset utf8:
- Quit from mysql client running the "quit" command:
- Run the following in the directory where you uncompressed the zabbix source to create the database schema:
- Run the following to dump default data in the zabbix database tables:
- Run the following to dump image data into tables:
service mysqld start
mysqladmin -uroot password somepasswordNote: in this example the new password will be "somepassword", you may change this with something more complex.
mysql -uroot -psomepassword
create database zabbix character set utf8;
cat create/schema/mysql.sql | mysql -uroot -psomepassword zabbix
cat create/data/data.sql | mysql -uroot -psomepassword zabbix
cat create/data/image_mysql.sql | mysql -uroot -psomepassword zabbix
- Create the zabbix directory in the Apache html directory /var/www/html/zabbix.
- Run the following in the directory where you uncompressed the zabbix source to copy the frontend files to the zabbix directory created Apache:
- Edit the php.ini file and change the following parameter values as seen here:
cp -a frontends/php/* /var/www/html/zabbix/
- max_execution_time = 600
- max_input_time = 600
- memory_limit = 256M
- post_max_size = 32M
- upload_max_filesize = 16M
service httpd start
You may need to change your iptables in order to allow external access to http and zabbix service, you may use this (example only, this may not fit your security needs, please review your iptables policy):
iptables -I RH-Firewall-1-INPUT 8 -m state --state NEW -p tcp --dport 80 -j ACCEPT
Now, you may access your zabbix installation using http://YourZabbixServerIpAddress/zabbix/install.php
Here is a video to install zabbix:
Here is a video to install zabbix: