Sunday, January 11, 2009

Linux: Installing Groundwork Open source Monitor

Groundwork is open source software which integrates some fine tools like Nagios to monitor systems.

We are considering CentOS 5 as a platform to install groundwork here.

While installation also select Databases and web services and disable SeLinux and Firewall.


Groundwork requires various packages to work properly, and the best method to get the packages is from Centos repositories.

We can enable the [CentOSPlus] repo so that MySQL 5 is available.

vi /etc/yum.repos.d/CentOS-Base.repo

find the following lines and change "enabled=0" to "enabled=1".

[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5


Now lets have a look how we can install other required softwares.

Execute following commands.

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*

yum install fetchmail wget bzip2 unzip zip nmap openssl lynx fileutils ncftp gcc gcc-c++ bison flex byacc nano mysql mysql-devel mysql-server php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel

If you do not find any rpm or package, try to find it on other centos sources or at DAG’s repository.

Do not set Mysql password.

Setup Apache webserver.
chkconfig httpd on
/etc/init.d/httpd start

Setup Mysql DB server.

chkconfig mysqld on
/etc/init.d/mysqld start

Then add .php and .cgi support to Apache.

vi /etc/httpd/conf/httpd.conf

Find the DirectoryIndex directive and change it from:

“DirectoryIndex index.html index.html.var”

To “DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl”

Now, restart Apache to make the changes take effect.

/etc/init.d/httpd restart



Then download the Java JDK from internet


Considering that the jdk-1_5_0_15-linux-i586-rpm.bin file is in /tmp directory, execute following commands.

cd /tmp/
chmod 755 jdk-1_5_0_15-linux-i586-rpm.bin
./jdk-1_5_0_15-linux-i586-rpm.bin

Type “yes” if you are prompted to agree to the license agreement and hit the Enter key.
However you will need to remove older java version to use this new Java.

You can remove it by issuing a command similar to this:

rpm -e java-1.4.2-gcj-compat

Then reboot the system

shutdown -r now

Then integrate java into the default profile of the users.

vi /etc/profile

Add these lines at the bottom of the /etc/profile:

export JAVA_HOME=/usr/java/jdk1.5.0_15

export PATH=$PATH:$JAVA_HOME/bin

Then update the profile by executing.

source /etc/profile

To ensure that Java is working, execute command:

which java

The output should be

/usr/java/jdk1.5.0_15/bin/java
Then create shortcuts for new java.

ln -sf $JAVA_HOME/bin/java /etc/alternatives/java
ln -sf /etc/alternatives/java /usr/bin/java

Now, on execution of "which java", the output should be:

/usr/bin/java


Installing Groundwork Open Source :

Execute following commands to download and install the Groundwork.

mkdir /usr/local/groundwork
cd /usr/local/groundwork
wget http://superb-east.dl.sourceforge.net/sourceforge/gwmos/groundwork-monitor-os-5.1.3-3.rhel5.i386.tar.gz
tar -xvzf groundwork-monitor-os-5.1.3-3.rhel5.i386.tar.gz
rpm -Uvh groundwork-foundation-pro-1.6.1-67.noarch.rpm
rpm -Uvh groundwork-monitor-core-5.1.3-8.rhel5.i386.rpm

If there are no errors, it’s fine. But if you get an error like
“Couldn't connect to localhost:4913: IO::Socket::INET: connect: Connection refused”

Then check the /etc/hosts file and make sure that it is set up properly. This error is there because Apache can’t resolve your host name and not starting up.

If you had to reconfigure your host file, then you will need to issue the following commands before proceeding:

After reconfiguring hosts file issue following commands.

/etc/init.d/httpd restart
rpm -e groundwork-monitor-core-5.1.3-8.rhel5
rpm -Uvh groundwork-monitor-core-5.1.3-8.rhel5.i386.rpm


You can access groundwork using following URL.

http://"IP ADDR of system where Groundwork is installed"


Default user and password is:

Username: admin
Password: admin

No comments:

Post a Comment