FlipsideReality Once upon a time, in a land far far away…

27Jun/060

OpenNms on Debian sarge HOWTO

Ok, so I couldn't make Solaris work for me. I am but a meer mortal, so i had a go with deb, and it works!

This is a line by line on how to install OpenNms on deb sarge. If i have missed anything, please tell me & i'll sort it out. I guessed that you need apache, but i'm not sure, as i wanted it on the box for other reasons anyway.

download deb minimal install cd (not the business card one, the other one)

Install with standard settings, no packages and the following disk layout:


Name    Flags    Part Type    FS Type       Size
--------------------------------------------------
hda5    Boot     Logical      Linux         98.68*
hda6             Logical      Linux       4096.19
hda7             Logical      Linux       2048.10
hda8             Logical      Linux      13267.38 <--or whatever you have left. (i used 20gb leaving 10 spare)
hda9             Logical      Linux swap   509.97

Part.  Mount   Description
-----------------------------------------
hda5  /boot    Kernel images for booting
hda6  /        Root file system containing system files, libraries and binaries.
hda7  /home    User home directories, user downloads and docs
hda8  /var     Variable data. All OpenNMS database entries, log files, cache, etc

We need to add the OpenNms repository to apt's sources, so add this line to /etc/apt/sources.list

deb http://debian.opennms.org/ debian/opennms stable

also add 'contrib' to the section list for your default mirror, in my case

deb ftp://ftp.uk.debian.org/debian/ stable main

becomes

deb ftp://ftp.uk.debian.org/debian/ stable main contrib

we do this because tomcat is is in the contrib section.

next run a quick

apt-get update && apt-get upgrade

to get updated with the latest patches

Then apt-get the following:

apache2
java-common
xlibs
gcc
bzip2
lynx
make
libstdc++2.10-glibc2.2
sun-jdk1.4-installer
libtomcat4-java
tomcat4
tomcat4-admin
tomcat4-webapp

note: you can do all this at once with the command

 apt-get install java-common xlibs gcc bzip2 lynx make libstdc++2.10-glibc2.2 sun-jdk1.4-installer libtomcat4-java tomcat4 tomcat4-admin tomcat4-webapp 

Now grab the Sun J2SDK 1.4.0_02-1. I did this by using a windoze box to browse the sun site, agree to the relavent bits and then copy the location to the clipboard, and then used wget to grab it. (you have to use the -O switch as the copied filename is too long) so in my case:

wget -Oj2sdk-1_4_0_02-linux-i586.bin http://192.18.108.148/ECom/EComTicketServlet/BEGIN48D1342103F26ADB68BD4E8F5EF4051C/-2147483648/1549378695/1/734510/734390/1549378695/2ts+/westCoastFSEND/j2sdk-1.4.2_12-oth-JPR/j2sdk-1.4.2_12-oth-JPR:5/j2sdk-1_4_2_12-linux-i586.bin

then build the deb package from the bin:

build-sun-jdk14 j2sdk-1_4_0_02-linux-i586.bin

and install the resulting deb

dpkg --install j2sdk1.4_1.4.2-1_i386.deb

Now install OpenNms

apt-get install opennms libgetopt-mixed-perl

The postgres installation script will run, select the C locale & datetime format that is best for you.

run

/usr/share/opennms/bin/runjava -s 

to get opennms to locate java.

Postgres needs a couple of tweaks to run properly, set

tcpip_socket = true
max_connections = 256
shared_buffers = 1024 

in /var/lib/postgres/data/postgresql.conf and to allow openNms access to the database
comment out all of /var/lib/postgres/data/pg_hba.conf (wirh # at the startt of every line) and add to the bottom:

# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff trust

Now run

/usr/share/opennms/bin/install -disU 

to set up the database

stop tomcat4

/etc/init.d/tomcat4 stop

, then edit the /etc/default/tomcat4 file to include

TOMCAT4_USER="root".

then restart tomcat4

/etc/init.d/tomcat4 start

check that the services are scheduled to start automatically

update-rc.d tomcat4 defaults
update-rc.d postgresql defaults
update-rc.d opennms defaults
update-rc.d httpd defaults

and start them all up

/etc/init.d/tomcat4 start && /etc/init.d/postgresql start && /etc/init.d/opennms start && /etc/init.d/httpd start

(i actually tend to reboot around here to chec that they start automatically.)

To check that the backend of OpenNms is running use

opennms -v status

you should see something like this:

snmp:~# opennms -v status
OpenNMS.Eventd         : running
OpenNMS.Trapd          : running
OpenNMS.Dhcpd          : running
OpenNMS.Actiond        : running
OpenNMS.Capsd          : running
OpenNMS.Notifd         : running
OpenNMS.Scriptd        : running
OpenNMS.Rtcd           : running
OpenNMS.Pollerd        : running
OpenNMS.Collectd       : running
OpenNMS.Threshd        : running
OpenNMS.Discovery      : running
OpenNMS.Vacuumd        : running
opennms is running
snmp:~#

Now check the frontend by going to http://[SERVER_IP]:8180/opennms
the default login is admin with the password admin.

Part 2 still to come with configuration info...

refrences:
http://www.netstatz.com/opennms/Debian_ONMS_HOWTO.html#toc2
http://sourceforge.net/docman/display_doc.php?docid=23937&group_id=4141

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.