Home » code snippets, geek, servers & tech

CentOS 5.3 Zabbix 1.6.5 Install (quick)

Submitted by Carl on Friday, 19 June 20094 Comments

A quick reference for a from-scratch Zabbix install on CentOS 5.3. We’ve used Zabbix for the past 3 or 4 years and just implementing 1.6.5 across multiple Xen nodes for funky distributed monitoring.

wget http://kent.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.6.5.tar.gz
tar xvf zabbix-1.6.5.tar.gz
yum install mysql-server
mysql

  • type > create database zabbix
  • type > quit

cd zabbix-1.6.5
service mysqld start
cd create/schema/
cat mysql.sql | mysql zabbix
cd ../data
cat data.sql | mysql zabbix
cat images_mysql.sql  | mysql zabbix
cd ../..
yum install gcc mysql mysql-devel curl curl-devel net-snmp net-snmp-devel
./configure –enable-server –with-mysql –with-net-snmp –with-libcurl
make install
vi /etc/services

  • add > zabbix-agent   10050/tcp Zabbix Agent
  • add > zabbix-agent   10050/udp Zabbix Agent
  • add > zabbix-trapper 10051/tcp Zabbix Trapper
  • add > zabbix-trapper 10051/udp Zabbix Trapper

cp misc/init.d/fedora/core5/zabbix_server /etc/init.d/
vi /etc/init.d/zabbix_server

  • change > /usr/bin/zabbix_server
  • to > /usr/local/sbin/zabbix_server

adduser zabbix
mkdir /etc/zabbix/
cp ./misc/conf/zabbix_server.conf /etc/zabbix/
/etc/init.d/zabbix_server start
chkconfig –add zabbix_server
chkconfig –add httpd

chkconfig zabbix_server on
chkconfig httpd on
chkconfig mysqld on

yum installl httpd fping php php-mysql php-bcmath

cd zabbix-1.6.5/frontends/php/
cp -rf * /var/www/html/
service httpd start

vi /etc/php.ini

  • change > max_execution_time = 30;
  • to > max_execution_time = 300;
  • change > date.timezone =
  • to > date.timezone = UTC
  • change > memory_limit = 16M
  • to > memory_limit = 100M

service httpd restart
service mysqld restart

4 Comments »

  • Steve said:

    Thanks for this awesome tutorial. However, after following all of these instructions I could not get the zabbix_server process to start. It looks like it was trying to run as root. Can you advise how to get the zabbix_server process to run as the zabbix user? I’m still new to linux and don’t know how to do everything yet.

    Running CentOS 5.3 and Zabbix 1.6.5

  • Carl (author) said:

    Hi Steve,
    You should just need to-do “/etc/init.d/zabbix_server start” and that script takes care of the appropriate permissions (zabbix.zabbix).

    Ta,
    Carl

  • Jason said:

    For your distributed monitoring do you utilize “nodes” or “proxies”? I’m trying to set up my first Zabbix install on CentOS 5.3, but unsure which path I should take. Furthermore, it seems the zabbix-proxy package requires different configuration.

    If you have any insight I would really appreciate it.

    Thanks,
    -Jason-

  • Carl (author) said:

    We’re not quite using the distributed element yet and no proxy. For this particular setup we have two cabs, a zabbix vm in each cabinet monitoring itself and the other cabinets hosts/vms but in basic terms it’s just like two zabbix installs linked by a common web interface as we use it.

    Eventually I’ll get onto looking at getting across multiple sites, for the moment though we’re happy just having individual/independent zabbix/cacti/smokeping installs at each site.

    http://www.zabbix.com/forum/showthread.php?t=9409 might be of use?

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.