TShopping

 找回密碼
 註冊
搜索
查看: 1642|回復: 5

[教學] Opennms 1.61安裝

  [複製鏈接]
發表於 2009-5-23 16:01:56 | 顯示全部樓層 |閱讀模式
 
Push to Facebook Push to Plurk Push to Twitter 
系統環境: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:1.1.9-2.fc8  
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  1.6.1-1  opennms-stable-c
   
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:8.1.11-1.el5_1.1
  Dependency Installed: postgresql.i386 0:8.1.11-1.el5_1.1
  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  1.6.1-1
opennms-stable-common 4.9 k
  Installing for dependencies:  
jdk i586 2000:1.5.0_15-fcs
opennms-stable-common 46 M
jicmp i386 1.0.7-1
opennms-stable-rhel5 46 k
opennms-core noarch 1.6.1-1
opennms-stable-common 49 M
opennms-webapp-jetty noarch 1.6.1-1
opennms-stable-common 30 M

  Transaction Summary
  =============================================================================
  Install
5 Package(s)
  Update
0 Package(s)
  Remove
0 Package(s)
   
  Total download size: 126 M
  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-1.6.1-1.no 100% |=========================| 4.9 kB 00:00
  (5/5): jicmp-1.0.7-1.i386 100% |=========================| 46 kB 00:00
  warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 4c4cbbd9
  Importing GPG key 0x4C4CBBD9 "OpenNMS Project (A Key for Signing OpenNMS RPMs) " from http://yum.opennms.org/OPENNMS-GPG-KEY   
  

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 -E UNICODE opennms
     
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(請注意您的系統是32bit或64bit之作業系統)
  # 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.啟動opennmsservice,並設定開機時啟動
  [root@localhost ~]# service opennms start
  [root@localhost ~]# chkconifg opennms on
   
16.由瀏覽器連線到SERVER看結果
  http://ServerIP:8980/opennms/
  初始帳號密碼:admin/admin
  

  17.opennms運行一段時間後,就可以看到下列的訊息。
  

 

臉書網友討論
發表於 2012-9-8 00:52:11 | 顯示全部樓層
好帖子,要頂!

版主招募中

您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2016-12-4 20:01 , Processed in 0.056557 second(s), 18 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表