Install OpenNMS 1.2.9 on Ubuntu Server 7.10 – Gutsy Gibbon 32 bit Platform
Last Updated on Monday, 26 May o 01:25 Written by admin Tuesday, 30 October o 08:51
OpenNMS is the world’s first enterprise grade network management platform developed under the open source model.
Please not that the three prerequisites listed below are needed before you can start the installation section of OpenNMS and this guide will walk you through it step by step. This guide should take about an hour to complete.
Tomcat 4
Postgresql-8.1
Java jdk
If you are planning to do a clean install of Gutsy, there is a section in the install stage that asks you if you want to install POSTGRESQL, please don’t select it. The version it installs (8.2) gives problems during the database creation stage of OpenNMS
Step One
We need to edit the /etc/apt/sources.list file and add the two lines below.
deb http://debian.opennms.org stable main
deb-src http://debian.opennms.org stable main
sudo nano /etc/apt/sources.list
Add the OpenNMS PGP Key to APT
wget -O – http://debian.opennms.org/OPENNMS-GPG-KEY | sudo apt-key add -
Run the APT command.
sudo apt-get update
and
sudo apt-get upgrade
on your system
Step Two
We need to install necessary files to prevent any dependency problems.
sudo apt-get install build-essential nmap mutt libnet-ssleay-perl libauthen-pam-perl libio-pty-perl libmd5-perl java-common
We need to install Postgressql where the database will reside for OpenNMS (Remember, not version 8.2)
sudo apt-get install postgresql-8.1 postgresql-8.1-pljava-gcj postgresql-client-8.1 postgresql-contrib-8.1 postgresql-client-common postgresql-common
Set Environment variable for POSTGRES_HOME. Insert the following entries in /etc/profile.
POSTGRES_HOME="/etc/postgresql/8.1"
export POSTGRES_HOME
Now in your console type:
source /etc/profile
This is to read the profile file and make the POSTGRES_HOME variable work.
Customizing the postgresql.conf file in /etc/postgresql/8.1/main
This file controls some basic parameters of Postgres. We need to change three of these parameters.
1. Find the line in the file that contains max_connections.It needs to read:
max_connections = 256
2. Find the line that contains shared_buffers.It needs to read:
shared_buffers = 1024
Customizing the pg_hba.conf file in /etc/postgresql/8.1/main
The pg_hba.conf file controls which machines and users can access the database on a given machine via TCP/IP.
Since that is how OpenNMS accesses the database (via localhost) it is necessary to modify this file to allow OpenNMS to work.The easiest thing to do is to just allow anyone from the localhost to access the database (do not add the last line if your system does not support IPv6):
#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
Make sure that no other lines are uncommented in this file.You will need to restart Postgres after making these changes.
Path to stop and start PGSQL >> /etc/init.d/postgresql-8.1 restart
Step Three
Install Java
The Java must be JDK (Java Development Kit) as Tomcat uses it to parse Java applets to .html
in your browser.
sudo apt-get install sun-java6-jdk
Set Environment variable for JAVA_HOME. Insert the following entries in /etc/profile.
JAVA_HOME="/usr/lib/jvm/java-6-sun"
export JAVA_HOME
Now in your console type:
source /etc/profile
If you would like to set which version of Java to run in your Distro or would like to find the path of the Java you are running, use this:
sudo update-alternatives –config java
Step Four
Tomcat 4 Installation
Before we install Tomcat4 we need to resolve some dependencies
sudo apt-get install libcommons-beanutils-java libcommons-collections-java libcommons-digester-java libcommons-fileupload-java libcommons-lang-java libcommons-logging-java libcommons-validator-java liboro-java libservlet2.3-java libstruts1.2-java
There are two dependencies we need to manually download and install our selves. I recommend that you download them to the /tmp folder
sudo wget http://archive.ubuntu.com/ubuntu/pool/multiverse/libs/libstruts1.1-java/libstruts1.1-java_1.1-3_all.deb
sudo wget http://ftp.uk.debian.org/debian/pool/main/a/apache/apache-utils_1.3.33-6sarge3_all.deb
Once the above two files are downloaded, you can install them with the commands below.
sudo dpkg -i libstruts1.1-java_1.1-3_all.deb
sudo dpkg -i apache-utils_1.3.33-6sarge3_all.deb
Once the above files are installed, we can proceed to install tomcat4.
sudo apt-get install tomcat4 tomcat4-admin tomcat4-webapps
Set Environment variable for CATALINA_HOME. Insert the following entries in /etc/profile.
CATALINA_HOME="/usr/share/tomcat4"
export CATALINA_HOME
Now in your console type:
source /etc/profile
This is to read the profile file and make the CATALINA_HOME variable work.
I came across this error when tomcat tries to start:
Could not start Tomcat 4.1 servlet engine because no Java Development Kit
(JDK) was found. Please download and install JDK 1.3 or higher and set
JAVA_HOME in /etc/default/tomcat4 to the JDK installation directory.
So the solution to this problem is to add the JAVA_HOME path to /etc/default/tomcat4
sudo nano /etc/default/tomcat4
Once this is done start Tomcat4
sudo /etc/init.d/tomcat4 start
Tomcat starts up fine. Yay
Test Tomcat: http://localhost:8180
Step Five
Opennms Installation
Required Files:
Libraries
* librrd0-jni
* librrd0
* libicmp-jni
* libiplike-pgsql
* libopennms-java
Opennms Files
* opennms-common
* opennms-contrib
* opennms-server
* opennms-db
* opennms
* opennms-webapp
Follow this procedure to install Opennms.
sudo apt-get install librrd0-jni rrdtool librrd0 libicmp-jni libopennms-java opennms-common opennms-contrib libiplike-pgsql
We are going to install each application of Opennms to make sure that each one installs without errors and if there are we should resolve them before we carry on with the installation.
sudo apt-get install opennms-db
sudo apt-get install opennms-server
sudo apt-get install opennms-webapp
If all went well, you should have had no errors.
We need to specify the path to our Java installation for opennms to work correctly;
Go to /usr/share/opennms/bin folder.
sudo ./runjava -S /usr/lib/jvm/java-6-sun/bin/java
Your output should be something like this:
runjava: checking specified JRE: /usr/lib/jvm/java-6-sun/bin/java
runjava: specified JRE is good.
runjava: value of /usr/lib/jvm/java-6-sun/bin/java stored in configuration file
sudo apt-get install opennms
Setup Environment variable for OPENNMS_HOME.Insert the following entries in /etc/profile.
OPENNMS_HOME="/usr/share/opennms"
export OPENNMS_HOME
Now in your console type:
source /etc/profile
This is to read the profile file and make the OPENNMS_HOME variable work.
Run the Installer to Setup the PostgreSQL Database
sudo $OPENNMS_HOME/bin/install -disU
$OPENNMS_HOME path is /usr/share/opennms
Your out put should be something like this.
===========================================================
OpenNMS Installer Version $Id: Installer.java 3056 2006-03-26 19:39:16Z djgregor $
===========================================================
Configures PostgreSQL tables, users, and other miscellaneous settings.
- checking database version… 8.1
– Full version string: PostgreSQL 8.1.10 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.1.3 20070831 (prerelease) (Ubuntu 4.1.2-16ubuntu1)
* using ‘opennms’ as the PostgreSQL user for OpenNMS
* using ‘opennms’ as the PostgreSQL password for OpenNMS
* using ‘opennms’ as the PostgreSQL database name for OpenNMS
- using SQL directory… /usr/share/opennms/etc
- using create.sql… /usr/share/opennms/etc/create.sql
- using iplike module… /usr/lib/postgresql/lib/opennms/iplike.so
- checking database for old backup tables… NONE
- checking for rows that violate constraints… NONE
- creating tables…
– checking table “serverMap”… CREATED
– checking table “serviceMap”… CREATED
– checking table “distPoller”… CREATED
– checking table “node”… CREATED
– checking table “ipInterface”… CREATED
– checking table “snmpInterface”… CREATED
– checking table “service”… CREATED
– checking table “ifServices”… CREATED
– checking table “events”… CREATED
– checking table “outages”… CREATED
– checking table “vulnerabilities”… CREATED
– checking table “vulnPlugins”… CREATED
– checking table “notifications”… CREATED
– checking table “usersNotified”… CREATED
– checking table “assets”… CREATED
- creating tables… DONE
- creating sequences…
– checking “nodeNxtId” minimum value… 1
– removing sequence “nodeNxtId”… CLEAN
– creating sequence “nodeNxtId”… OK
– checking “serviceNxtId” minimum value… 1
– removing sequence “serviceNxtId”… CLEAN
– creating sequence “serviceNxtId”… OK
– checking “eventsNxtId” minimum value… 1
– removing sequence “eventsNxtId”… CLEAN
– creating sequence “eventsNxtId”… OK
– checking “outageNxtId” minimum value… 1
– removing sequence “outageNxtId”… CLEAN
– creating sequence “outageNxtId”… OK
– checking “notifyNxtId” minimum value… 1
– removing sequence “notifyNxtId”… CLEAN
– creating sequence “notifyNxtId”… OK
– checking “vulnNxtId” minimum value… 1
– removing sequence “vulnNxtId”… CLEAN
– creating sequence “vulnNxtId”… OK
- creating sequences… DONE
- creating indexes…
– creating index “server_name_idx”… OK
– creating index “servicemap_name_idx”… OK
– creating index “serviceMap_ipaddr_idx”… OK
– creating index “node_id_type_idx”… OK
– creating index “node_label_idx”… OK
– creating index “ipinterface_nodeid_ipaddr_ismanaged_idx”… OK
– creating index “ipinterface_ipaddr_ismanaged_idx”… OK
– creating index “ipinterface_ipaddr_idx”… OK
– creating index “ipinterface_nodeid_ismanaged_idx”… OK
– creating index “ipinterface_nodeid_idx”… OK
– creating index “snmpinterface_nodeid_ifindex_idx”… OK
– creating index “snmpinterface_nodeid_idx”… OK
– creating index “snmpinterface_ipaddr_idx”… OK
– creating index “ifservices_nodeid_ipaddr_status”… OK
– creating index “ifservices_nodeid_status”… OK
– creating index “ifservices_nodeid_idx”… OK
– creating index “ifservices_serviceid_idx”… OK
– creating index “ifservices_nodeid_serviceid_idx”… OK
– creating index “events_uei_idx”… OK
– creating index “events_nodeid_idx”… OK
– creating index “events_ipaddr_idx”… OK
– creating index “events_serviceid_idx”… OK
– creating index “events_time_idx”… OK
– creating index “events_severity_idx”… OK
– creating index “events_log_idx”… OK
– creating index “events_display_idx”… OK
– creating index “events_ackuser_idx”… OK
– creating index “events_acktime_idx”… OK
– creating index “outages_svclostid_idx”… OK
– creating index “outages_svcregainedid_idx”… OK
– creating index “outages_nodeid_idx”… OK
– creating index “outages_ipaddr_idx”… OK
– creating index “outages_serviceid_idx”… OK
– creating index “outages_regainedservice_idx”… OK
– creating index “vulnerabilities_nodeid_idx”… OK
– creating index “vulnerabilities_ipaddr_idx”… OK
– creating index “vulnerabilities_severity_idx”… OK
– creating index “vulnerabilities_port_idx”… OK
– creating index “vulnerabilities_protocol_idx”… OK
– creating index “vulnplugins_plugin_idx”… OK
– creating index “notifications_ipaddr_idx”… OK
– creating index “notifications_serviceid_idx”… OK
– creating index “notifications_eventid_idx”… OK
– creating index “notifications_respondtime_idx”… OK
– creating index “notifications_answeredby_idx”… OK
– creating index “userid_notifyid_idx”… OK
- creating indexes… DONE
- inserting initial table data for “distPoller”… OK
- checking if database “opennms” is unicode… ALREADY UNICODE
- checking for stale iplike references… CLEAN
- checking for stale eventtime.so references… CLEAN
- adding iplike database function… OK
- adding PL/pgSQL call handler… OK
- adding PL/pgSQL language module… OK
- adding stored procedures…
– getManagedServiceCountForNode.sql… OK
– getManagedServiceCountForIntf.sql… OK
– getOutageTimeInWindow.sql… OK
– getManagePercentAvailNodeWindow.sql… OK
– getManagePercentAvailIntfWindow.sql… OK
– getManagedOutageForNodeInWindow.sql… OK
– getPercentAvailabilityInWindow.sql… OK
– getManagedOutageForIntfInWindow.sql… OK
Installer completed successfully!
If you get an error about connection problems, make sure that you have edited the two files explained earlier and that you have restarted the Postgresql server.
Apply this Patch:
Edit the /var/lib/tomcat4/webapps/opennms.xml file in a text editor and apply this patch
Please make shure the local path matches your installation. It should look like this :
<Context path="/opennms" docBase="/usr/share/opennms/webapp"
debug="0" reloadable="true">
<!--<Logger className="org.opennms.web.log.Log4JLogger" homeDir="/usr/share/opennms" />-->
<Realm className="org.opennms.web.authenticate.OpenNMSTomcatRealm"
homeDir="/usr/share/opennms" />
</Context>

During my Tomcat installation the Group “Tomcat” was not created, so we are going to create one our selves.
sudo addgroup tomcat
At this point I restart Ubuntu to make sure that all services start fine….which they do.
OK
Point your browser to http://machine_ip:8180/opennms
You should be prompted for a user name and password, which is:
username: admin
Pass: admin
Please edit these two files before using Opennms. Please read the Documentation on their site for more info.
* /etc/opennms/discovery-configuration.xml
* /etc/opennms/snmp-config.xml
Issues:
1. When you try to change any settings in the web console you will get java errors about permissions when you try to save any changes.
2. Creating reports in pdf and html does not work. Once again permissions and extra packages to be installed.
3. Read and Read more on the OPenNMS website.
Solutions
1. The owner of the files giving errors should be Tomcat4.Because OpeNMS uses Tomcat4 to run, Tomcat4 will be the user making and writing changes to these files which only root has privs over at the moment
sudo chown -R tomcat4:tomcat /etc/opennms
2. Go to /usr/share/opennms/share/
sudo chown -R tomcat4:tomcat reports
sudo chmod -R g+w reports
Install ghostscript fonts.
sudo apt-get install gsfonts
I have not been able to get the reports to work just yet. I still need to confirm whether or not my box is sending email and that the reports are actually being created.
[mygal=opennms]
Hi,
I would first like to say excellent “How To” from start to finish. Secondly I would like to be notified if and when you figure out the “Reporting”.
Thank you, in advance
Hi,
Nice “How to”, but with when I run this command :
sudo apt-get install librrd0-jni rrdtool librrd0 libicmp-jni libopennms-java opennms-common opennms-contrib libiplike-pgsql. It needs PostgreSQL version 8.2 but OpenNMS run with version 8.1.
I can’t uninstall last PostgreSQL version because there are dependencies with OpenNMS packages.
Good work !
Hi,
I am using Gutsy Ubuntu (2.6.22-14-generic). I am trying to install opennms, and I am following your howto, cause, first I try debian installation, included postgresql, and I got error trying to make the install script of opennms (database problems). So I followed your how to. Problem arises when I try to install libiplike-postgresql, which has dependencies with postgresql, which at the same time can not be installed without postgresql-8.2. Can you help me?
Thanks in advance
Jorge
Hi All.
I see that every time someone tries to install libiplike-pgsql it wants version 8.2 of PostgresSQL.
I suggest that you should download libiplike-pgsql from Sourceforge and install it manually. I will do a clean install myself and see what solution we can come up with.
http://downloads.sourceforge.net/opennms/libiplike-pgsql_1.2.8-1sarge_i386.deb?modtime=1151687410&big_mirror=0
Hi,
Just checking back to see if anyone got the reporting piece working.
Hi All.
I was in the process of running through my howto when I came across some packages that have been update and paths not matching anymore.
When I got to the part of installing tomcat it installed fine but did not want to start up due to JAVA missing.
The Error I Got was:
Could not start Tomcat 4.1 servlet engine because no Java Development Kit
(JDK) was found. Please download and install JDK 1.3 or higher and set
JAVA_HOME in /etc/default/tomcat4 to the JDK’s installation directory.
I then proceeded to find the path to java and it has changed to: JAVA_HOME=/usr/lib/jvm/java-6-sun
What now needs to be done is to change your JAVA_HOME in /etc/profile.
Now you need to add: JAVA_HOME=/usr/lib/jvm/java-6-sun to /etc/default/tomcat4
Once all this is done we must make sure that our version of Java is the correct one being used.Run the code below.
sudo update-alternatives –config java
A menu type system will appear and you need to choose the option pointing to /usr/lib/jvm/java-6-sun. This was option 2 for me.
This is the only issues I have come across so far. I am yet to get to installing opennms. This will be done in the next day or two.
I’m sorry for the inconvenience, but packages do get updated and paths tend to change.
I will update the Howto by Wed 16 Jan.
Hi James.
I have not been able to spend time resolving the reports issue.
Sorry
It is something that I would like to get resolved but getting the time at work to do it is difficult.
Best Wishes
Craig
Hi Everyone.
I have installed Ubuntu Server 7.10 at work on a virtual machine and did all updates. I followed my howto step by step updating a few issues here and there. I have successfully installed openNMS and tested it.
I have updated the Java section and Tomcat4 section of my Howto. Please review for changes.
Ubuntu Desktop 7.10:
I got as far as the OpenNMS section of my howto on Ubuntu Desktop 7.10, but for some reason that is where I’m getting dependency issues with installing the libraries for openNMS as most of you are having. For some reason Desktop is behaving differently than server. I can then only suggest that you don’t use the desktop version.
Please let me know if this helps.
Regards
Craig
I can’t thank you enough for the information you’ve provided. Everything went very smoothly for my install and the system is up and running.
Thank you again,
Best regards,
Joshua
Report Issue.
Ok, so the reports get created but I just can’t get them to be emailed to me.
The temporary solution to this is use mc (midnight commander) and go to the reports folder at “/usr/share/opennms/share/reports” and transfer it to your machine. I still have not had time to diagnose whether it is opennms, my routes incorrectly setup or my mail server not working correctly…
Hope this helps.
Regards
Craig
Hi, it looks like the opennms postgresl module now points to version 8.2 and according to this post http://osdir.com/ml/network.opennms.install/2006-12/msg00015.html
you need 8.1. Have you encountered this issue?
Here is the error:
- checking for stale iplike references… CLEAN
- checking for stale eventtime.so references… CLEAN
- adding iplike database function… Exception in thread “main” org.postgresql.util.PSQLException: ERROR: incompatible library “/usr/lib/postgresql/lib/opennms/iplike.so”: missing magic block
at org.postgresql.util.PSQLException.parseServerError(PSQLException.java:139)
at org.postgresql.core.QueryExecutor.executeV3(QueryExecutor.java:152)
at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:100)
at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:43)
at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:517)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:50)
at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:298)
at org.opennms.install.Installer.updateIplike(Installer.java:1694)
at org.opennms.install.Installer.install(Installer.java:265)
at org.opennms.install.Installer.main(Installer.java:2453)
root@ubuntu-maru:/usr/lib/postgresql/8.2/bin#
Hi Claudia.
Unfortunatly Opennms needs Postgresql 8.1 for the database to be created correctly. I have not found a work around for 8.2. All I can suggest is that you remove and purge PostgreSQL8.2 and install 8.1. Please don’t do an upgrade as this will upgrade 8.1 to 8.2. I might suggest you do an upgrade after the database and tables are created for opennms…but I personally heve not tested this.
Sorry I can’t be any more of assistance.
Regards
Craig
hello
attempt to install the service Web op opennms and by some reason marks the folowing error to me do you help me? really I must install tomcat 5.5?
opennms-webapproot@noc-vm:/usr/share/opennms/share# sudo apt-get install opennms-webapp
Leyendo lista de paquetes… Hecho
Creando árbol de dependencias
Leyendo la información de estado… Hecho
No se pudieron instalar algunos paquetes. Esto puede significar que
usted pidió una situación imposible o, si está usando la distribución
inestable, que algunos paquetes necesarios no han sido creados o han
sido movidos fuera de Incoming.
Como sólo solicito una única operación, es extremadamente posible que el
paquete simplemente no sea instalable y deberÃa de rellenar un informe de
error contra ese paquete.
La siguiente información puede ayudar a resolver la situación:
Los siguientes paquetes tienen dependencias incumplidas:
opennms-webapp: Depende: tomcat5.5 (>= 5.5.20) pero no va a instalarse
E: Paquetes rotos
Hi manfredo.
OpenNMS needs Tomcat as the web server to run. OpenNMS uses Java and Tomcat is a web server that was built for the Java Platform. There is no way that I know of getting around not installing and using Tomcat. If you follow my howto, I’m very sure you will be successful in getting OpenNMS working.
Regards
Craig
Hi,
Great article but I get an error when trying to install tomcat:
Package tomcat4 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
I’m almost there… Man! this is my third attempt at installing OpenNMS and I’m having such bad luck. This is why I’ve been reluctant to put linux in.. sigh I can see what it can do but the cost in man hours is insane… argh
Hi Rafal.
Have you tried uncommenting the two lines in the “back ports” option in your “sources.list” file for apt? Once this is done, do an “apt-get update” and try installing tomcat again. It should install fine.
Good luck.
Regards
Craig
Hi Craig,
Thanks for the tutorial.
Please note that it doesn’t work for Ubuntu Server 7.10 – Gutsy Gibbon 64 Bit.
I made the mistake of not checking supported operating systems. I made it all the way through the Tomacat installation.
My fault for not checking, but it could save someone else some time if you put “32 bit only” under prerequisites.
FYI it will fail here: sudo apt-get install librrd0-jni rrdtool librrd0 libicmp-jni libopennms-java opennms-common opennms-contrib libiplike-pgsql
With the error: Reading package lists… Done
Building dependency tree
Reading state information… Done
Package librrd0-jni is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package librrd0-jni has no installation candidate
Oh well, back to the drawing board…
Thanks,
Mikrodots
Hi Craig!
I would encourage you to join the opennms-discuss mailing list (http://www.opennms.org/index.php/Mailing_lists) for help with your reports issue.
This is a great write-up on 1.2.9 installation, but I would like to point out (as a maintainer of OpenNMS) that the 1.2.9 release is quite old and about to be superseded by a new stable release 1.6.0. The current unstable release 1.3.11 is leaps and bounds beyond 1.2.9, so much so that we’re skipping 1.4 and going straight to 1.6 as a way of underscoring just how much improvement has happened in the past two years. 1.3.11 is the last release of the 1.3.x unstable series. We’re about to release 1.5.90 which we will also call 1.6.0-beta1.
One area where we have focused our work lately is in packaging. Anybody who wants to see the very latest that our project has to offer should give 1.3.11 a spin — it’s much easier to install on Debian and Ubuntu than any previous release. Don’t be scared by the “unstable” designation — that term refers to feature additions; 1.3.11 is probably our most rock-solid release ever. The following wiki article outlines the process if you want to give it a try:
http://www.opennms.org/index.php/Installation:Debian
Best,
-jeff
Hello.
This guide has been very helpful. However, I recommend one change. That is deleting the first part about prerequisites. This to me implies that the JDK, Tomcat and Postgresql must be installed BEFORE doing the remaining parts of the guide, which clearly is not the case. Or, perhaps it can be rephrased to say that it is a prerequisite to have these tools installed before the opennms installation can begin and then state that the guide will show you how to do that. Thanks for a great guide and your time.
Hi Matt.
Thank you for the feedback and I will take your advice and amend the prerequisites section of the Howto. Glad I could help.
Regards,
Craig
hi,
thank you for the good information
I installed the opennms but I got some problems:
1- I can’t see the map when I click
http://localhost:8980/opennms/Index.map
*note that I already installed adobe SVG
2- I have a snort sensors on other host but I can’t get any alerts from it
* I follow the steps on opennms documentation but it still does not receive any thing
I can continue my step to install opennms because this problem.I am using ubuntu gutsy dekstop versioan and i’m newbie in ubuntu. please help me
Manage apt’s list of trusted keys
apt-key add – add the key contained in (‘-’ for stdin)
apt-key del – remove the key
apt-key update – update keys using the keyring package
apt-key list – list keys
tarigan@tarigan-desktop:~$ sudo apt-get update
E: Syntax error /etc/apt/apt.conf:8: Extra junk at end of file
tarigan@tarigan-desktop:~$ sudo apt-get update
E: Syntax error /etc/apt/apt.conf:8: Extra junk at end of file
tarigan@tarigan-desktop:~$ sudo apt-get install build-essential nmap mutt libnet-ssleay-perl libauthen-pam-perl libio-pty-perl libmd5-perl java-common
E: Syntax error /etc/apt/apt.conf:8: Extra junk at end of file
Hi Feri.
I have tried installing this version of OpenNMS on Ubuntu Desktop and I could not get it to work as for some reasons there is a difference between Server and Desktop editions.
If you would like to continue, please read on.
It seems that you have a line in your sources.list file that is incorrect.
Please remove any lines that you have added from this howto and follow the instructions below.
You will need to add these two lines below to your sources.list file:
deb http://debian.opennms.org stable main
deb-src http://debian.opennms.org stable main
Once this is done you will need to run this command in the console as root:
wget -O – http://debian.opennms.org/OPENNMS-GPG-KEY | sudo apt-key add -
I think you might have added the above command to your sources.list file.
I hope this has helped.
Regards
Craig
Hi Yaser.
Search for a file called: map.disable and rename it to map.enable
I cant remember of the top of my head if there was anything else that needed to be changed. You can go to OpenNMS website and search for it there.
Hope it works.
Regards
Craig
excellent write-up…worked faultlessly for me. However, I got loads of notifications about superseded postgresql, which though they indicate I need to update this, did not prevent the install working. If *anyone* has an install How-To that is current (June 2008), as good as this one, and works, can you post the URL. All that said, this is still a superb example of a howto that WORKS!
I am using Ubuntu 8.4 and have updated it.
Thanx a lot for this post. it really guided me well.. now that i hav installed everything i am facing one problem with connection of postgresql-8.1
i removed postgresql-8.3 and then installed 8.1 then edited al the files as guided.
and when i run this command : sudo apt-get install opennms
it asks me to install postgresql8.3 again.. so i dont allow it as i’ve alredy installed that..
The error i am getting is :
root@sushant-desktop:/usr/share/opennms/bin# sudo $OPENNMS_HOME/bin/install -disU
==============================================================================
OpenNMS Installer Version $Id: Installer.java 3056 2006-03-26 19:39:16Z djgregor $
==============================================================================
Configures PostgreSQL tables, users, and other miscellaneous settings.
Exception in thread “main” org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:204)
at org.postgresql.Driver.connect(Driver.java:139)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at rg.opennms.install.Installer.databaseConnect(Installer.java:616)
at org.opennms.install.Installer.install(Installer.java:195)
at org.opennms.install.Installer.main(Installer.java:2453)
plz guide me further.. what shal i do..??
Regards
Sushant Sapra
Hi Sushant.
I’m not too clued up with sql databases running on PostgreSQL.
This line “Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.” tells me that PostgreSQL-8.1 is not running. Have your tried restarting the server and see if it works then? There might still be a reference to the newer version of PostgreSQL. The best is maybe to use Google. Oh, you should also do a search for the newer PostgreSQL folders and delete them.
I know this is not much, but we have to start some where.
Good luck.
P.S
Please let me know what the issue was – I would appreciate it.
Regards,
Craig
hi craig,
i deleted my previous version of postgresql and m able to install the version 8.1 through some mirrors..
thanx a lot for ur help..
Now my openNMS installation is complete according to this tutorial.. Please tell me the commands to start using it.. i mean what is the next step..??
thanx in advance..
Regards,
Sushant Sapra
Hi Sushant.
I’m glad to hear that you got PostgreSQl running. Were you able to install the OpenNMS database into PostgreSQl successfully?
Assuming that everything installed correctly all you have to do is go to: http://localhost:8180/opennms. Please not that port 8180 is the port that tomcat listens on.The OpenNMS logon page should appear and you can logon as admin with password being also admin.
If that does not work make sure that Tomcat and OpenNMS are both running.
Code:
# sudo /etc/init.d/tomcat restart
# sudo /etc/init.d/opennms restart
That should be it.
Let me know if it is working for you.
Regards,
Craig
Your blog is interesting!
Keep up the good work!
These directions do not work on Ubuntu 7.10. All of the following dependecies I was unable to obtain through apt:
* librrd0-jni
* librrd0
* libiplike-pgsql
sudo apt-get install tomcat4 tomcat4-admin tomcat4-webapps
So if you can’t meet these dependecies how can you go on???????
Is there a apt mirror that I am missing the ones supplied do not contain Tomcat4 at all. “back ports†Does not work either.
Hi Ken,
It does not surprise me as the repo’s change over time and software gets removed and added with the newer versions. You could try searching for the packages in Google and install them manually. You can get tomcat on their site at http://tomcat.apache.org/tomcat-4.1-doc/index.html.
Please keep in mind that this blog is very old and the version of OpenNMS is much more mature with many more features which in the long run is more beneficial. If I get time I will try and get the latest version up and running on Ubuntu Server 8.04LTS.
Sorry I can’t help any further.
Good Luck.
Regards,
Craig
#####Install OpenNMS 1.6.1 on Xubuntu 8.10 32 bit(edited from original at http://www.crashinit6.com/blog/?p=10 for OpenNMS 1.2.9 on Ubuntu server 7.10)
(Use At Your Own Risk no guanrantee implied or given!!!!!!!!!!!!!!)
####Prerequisites
#### Postgresql-8.3
#### Java jdk
###***Step One***###
###We need to edit the /etc/apt/sources.list file and add the two lines below.###
deb http://debian.opennms.org stable main
deb-src http://debian.opennms.org stable main
sudo nano /etc/apt/sources.list
###Add the OpenNMS PGP Key to APT
wget -O – http://debian.opennms.org/OPENNMS-GPG-KEY | sudo apt-key add -
###Run the APT command.
sudo apt-get update
###and
sudo apt-get upgrade
###on your system
###***Step Two***###
###We need to install necessary files to prevent any dependency problems.
sudo apt-get install build-essential nmap mutt libnet-ssleay-perl libauthen-pam-perl libio-pty-perl libmd5-perl java-common
###***Step Three***###
###We need to install Postgressql where the database will reside for OpenNMS
sudo apt-get install postgresql-8.3 postgresql-8.3-pljava-gcj postgresql-client-8.3 postgresql-contrib-8.3 postgresql-client-common postgresql-common
###Set Environment variable for POSTGRES_HOME. Insert the following entries in /etc/profile.
# POSTGRES_HOME=”/etc/postgresql/8.3″
# export POSTGRES_HOME
###Now in your console type:
source /etc/profile
###This is to read the profile file and make the POSTGRES_HOME variable work.
###Customizing the postgresql.conf file in /etc/postgresql/8.3/main
###This file controls some basic parameters of Postgres. We need to change three of these parameters.
###1. Find the line in the file that contains max_connections.It needs to read:
# max_connections = 256
###Customizing the pg_hba.conf file in /etc/postgresql/8.3/main
###The pg_hba.conf file controls which machines and users can access the database on a given machine via TCP/IP.
###Since that is how OpenNMS accesses the database (via localhost) it is necessary to modify this file to allow OpenNMS to work.The easiest thing to do is ###to just allow anyone from the localhost to access the database (do not add the last line if your system does not support IPv6):
#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
# Make sure that no other lines are uncommented in this file.You will need to restart Postgres after making these changes.
# Path to stop and start PGSQL >> /etc/init.d/postgresql-8.3 restart
###!!!Step Four!!!###
###Install Java
###The Java must be JDK (Java Development Kit)
sudo apt-get install sun-java6-jdk
###Set Environment variable for JAVA_HOME. Insert the following entries in /etc/profile.
# JAVA_HOME=”/usr/lib/jvm/java-6-sun”
# export JAVA_HOME
###Now in your console type:
source /etc/profile
###If you would like to set which version of Java to run in your Distro or would like to find the path of the Java you are running, use this:
sudo update-alternatives –config java
###!!!Step Five!!!###
###Opennms Installation
###Required Files:
###Libraries
### * librrd2-jni
### * librrd2
### * jicmp
### * iplike-pgsql83
### * libopennms-java
###Opennms Files
### * opennms-common
### * opennms-contrib
### * opennms-server
### * opennms-db
### * opennms
### * opennms-webapp-jetty
###Follow this procedure to install Opennms.
sudo apt-get install librrd2-jni rrdtool librrd2 jicmp libopennms-java opennms-common opennms-contrib iplike-pgsql83
###We are going to install each application of Opennms to make sure that each one installs without errors and if there are we should resolve them before we ###carry on with the installation.
sudo apt-get install opennms-db
sudo apt-get install opennms-server
sudo apt-get install opennms-webapp-jetty
###If all went well, you should have had no errors.
###We need to specify the path to our Java installation for opennms to work correctly;
### Go to /usr/share/opennms/bin folder.
sudo ./runjava -S /usr/lib/jvm/java-6-sun/bin/java
###Your output should be something like this:
### runjava: checking specified JRE: /usr/lib/jvm/java-6-sun/bin/java
### runjava: specified JRE is good.
### runjava: value of /usr/lib/jvm/java-6-sun/bin/java stored in configuration file
sudo apt-get install opennms
###Setup Environment variable for OPENNMS_HOME.Insert the following entries in /etc/profile.
# OPENNMS_HOME=”/usr/share/opennms”
# export OPENNMS_HOME
###Now in your console type:
source /etc/profile
###This is to read the profile file and make the OPENNMS_HOME variable work.
###Run the Installer to Setup the PostgreSQL Database
sudo $OPENNMS_HOME/bin/install -disU
###$OPENNMS_HOME path is /usr/share/opennms
###Hopefully you will get the line below
###Installer completed successfully!
###If you get an error about connection problems, make sure that you have edited the two files explained earlier and that you have restarted the Postgresql ###server.
###OK
###Point your browser to http://localhost:8980/opennms
###You should be prompted for a user name and password, which is:
###username: admin
###Pass: admin
###Please edit these two files before using Opennms. Please read the Documentation on their site for more info.
###* /etc/opennms/discovery-configuration.xml
### * /etc/opennms/snmp-config.xml
Thanks for your help. Hope this helps someone.
Hi dpetduck,
Thanx for posting an update to my how to.
I will test this with the latest version of Ubuntu Server, but if it worked for you I’m sure that I won’t get any or few errors.
Regards,
Craig
Problem invoking maps with opennms on Ubuntu 8.10 using firefox. Receive message:
“To view this page you need an SVG viewer. There is currently no Adobe SVG Viewer available for your browser. Click here for more information.”
Anyone else experiencing this issue?
I downloaded the adobe vga 3.01 beta and installed it. no change.
This post is great. Thank you for this post. I like these type of people who share knowledge with others, free of charge too