最近想做监控,于是打起了OPENNMS的主意。到OPENNMS官方网站上找到官方文档,其中YUM安装方式还是最容易。下面都是安装步骤(基本上都是官网英文资料):
环境:CentOS 5.1
1.[user@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. rpm -Uvh
3.[user@localhost]$ yum list opennms
...
Available Packages
opennms.noarch 1.3.7-0.7377 opennms-snapshot
4.安装数据库:Postgresql
[user@localhost]$ yum -y install postgresql-server
Setting up Install Process
...
Running Transaction
Installing: postgresql-server ######################### [1/1]
Installed: postgresql-server.x86_64 0:8.2.5-1.fc8
Complete!
5. 建立数据库:createdb -U postgres -E UNICODE opennms
建产数据库语言:createlang -U postgres plpgsql opennms
6.安装OpenNMS,这个过程有点漫长,因为需要下载大约82M的东西。
[user@localhost]$ yum install opennms
...
Setting up repositories
opennms-snapshot-rhel5 100% |=========================| 1.1 kB 00:00
opennms-unstable-common 100% |=========================| 1.1 kB 00:00
opennms-stable-common 100% |=========================| 1.1 kB 00:00
opennms-unstable-rhel5 100% |=========================| 1.1 kB 00:00
...
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for opennms to pack into transaction set.
opennms-1.3.7-0.7377.noar 100% |=========================| 5.4 kB 00:00
---> Package opennms.noarch 0:1.3.7-0.7377 set to be updated
--> Running transaction check
--> Processing Dependency: opennms-core = 1.3.7-0.7377 for package: opennms
..
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
opennms noarch 1.3.7-0.7377 opennms-snapshot-common 5.9 k
Installing for dependencies:
jicmp i386 1.0-1 opennms-stable-rhel5 31 k
opennms-core noarch 1.3.7-0.7377 opennms-snapshot-common 48 M
opennms-webapp-jetty noarch 1.3.7-0.7377 opennms-snapshot-common 27 M
postgresql i386 8.1.9-1.el5 updates 2.8 M
postgresql-server i386 8.1.9-1.el5 updates 4.0 M
Transaction Summary
=============================================================================
Install 6 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 82 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): opennms-core-1.3.7 100% |=========================| 48 MB 03:57
...
Running Transaction
Installing: postgresql ######################### [1/6]
Installing: postgresql-server ######################### [2/6]
Installing: jicmp ######################### [3/6]
Installing: opennms-core ######################### [4/6]
Installing: opennms-webapp-jetty ######################### [5/6]
Installing: opennms ######################### [6/6]
- moving *.sql.rpmnew files (if any)... done
- checking for old update files... done
*** Installation complete. You must still run the installer and
*** make a few other changes before you start OpenNMS. See the
*** install guide and release notes for details.
Installed: opennms.noarch 0:1.3.7-0.7377
Dependency Installed: jicmp.i386 0:1.0-1 opennms-core.noarch 0:1.3.7-0.7377 opennms-webapp-jetty.noarch 0:1.3.7-0.7377 postgresql.i386 0:8.1.9-1.el5 postgresql-server.i386 0:8.1.9-1.el5
Complete!
7. 安装OPENNMS,在这过程中会检测两个模块,一个是Jicmp.so和Jrrd.so两个模块,但是在OPENNMS.ORG上其安装说明文档只安装了Jicmp模块,而没有指示安装JRRD模块,这样在操作这个过程时,会提示说找不到JRRD.so文件。因为我们先要安装JRRD。相同的道理,输入:yum install jrrd,自动安装。
8.创建环境变量
export OPENNMS_HOME=/opt/opennms
9.编辑vi /var/lib/pgsql/data/pg_hba.conf文件,实际上是一个访问控制文件。可做如下设置
local all all trust
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
10. yum install iplike
11.install_iplike.sh
12.$OPENNMS_HOME/bin/runjava –s
13. $OPENNMS_HOME/bin/runjava -S /usr/java/jdk1.5.0_18/bin/java
14.$OPENNMS_HOME/bin/install –dis
15./etc/init.d/opennms star
t
16.
阅读(658) | 评论(0) | 转发(0) |