Installation Opennms

Admin

HowTo install Opennms on Ubuntu
sudo -s
 * Log in as root

apt-get install openssh-server wget vim bzip2 ntp
 * Install some important tools

vi /etc/apt/sources.list
 * Edit the soucres file of apt and save

deb http://debian.opennms.org stable main deb-src http://debian.opennms.org stable main
 * Add the follow two Repositories

deb http://archive.canonical.com/ lucid partner deb-src http://archive.canonical.com/ lucid partner
 * Please add the follow Repositories if you use Ubuntu 10.04

wget -O - http://debian.opennms.org/OPENNMS-GPG-KEY | sudo apt-key add -
 * Add the opennms-pgp-key

aptitude update
 * Make an update of your software-repository

apt-get install sun-java6-jdk postgresql
 * Install Java sun and Postgresql

vi /etc/postgresql/8.4/main/pg_hba.conf
 * Edit the pg_hba.conf from Postgresql


 * Change the following lines to

local  all         postgres                          ident
 * 1) Database administrative login by UNIX sockets


 * 1) TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

local  all         all                               trust host   all         all         127.0.0.1/32          trust host   all         all         ::1/128               trust
 * 1) "local" is for Unix domain socket connections only
 * 1) IPv4 local connections:
 * 1) IPv6 local connections:

invoke-rc.d postgresql-8.4 restart
 * Restart Postgresql

apt-get install postfix snmp snmpd -y
 * Install SNMP

apt-get install opennms -y
 * Install OpenNMS

vi /etc/environment
 * Edit /etc/environment

vi /etc/environment
 * Setup some environment

JAVA_HOME=/usr/lib64/jvm/java-6-sun OPENNMS_HOME=/usr/share/opennms
 * Add the following lines

vi /etc/profile
 * Setup some environments part 2

export JAVA_HOME export OPENNMS_HOME
 * Add the following lines

vi /etc/snmp/snmpd.conf
 * Edit snmpd.conf

com2sec paranoid default         benotpublic
 * Change line 61 (com2sec) to

view system included .1
 * Change view system (line 84) to

disk /
 * Add this line

vi /etc/default/snmpd
 * Edit /etc/default/snmpd

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid 0.0.0.0'
 * Change line 11 to

vi /etc/snmp/snmpd.local.conf
 * Edit /etc/snmp/snmpd.local.conf

syslocation MPDL-Monitor syscontact your@email.de
 * Add the following lines

invoke-rc.d snmpd restart
 * Restart snmp

snmpwalk -v2c -c benotpublic server-adress
 * Start snmpwalk

source /etc/environment source /etc/profile source /root/.bashrc
 * Use your new environment anf verify it

echo $JAVA_HOME echo $OPENNMS_HOME
 * Test the Variables

vi /etc/postgresql/8.4/main/postgresql.conf
 * Edit postgresql.conf if you use an other language as english in your postgresql db. Than restart Postgresql


 * Search lc_messages and change the following lines to

lc_messages = 'C'                                        # strings lc_monetary = 'C'                      # locale for monetary formatting lc_numeric = 'C'                       # locale for number formatting lc_time = 'C'                          # locale for time formatting


 * 1) invoke-rc.d postgresql-8.4 restart

cd /usr/share/opennms/bin/ ./runjava -s && ./install -dis
 * Install OpenNMS

echo "JAVA_HEAP_SIZE=512" > $OPENNMS_HOME/etc/opennms.conf
 * Configure Opennms


 * If you wish to use an alternate port, edit $OPENNMS_HOME/etc/opennms.properties and change or add the org.opennms.netmgt.jetty.port property, as well as the rtc-client and map-client URLs:

org.opennms.netmgt.jetty.port = 8080 opennms.rtc-client.http-post.base-url = http://localhost:8080/opennms/rtc/post opennms.map-client.http-post.url = http://localhost:8080/opennms/map/post

invoke-rc.d opennms start
 * Start Opennms