Install OpenNMS on openSUSE 12.2: Difference between revisions

From JoBaPedia
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 3: Line 3:
Problem is, RPM packages are provided for RHEL/Centos/Fedora, but not Suse.
Problem is, RPM packages are provided for RHEL/Centos/Fedora, but not Suse.
There is also a general installation, so I use this
There is also a general installation, so I use this


=== Install JDK > 1.5 ===
=== Install JDK > 1.5 ===
Line 18: Line 17:
  zypper install postgresql postgresql-server
  zypper install postgresql postgresql-server
  insserv postgresql
  insserv postgresql
Make sure locale uses utf8: either POSTGRES_LANG in /etc/sysconfig/postgresql is empty and RC_LANG in /etc/sysconfig/language ends with .UTF-8 or POSTGRES_LANG ends with .UTF-8 (e.g. en_US.UTF-8)
If you don't have this and you already started postgresql once (database is already created), then you have to dump it (stop postgresql, save config in ~postgres/data, then remove data add the .UTF-8 and restart postgresql which initializes the db again, restore your saved config changes selectively and restart postgresql again). This will destroy data in the database, so take care you have a backup if needed.


* Create config files by starting postgres once
* Create config files by starting postgres once
Line 34: Line 36:
  host    all        all        127.0.0.1/32          trust
  host    all        all        127.0.0.1/32          trust
  host    all        all        ::1/128              trust
  host    all        all        ::1/128              trust
vi postgresql.conf
Add listen_address to enable tcpip and not just socket access and increase some limits
listen_addresses = 'localhost'
max_connections = 512
shared_buffers = 128MB
temp_buffers = 32MB


Now restart postgresql
Now restart postgresql
Line 85: Line 96:
  ./bin/runjava -s
  ./bin/runjava -s
  ./bin/install -dis
  ./bin/install -dis
sudo -u postgres /usr/sbin/install_iplike.sh
  ./bin/opennms start
  ./bin/opennms start


 
=== First Login ===
=== Login ===


Now start browsing at  
Now start browsing at  
Line 96: Line 107:
login as admin with pw admin (change that soon! Click on the username top right and then on change password)
login as admin with pw admin (change that soon! Click on the username top right and then on change password)


I recommend doing the tutorial now to set up [http://www.opennms.org/wiki/Capability_Scanning monitoring].
I recommend doing the tutorial now to set up basic [http://www.opennms.org/wiki/Capability_Scanning monitoring].


Capability scanning works best if devices run snmp:
Capability scanning works best if discovered devices run snmp. For servers you can:


* install net-snmp
* install net-snmp
* enter syslocation and syscontact in /etc/snmp/snmpd.conf
* enter syslocation and syscontact in /etc/snmp/snmpd.conf

Latest revision as of 14:48, 4 April 2013

Install OpenNMS on OpenSUSE 12.2

Problem is, RPM packages are provided for RHEL/Centos/Fedora, but not Suse. There is also a general installation, so I use this

Install JDK > 1.5

Oracle java is recommended, but I will try openjdk 1.7 since I already have it installed.

# javac -version
javac 1.7.0_15

Install Postgres

  • There is a postgresql for OpenSUSE, so I will install that one
zypper install postgresql postgresql-server
insserv postgresql

Make sure locale uses utf8: either POSTGRES_LANG in /etc/sysconfig/postgresql is empty and RC_LANG in /etc/sysconfig/language ends with .UTF-8 or POSTGRES_LANG ends with .UTF-8 (e.g. en_US.UTF-8) If you don't have this and you already started postgresql once (database is already created), then you have to dump it (stop postgresql, save config in ~postgres/data, then remove data add the .UTF-8 and restart postgresql which initializes the db again, restore your saved config changes selectively and restart postgresql again). This will destroy data in the database, so take care you have a backup if needed.

  • Create config files by starting postgres once
rcpostgresql start
  • Configure postgresql access as described on openNMS page
su - postgresql
cd data
vi pg_hba.conf

We will need to have these linees (usually change last words to trust):

local   all         all                               trust
host    all         all         127.0.0.1/32          trust
host    all         all         ::1/128               trust
vi postgresql.conf

Add listen_address to enable tcpip and not just socket access and increase some limits

listen_addresses = 'localhost'
max_connections = 512
shared_buffers = 128MB
temp_buffers = 32MB

Now restart postgresql

rcpostgresql restart

Install iplike

sudo zypper install postgresql-devel rpm-build
wget http://sourceforge.net/projects/opennms/files/IPLIKE/stable-2.0/iplike-2.0.3.tar.gz
tar xzf iplike-2.0.3.tar.gz
cd iplike-2.0.3
./configure
make rpm
sudo rpm -ihv ~/rpmbuild/RPMS/x86_64/iplike-2.0.3-1.x86_64.rpm

Install jicmp

wget http://sourceforge.net/projects/opennms/files/JICMP/stable-1.4/jicmp-1.4.0.tar.gz
wget http://sourceforge.net/projects/opennms/files/JICMP6/stable-1.2/jicmp6-1.2.0.tar.gz
rpmbuild --nodeps -tb --target=x86_64 jicmp-1.4.0.tar.gz
rpmbuild --nodeps -tb --target=x86_64 jicmp6-1.2.0.tar.gz
sudo rpm -ihv ~/rpmbuild/RPMS/x86_64/jicmp-1.4.0-1.x86_64.rpm ~/rpmbuild/RPMS/x86_64/jicmp6-1.2.0-1.x86_64.rpm

--nodeps required because openjdk is not detected

Install OpenNMS

jdk 1.7 not supported for build yet (compile errors)

That's why I built it on openSUSE 12.1 where jdk 1.6 is standard and then copied the rpm's to the 12.2 system.

  • On buildhost with openSUSE 12.1
wget http://sourceforge.net/projects/opennms/files/OpenNMS-Source/stable-1.10.8/opennms-source-1.10.8-1.tar.gz
tar xzf opennms-source-1.10.8-1.tar.gz 
cd opennms-1.10.8-1
find . -name *.spec -exec sed -i 's/^BuildRequires/# BuildRequires/' {} \;
./makerpm.sh
scp -r target/rpm/RPMS/noarch targetnode:/tmp/

Comment out BuildRequires because jdk dependency is not recognized

  • On targetnode with openSUSE 12.2
sudo rpm -ihv /tmp/noarch/*.rpm

First Start of OpenNMS

cd /opt/opennms
./bin/runjava -s
./bin/install -dis
sudo -u postgres /usr/sbin/install_iplike.sh
./bin/opennms start

First Login

Now start browsing at

http://localhost:8980/opennms/

login as admin with pw admin (change that soon! Click on the username top right and then on change password)

I recommend doing the tutorial now to set up basic monitoring.

Capability scanning works best if discovered devices run snmp. For servers you can:

  • install net-snmp
  • enter syslocation and syscontact in /etc/snmp/snmpd.conf