Configure OpenNMS Step By Step
OpenNMSIntroductionOpenNMS is an opensource enterprise network management tool. It helps network administrators to monitor critical services on remote machines and collects the information of remote nodes by using SNMP. OpenNMS has a very active community, where you can register yourself to discuss your problems. Normally OpenNMS installation and configuration takes time, but I have tried to cover the installation and configuration part in a few steps.
OpenNMS provides the following features. jdk1.5*Download jdk1.5* from www.sun.com and unpack it with following command. ./jdk1.5*.bin After unpacking, you will have a directory named jdk1.5*, Rename it to java directory and move it to /usr/lib. Examplesmv jdk.* java mv java /usr/lib/ Setup Environment variable for java home. Insert the following entries in /etc/profile. JAVA_HOME="/usr/lib/java" save the file then exit and run the command to read /etc/profile. source /etc/profile Tomcat 4.*Download tomcat 4.* from tomcat.apache.org and extract it from archive zip/tar.gz. Rename tomcat.* to tomcat and then move it to /opt folder. mv tomcat.* /opt/tomcat Setup Environment variable for tomcat home. Insert the following entries in /etc/profile. CATALINA_HOME="/opt/tomcat" Save the file then exit and run the command to read /etc/profile. source /etc/profile Postgres 8.*Download stable version of Postgresql from www.postgresql.org and extract it from archives bz2/tar.gz. go into postgresql* directory and run the following script. ./configure --prefix=/opt/pgsql In our installion, /opt/pgsql is the destination directory for postgresql installation. Now start the installation of postgresql with following command. make install After this process, add a user to manage postgresql and define home directory /opt/pqsql/ for this user. adduser postgres You need to create a directory called "data" into /opt/pqsql, where you can store your data and assign it following permission. mkdir /opt/pgsql/data Switch user to postgres su - postgres Now you need to initialize your postgres databases. $bin/initdb -D data/ Setup Environment variable for postgres home. Insert the following entries in /etc/profile. POSTGRES_HOME="/opt/pgsql" Save the file then exit and run the command to read /etc/profile. source /etc/profile Rrdtool-1.2*You can download rrdtool from http://rrdtool.paracoda.com/download.en.html untar the files from tarball. And run the following commands. tar xzvf rrdtool1.2*.tar.gz When you run configure script, it may ask to install cgilib, if you don't have cgilib on your system, download cgilib from sourceforge.net and install it. Then run the above commands again to install rrdtool. Setup Environment variable for rrdtool home. Insert the following entries in /etc/profile. RRDTOOL_HOME="/usr/local/rrdtool" Save the file then exit and run the command to read /etc/profile. source /etc/profile OpenNMS-1.2.*Now we will install OpenNMS. Download OpenNMS 1.2.* source code from www.opennms.org (i had used 1.2.7 version during configuration). untar it. tar xzvf opennms-source-1.2.*.tar.gz Rename opennms-1.2.* to opennms directory. mv opennms-1.2.* opennms Go into OpenNMS directory and create a file named build.properties. Add following lines in the build.properties file. install.dir=/opt/opennms Save the file and exit Now you can run following command to install opennms sh build.sh install If installation process returns errors and asks to define the path for rrdtool, then you will have to put following entries in the build.properties file. build.rrdtool.include.dir="add here include directory path for rrdtool without double quotes" Save the file and exit Run the following command again sh build.sh install It will take time to complete installation process. Setup Environment variable for OpenNMS home. Insert the following entries in /etc/profile. OPENNMS_HOME="/opt/opennms" Save the file then exit and run the command to read /etc/profile source /etc/profile Checking perl modulesGo into /opt/opennms/bin directory and run all *.pl scripts with perl command to check for the missing modules. if any of these *.pl scripts returns a error for missing module then install its module with cpan. Configure OpenNMSRun the following commands to configure OpenNMS. $OPENNMS_HOME/bin/runjava -s #This command will search jre Now run following command to create OpenNMS database and make sure postgres service is running. $OPENNMS_HOME/bin/install -disU #This command will setup postgresql database for opennms $OPENNMS_HOME/bin/install -y -w $CATALINA_HOME/webapps -W \ $CATALINA_HOME/server/lib #This command will setup the web application Configure auto discoveryGo into following directory, open the discovery-configuration.xml with vi and add your ip range in begin and end tags. cd $OPENNMS_HOME/etc/ Save the file and exit Final StepsRun the following commands to start services. sudo -u postgres /opt/pgsql/bin/pg_ctl -D /opt/pgsql/data -l /opt/pgsql/logfile\ start Now you can login to main page of OpenNMS in your browser. http://machine-ip:8080/opennms Use user name "admin" and password "admin" to logging to main page. If i have missed anything to add then let me know Written by Saad Khan
|






Recent comments
8 hours 7 min ago
11 hours 36 min ago
14 hours 26 min ago
19 hours 2 min ago
19 hours 43 min ago
21 hours 21 min ago
1 day 1 hour ago
1 day 8 hours ago
1 day 8 hours ago
1 day 10 hours ago