[Ubuntu] Install OpenNMS, Open JDK7 and PostgreSQL3 on Ubuntu12.04LTS

[Ubuntu] Install OpenNMS, Open JDK7 and PostgreSQL3 on Ubuntu12.04LTS

1.0 Install Open JDK7

$ sudo apt-get install openjdk-7-jdk

1.1 Install Oracle JDK7

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java7-installer

You can choose one of the above JDKs to install on your Ubuntu12.04, but if you install Oracle JDK7, maybe it will occur compilation fail.

2. Download and install jicmp and jicmp6:
To build jicmp from source, in addition to the Jicmp tarball you’ll also need automake, autoconf, and libtool.

$ sudo apt-get install autoconf libtool automake make
$ wget http://sourceforge.net/projects/opennms/files/JICMP/stable-1.4/jicmp-1.4.2.tar.gz
$ tar -zxf jicmp-1.4.2.tar.gz
$ cd jicmp-1.4.2
$ autoreconf -fvi
$ ./configure
$ make
$ sudo make install
$ cd
$ wget http://sourceforge.net/projects/opennms/files/JICMP6/stable-1.2/jicmp6-1.2.2.tar.gz
$ tar -zxf jicmp6-1.2.2.tar.gz
$ cd jicmp6-1.2.2
$ autoreconf -fvi
$ ./configure
$ make
$ sudo make install

3. Install PostgreSQL3
If you install PostgreSQL other version, you need to uninstall it at first:
$ sudo apt-get remove postgresql-9.1

$ sudo apt-get update
$ sudo apt-get -y install python-software-properties
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add –
$ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
$ sudo apt-get update
$ sudo apt-get install postgresql-9.3 pgadmin3

(1) To allow user access to database w/o password, modify /etc/postgresql/{$PGVERSION}/main/pg_hba.conf

$ sudo vi /etc/postgresql/9.3/main/pg_hba.conf

# TYPE  DATABASE        USER            ADDRESS                METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust # peer
# IPv4 local connections:
host    all             all               trust # md5
# IPv6 local connections:
host    all             all             ::1/128                 trust # md5

(2) To allow TCP/IP connections, modify /etc/postgresql/{$PGVERSION}/main/postgresql.conf

$ sudo vi /etc/postgresql/9.3/main/postgresql.conf

listen_addresses = 'localhost'

(3) Restart postgresql:

$ sudo service postgresql restart

4. Build OpenNMS:
(1) Checkout OpenNMS code from Git server:

$ git clone git://github.com/OpenNMS/opennms.git
$ cd opennms

(2) Go to project directory, compile & assemble project:

$./assemble.pl -Dopennms.home=/opt/opennms

This will compile and build all the code and assemble a distribution under target/opennms-${version} and can be run from that location.

$ cd target
$ cp -p opennms-${version}.tar.gz /opt/opennms
$ cd /opt/opennms
$ tar zxf opennms-${version}.tar.gz
$ chmod +x bin/*

(3) Set the JVM:

$ ./bin/runjava -s

(4) Set up the database:

$ ./bin/install -dis

(5) Test database connectivity

$ psql -U postgres --host=localhost opennms

(6) Start opennms:

$ sudo ./bin/opennms start

you can simply browse to http://localhost:8980/opennms and see the webapp front end.




Developing OpenNMS with Eclipse Kepler(v4.3)

Install Eclipse Plugins
1. http://eclipse.opennms.org/
* m2e connector for castor

2. http://dist.springframework.org/release/IDE
* Spring IDE Core
* Spring IDE AOP Extension
* Spring IDE OSGi Extension

3. http://download.eclipse.org/egit/updates
* Eclipse EGit Feature
* Eclipse JGit Feature

4. Kepler Update Site: http://download.eclipse.org/releases/kepler

5. http://download.eclipse.org/m2e-wtp/releases/kepler/
* Maven Integration for WTP/Maven Integration for WTP

6. http://dist.springsource.org/release/GRECLIPSE/e4.3/
* Groovy-Eclipse/Groovy-Eclipse Feature
* Groovy Eclipse SDK/Groovy-Eclipse JDT Patch Sources Feature
* Groovy Eclipse SDK/Groovy-Eclipse Sources Feature

7. http://dl.google.com/eclipse/plugin/4.3
* Plugin/Google Plugin for Eclipse
* SDKs/Google Web Toolkit SDK

Increase the heap size available to Eclipse:
You can also put the extra options in eclipse.ini.


Import OpenNMS into Eclipse:
1. Go to File->Import and select Maven->Existing Maven Projects

2. Select your ~/rcs/opennms directory as your root, and select all projects. Hit “Finish” to import. (This will take a while to do the first build.) You may want to deselect “opennms-tools” when importing, since it contains projects that have external (private) dependencies.

3. Select all projects, right-click, and choose Maven->Update Project Configuration

(Visited 107 times, 1 visits today)
Comments are closed.