2007-12-13

OpenNMS的Yum的安装方式,安装简单了很多

OpenNMS网站的安装文档:
http://www.opennms.org/index.php/Installation:Yum

下面是我在一个CentOS4的机器上按照上面文档安装的。

  1. 先浏览一下这个页面 http://yum.opennms.org/repofiles/ 找到适合你的OS的那一行。
  2. 我选择安装的是1.3.10-0.8030.snapshot 这是当前开发的最新版本的OpenNMS 运行命令: rpm -Uvh http://yum.opennms.org/repofiles/opennms-repo-snapshot-rhel4.noarch.rpm
  3. 检查是否安装成功, 运行命令: yum list opennms ;我能看到如下输出结果

[root@jng-hkg-48-dyn3328831 ~]# yum list opennms

Repository opennms-stable-common is listed more than once in the configuration

Repository opennms-stable-rhel4 is listed more than once in the configuration

Setting up repositories

Reading repository metadata in from local files

Available Packages

opennms.noarch 1.3.10-0.8030.snapshot opennms-snapshot

  1. 安装这个版本的OpenNMS,运行命令: yum install opennms ; yum会处理包的依赖关系,把需要安装的包都从网络下载并安装上,所以我按y键开始安装,根据网络快慢的情况不同,您需要等待~~

Dependencies Resolved

=============================================================================

Package Arch Version Repository Size

=============================================================================

Installing:

opennms noarch 1.3.10-0.8030.snapshot opennms-snapshot-common 5.0 k

Installing for dependencies:

iplike i386 1.0.6-1 opennms-snapshot-rhel4 10 k

jdk i586 2000:1.5.0_13-fcs opennms-snapshot-common 46 M

jicmp i386 1.0.4-1 opennms-snapshot-rhel4 43 k

opennms-core noarch 1.3.10-0.8030.snapshot opennms-snapshot-common 47 M

opennms-webapp-jetty noarch 1.3.10-0.8030.snapshot opennms-snapshot-common 27 M

postgresql i386 7.4.17-1.RHEL4.1 update 2.0 M

postgresql-server i386 7.4.17-1.RHEL4.1 update 3.0 M

Transaction Summary

=============================================================================

Install 8 Package(s)

Update 0 Package(s)

Remove 0 Package(s)

Total download size: 125 M

Is this ok [y/N]: y

  1. 建立/opt/opennms目录;导出到环境变量 export OPENNMS_HOME=/opt/opennms
  2. 配置数据库;启动数据库,第一次启动之后才能得到相关的配置文件; 运行命令: /sbin/service postgresql start
  3. 修改/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

  1. 修改 /var/lib/pgsql/data/postgresql.conf文件;内容如下

tcpip_socket = true

isten_addresses = 'localhost' (这一行加入了好些数据库启动不了了,去掉就行了,不知原因)

  1. 重新启动数据库服务;运行命令: /sbin/service postgresql restart
  2. 告诉OpenNMS JDK在那里; 运行命令:$OPENNMS_HOME/bin/runjava -S /usr/java/jdk1.5.0_13/bin/java
  3. 初始化OpenNMS的数据库;运行命令:$OPENNMS_HOME/bin/install -disU -l /usr/lib/jni:/usr/lib
  4. 启动OpenNMS;运行命令:/etc/init.d/opennms start
  5. 访问OpenNMS http://ip:8980/opennms 用户名和密码都是admin
  6. 进入管理部门,配置自动发现的ip范围,配置提示邮件。
  7. Enjoy open source software, have fun.

没有评论:

发表评论