Installing the OS
First obtain a disk image from the Centos 5
Boot from the CD and begin setup. This guide will use the text installer started with arguments linux text
- Skip media test
- OK to welcome screen
- OK to English
- OK to us keyboard layout
- Partition disk(s), for the most part it will be
- /boot with 100MB
- swap with 1024MB
- / with remainder of disk (also enable force to be primary partition)
- OK to use GRUB
- OK - no kernel options needed
- OK leaving no GRUB password
- OK to use default boot loader configuration
- Use /dev/sda or /dev/hda to use the MBR part of the disk for the boot loader
- Default ethernet device settings are DHCP
- OK for system to use UTC and New York time zone
- Root password - make it good!
- Deselect Desktop - Gnome and select Server (NOT GUI!)
Obtaining the package and installing it
Starting with root...
yum -y install yum-priorities wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el... rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm rpm -i rpmforge-release-0.3.6-1.el5.rf.*.rpm yum -y install gcc gcc-c++ pcre-devel libpng-devel openssl-devel openldap-devel fping rrdtool-devel yum -y update echo "all done with yum"
Now reboot with that new Kernel!
Once you've rebooted we've got to get to configuring. Let's start by changing the ServerTokens directive in httpd.conf
nano /etc/httpd/conf/httpd.conf
Change ServerTokens OS to ServerTokens Major
echo "helo" > /var/www/html/index.html ln -s /etc/init.d/httpd /etc/rc3.d/S83httpd /etc/init.d/httpd start useradd HOBBITUSER passwd HOBBITUSER chmod o+rx /usr/sbin/fping chmod o+rx /home/HOBBITUSER yum check-update su - HOBBITUSER cd ~ wget http://internap.dl.sourceforge.net/sourceforge/hobbitmon/hobbit-4.2.0.ta... tar -xzf hobbit*tar.gz cd hobbit*
Now compiling Hobbit...
./configure.server I found fping in /usr/sbin/fping Do you want to use it [Y/n] ? y Do you want to be able to test SSL-enabled services (y) ? y Do you want to be able to test LDAP servers (y) ? y Enable experimental support for LDAP/SSL (OpenLDAP 2.x only) (y) ? y What userid will be running Hobbit [hobbit] ? HOBBITUSER
At this point accept the defaults until you see...
What group-ID does your webserver use ? apache
The rest will use default except the name of the host and IP address. These two options will vary depending on the host's destined network installation. Now compile the code:
make
Now exit out to become root and finish with...
cd /home/HOBBITUSER/hobbit* make install
For the client:
Hobbit / XYMON does not compile on CentOS 5 and complains about clock_gettime issues.
Here is how to fix this issue.
Download Hobbit-4.2.3.tar.gz
#1 make sure pcre-devel is installed (#~yum install pcre-devel)
#2 add xymon user (#~useradd xymon)
#3 set varible for “ltr” (#~LIBRTDEF=-lrt)
#4 export varible (#~export LIBRTDEF)
#5 Configure Hobbit inside hobbit src directory (#~./configure –client)
#6 Compile program (#~make)
#7 Install program (#~make install)
#8 Start Continue reading
Groundwork Configuration
Let's stop those crawlers at the door!
echo -e User-agent: *"\n"Disallow: / > /var/www/html/robots.txt echo -e User-agent: *"\n"Disallow: / > ~HOBBITUSER/server/www/robots.txt
You will need to take the configuration from the Hobbit created hobbit-apache.conf and place it in the Apache HTTPD running configuration.
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.orig cat /home/HOBBITUSER/server/etc/hobbit-apache.conf >> /etc/httpd/conf/httpd.conf
and also add some more configuration to httpd.conf
RedirectMatch ^/$ /hobbit/ RedirectMatch ^/robots.txt$ /hobbit/robots.txt
Now test the new httpd.conf and restart Apache HTTPD to those configurations.
apachectl configtest apachectl graceful
Create a user for the administrative scripts on Hobbit and we're done working with Apache.
htpasswd -c /home/HOBBITUSER/server/etc/hobbitpasswd YOURUSERNAME
Next we'll want to steal the Hobbit startup script and use it to start Hobbit upon entering run level 3.
scp root@essex.imaginenetworksllc.com:/etc/init.d/hobbit /etc/init.d/hobbit ln -s /etc/init.d/hobbit /etc/rc3.d/S84hobbit
You will need NTP for a time based application =)
yum -y install ntp cd /etc/rc3.d/ ln -s /etc/init.d/ntpd S11ntpd ntpdate time.iam8up.com /etc/init.d/ntpd start clock -w
Make it so that Hobbit has the capability of reading /var/log/messages
chgrp HOBBITUSER /var/log/messages chmod g+r /var/log/messages
Hobbit specific configuration
~HOBBITUSER/server/etc/bb-hosts
<!--
NewPP limit report
Preprocessor node count: 81/1000000
Post-expand include size: 709/2048000 bytes
Template argument size: 0/2048000 bytes
Expensive parser function count: 0/500
--> <!-- Saved in parser cache with key enwikibooks:pcache:idhash:158214-0!1!0!default!!en!2 and timestamp 20090910182552 -->