If a man speaks in a forest, and his wife's not there, is he still wrong?

zabbix on CentOS 5

I've recently been asked to investigate Zabbix and found this guide to installing Zabbix 1.4 on CentOS.

However, I also found that Zabbix RPMs are available in the EPEL repository, which makes installation much mores straight-forward.

This guide installs the zabbix server, agent, and web interface on one machine.

The server used was a minimal install of CentOS 5.2.

1. Make sure the EPEL repository has been added to your system. Details of how to use it are here.

2. Install zabbix, zabbix-web, zabbix-agent, MySQL server, and net-snmp

yum install zabbix zabbix-web zabbix-agent mysql-server net-snmp

The zabbix packages, and all necessary dependencies are installed:

=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 mysql-server            x86_64     5.0.45-7.el5     core-0            9.7 M
 net-snmp                x86_64     1:5.3.1-24.el5_2.1  CentOS-5.2-x86_64-Updates  703 k
 zabbix                  x86_64     1.4.5-2.el5      epel-5-x86_64     2.1 M
 zabbix-agent            x86_64     1.4.5-2.el5      epel-5-x86_64     200 k
 zabbix-web              x86_64     1.4.5-2.el5      epel-5-x86_64     933 k
Installing for dependencies:
 apr                     x86_64     1.2.7-11         core-0            118 k
 apr-util                x86_64     1.2.7-7.el5      core-0             74 k
 aspell                  x86_64     12:0.60.3-7.1    core-0            946 k
 aspell-en               x86_64     50:6.0-2.1       core-0            1.6 M
 curl                    x86_64     7.15.5-2.el5     core-0            229 k
 fping                   x86_64     2.4b2-7.el5      epel-5-x86_64      33 k
 freetype                x86_64     2.2.1-20.el5_2   CentOS-5.2-x86_64-Updates  311 k
 gmp                     x86_64     4.1.4-10.el5     core-0            201 k
 gnutls                  x86_64     1.4.1-3.el5_1    CentOS-5.2-x86_64-Updates  364 k
 httpd                   x86_64     2.2.3-11.el5_1.centos.3  core-0            1.1 M
 iksemel                 x86_64     1.3-1.el5.rf     RPMForge-RHEL5-x86_64  118 k
 libidn                  x86_64     0.6.5-1.1        core-0            195 k
 libjpeg                 x86_64     6b-37            core-0            139 k
 libpng                  x86_64     2:1.2.10-7.1.el5_0.1  core-0            235 k
 lm_sensors              x86_64     2.10.0-3.1       core-0            504 k
 mysql                   x86_64     5.0.45-7.el5     core-0            4.2 M
 net-snmp-libs           x86_64     1:5.3.1-24.el5_2.1  CentOS-5.2-x86_64-Updates  1.2 M
 perl-DBD-MySQL          x86_64     3.0007-1.fc6     core-0            147 k
 perl-DBI                x86_64     1.605-1.el5.rf   RPMForge-RHEL5-x86_64  871 k
 perl-Net-Daemon         noarch     0.43-1.el5.rf    RPMForge-RHEL5-x86_64   44 k
 perl-PlRPC              noarch     0.2020-1.el5.rf  RPMForge-RHEL5-x86_64   33 k
 php                     x86_64     5.1.6-20.el5_2.1  CentOS-5.2-x86_64-Updates  1.2 M
 php-bcmath              x86_64     5.1.6-20.el5_2.1  CentOS-5.2-x86_64-Updates   33 k
 php-cli                 x86_64     5.1.6-20.el5_2.1  CentOS-5.2-x86_64-Updates  2.2 M
 php-common              x86_64     5.1.6-20.el5_2.1  CentOS-5.2-x86_64-Updates  155 k
 php-gd                  x86_64     5.1.6-20.el5_2.1  CentOS-5.2-x86_64-Updates  112 k
 php-mysql               x86_64     5.1.6-20.el5_2.1  CentOS-5.2-x86_64-Updates   86 k
 php-pdo                 x86_64     5.1.6-20.el5_2.1  CentOS-5.2-x86_64-Updates   63 k
 postgresql-libs         x86_64     8.1.11-1.el5_1.1  core-0            195 k

Note 1: I also have the RPMForge repo enabled on this system. This is not necessary.

Note 2: I am using local mirrors of the repositories from a cobbler server, so the Repository names you see will be slightly different.

3. Start the mysql server, and configure it to start at boot:

service mysqld start
chkconfig mysqld on

4. Create a database for zabbix to use:

mysqladmin create zabbix
cat | mysql << EOF
grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'password';
EOF

5. Initialise the zabbix database:

mysql -uzabbix -ppassword zabbix < /usr/share/doc/zabbix-1.4.5/dbinit/schema/mysql.sql 
mysql -uzabbix -ppassword zabbix < /usr/share/doc/zabbix-1.4.5/dbinit/data/data.sql 
mysql -uzabbix -ppassword zabbix < /usr/share/doc/zabbix-1.4.5/dbinit/data/images_mysql.sql 

6. Add zabbix ports to /etc/services:

cat >> /etc/services << EOF
zabbix_agent 10050/tcp
zabbix_trap 10051/tcp
EOF

7. Make sure a couple of settings are correct in /etc/php/ini:

[Date]
; Defines the default timezone used by the date functions
date.timezone = Europe/London

max_execution_time = 300

8. Add the MySQL password to /etc/zabbix/zabbix_server.conf
perl -pi -e 's/^#DBPassword.*/DBPassword=password/' /etc/zabbix/zabbix_server.conf
9. Open ports 80, 10050, and 10051 on the firewall: system-config-securitylevel-tui --port=80:tcp --port=10050:tcp --port=10051:tcp --quiet

10. Start all the services and configure them to start at boot:

chkconfig zabbix on
chkconfig zabbix-agent on
chkconfig httpd on
service zabbix start
service zabbix-agent start
service httpd start

You should now be able to open a browser on http://server/zabbix and complete the initial configuration.

Optional step: If you need/want to use any SNMP tools (snmpwalk, etc.), you should install net-snmp-utils

What's Related

Story Options

zabbix on CentOS 5 | 0 comments
The following comments are owned by whomever posted them. This site is not responsible for what they say.

Topics

  • Home
  • Misc (6/0)
  • Audio (5/0)
  • Linux (21/0)
  • Family (1/0)
  • Fishing Diary (1/0)
  • OpenSolaris (7/0)
  • Computing (11/0)
  • General News (7/0)
  • Chloe (1/0)
  • Emily (2/0)
  • Twins (5/0)
  • Classifieds (2/0)
  • GeekLog (2/0)
  • Project Management (1/0)
  • User Functions






    Lost your password?