系統環境:Centos 5.2
1.安裝yum-fastestmirror
.[root@localhost ~]# yum install yum-fastestmirror
Setting up Install Process
...
Running Transaction
Installing: yum-fastestmirror ######################### [1/1]
Installed: yum-fastestmirror.noarch 0:
Complete!
2.安裝Repository RPMs
[root@localhost ~]# rpm -Uvh http://yum.opennms.org/repofiles/opennms-repo-stable-rhel5.noarch.rpm
查詢可安裝的套件
[root@localhost ~]# yum list opennms
…….
Available Packages
opennms.noarch
3.安裝postgresql-server
[root@localhost ~]# yum -y install postgresql-server
……
Transaction Test Succeeded
Running Transaction
Installing: postgresql ######################### [1/2]
Installing: postgresql-server ######################### [2/2]
Installed: postgresql-server.i386 0:
Dependency Installed: postgresql.i386 0:
Complete!
4.啟動postgresql並設定開機時啟動。
[root@localhost ~]# service postgresql start
Initializing database: [ OK ]
Starting postgresql service: [ OK ]
[root@localhost ~]# chkconfig postgresql on
5. Install OpenNMS
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
opennms noarch
Installing for dependencies:
jdk i586 2000:
jicmp i386
opennms-core noarch
opennms-webapp-jetty noarch
Transaction Summary
=============================================================================
Install 5 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size:
Is this ok [y/N]: y
Downloading Packages:
(1/5): opennms-core-1.6.1 100% |=========================| 49 MB 03:30
(2/5): opennms-webapp-jet 100% |=========================| 30 MB 01:36
(3/5): jdk-1_5_0_15-linux 100% |=========================| 46 MB 03:02
(4/5): opennms-
(5/5): jicmp-
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID
Importing GPG key 0x
6.將/etc/yum.repos.d/opennms*.repo檔案加入以下的參數
enabled=0
7. Configure OpenNMS
[root@localhost ~]# export OPENNMS_HOME=/opt/opennms
8. Configure Database
pg_hba.conf 與 postgresql.conf 在 /var/lib/pgsql/data下
[root@localhost ~]# vi /var/lib/pgsql/data/ pg_hba.conf
原有的參數設定
local all all ident sameuser
host all all 127.0.0.1/32 ident sameuser
host all all ::1/128 ident sameuser
改成
local all all trust
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
[root@localhost ~]# vi /var/lib/pgsql/data/ postgresql.conf
# 去除 "*" 如下
listen_addresses = 'localhost'
9.重新啟動services並建立Database
[root@localhost ~]# service postgresql restart
[root@localhost ~]# sudo -u postgres createdb -U postgres -
10.安裝iplike
[root@localhost ~]# yum install iplike
[root@localhost ~]# install_iplike.sh
CREATE FUNCTION
11.設定OpenNMS 連結到 Java
[root@localhost ~]# $OPENNMS_HOME/bin/runjava –s
12.加入JAVA_HOME 到 /etc/default/opennms
[root@localhost ~]# vi /etc/default/opennms
JAVA_HOME=/usr
13. 初始化OpenNMS 與 Database
# i386 example
$OPENNMS_HOME/bin/install -dis -l /usr/lib/jni:/usr/lib
# x86_64 example
$OPENNMS_HOME/bin/install -dis -l /usr/lib64/jni:/usr/lib64
…………..
Installer completed successfully!
表示成功了。
14.編輯$OPENNMS_HOME/etc/discovery-configuration.xml,設定所要監看的IP區間
15.啟動opennms的service,並設定開機時啟動
[root@localhost ~]# service opennms start
[root@localhost ~]# chkconifg opennms on
16.由瀏覽器連線到SERVER看結果
初始帳號密碼:admin/admin
17.在opennms運行一段時間後,就可以看到下列的訊息。