OpenNMS Installation Under Linux
This document is OpenNMS installation guide under Redhat Linux Enterprise Server 5.0. Start OpenNMS installation, you need to prepare following packages:
jdk-1_5_0_15-linux-i586.bin
jakarta-tomcat-4.1.31.tar.gz
postgresql-7.3.21.tar.gz
rrdtool-1.0.50.tar.gz
opennms-1.2.9-0_rhel5.i386.rpm
opennms-webapp-1.2.9-0_rhel5.i386.rpm
(Note: Assume all packages copy to directory /home/jacky)
1. JDK Installation
Unpack jdk with following command. vi ~/.bash_profile
[root@localhost jacky]# chmod +x jdk-1_5_0_15-linux-i586.bin
[root@localhost jacky]# ./jdk-1_5_0_15-linux-i586.bin
Reading Binary Code License Agreement and input “yes” to agree to license terms. After unpacking, rename directory jdk1.5.0_15 to java directory and move it to /opt.
[root@localhost jacky]# mv jdk1.5.0_15 java
[root@localhost jacky]# mv java /opt
Setup Environment variable for java home.Insert the following entries in /etc/profile.
[root@localhost jacky]# vi /etc/profile
JAVA_HOME=/opt/java
export JAVA_HOME
Save the file then exit and run the command to read /etc/profile.
[root@localhost jacky]# source /etc/profile
Input java -version check jdk install.
[root@localhost jacky]# java -version
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) Server VM (build 1.5.0_15-b04, mixed mode)
Notes: If you system had installed jdk, be likely to return following statement when input java -version, please input following command solve out this problem.
[root@localhost jacky]# java -version
-bash: /usr/bin/java: Permission denied
[root@localhost jacky]# cd /usr/bin
[root@localhost bin]# chmod +x java
[root@localhost bin]# java -version
Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.
[root@localhost /]# ln -s /opt/java/bin/java /usr/bin/java
ln: creating symbolic link `/usr/bin/java' to `/opt/java/bin/java': File exists
[root@localhost /]# mv /usr/bin/java /usr/bin/java.bak
mv: overwrite `/usr/bin/java.bak'? yes
[root@localhost /]# ln -s /opt/java/bin/java /usr/bin/java
[root@localhost /]# java -version
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) Server VM (build 1.5.0_15-b04, mixed mode)
2. Tomcat Installation
Add tomcat group and tomcat user under group, modfiy password to tomcat.
[root@localhost /]# groupadd tomcat
[root@localhost /]# useradd -g tomcat -d /opt/tomcat tomcat
[root@localhost /]# passwd tomcat
Changing password for user tomcat.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Decompressing tomcat tar.gz file, rename apache-tomcat-4.1.37 to tomcat and then move it to /opt folder.
[root@localhost jacky]# tar -zxvf apache-tomcat-4.1.37.tar.gz
[root@localhost jacky]# mv apache-tomcat-4.1.37 tomcat
[root@localhost jacky]# mv tomcat/* /opt/tomcat/
[root@localhost jacky]# chown -R tomcat.tomcat /opt/tomcat
[root@localhost jacky]# chown -R tomcat.tomcat /opt/tomcat/logs
[root@localhost jacky]# su - tomcat
Setup Environment variable for tomcat home. Insert the following entries in /etc/profile.
[tomcat@localhost ~]$ vi /etc/profile
CATALINA_HOME=/opt/tomcat
export CATALINA_HOME
Save the file then exit and run the command to read /etc/profile.
[tomcat@localhost ~]$ source /etc/profile
Start tomcat
[tomcat@localhost ~]$ /opt/tomcat/bin/startup.sh
Stop tomcat
[tomcat@localhost ~]$ /opt/tomcat/bin/shutdown.sh
3. RRDTool Installation
Untar tar.gz file, and run the following commands to make and install rrdtool.
[root@localhost jacky]# tar -zxvf rrdtool-1.0.50.tar.gz
[root@localhost jacky]# cd rrdtool-1.0.50
[root@localhost rrdtool-1.0.50]# ./configure --prefix=/opt/rrdtool;make;make install
When you run configure script, it may ask to install cgilib, if you don't have cgilib on your system, download cgilib from sourceforge.net and install it.
Then run the above commands again to install rrdtool.
Setup Environment variable for rrdtool home. Insert the following entries in /etc/profile.
[root@localhost jacky]# vi /etc/profile
RRDTOOL_HOME=/opt/rrdtool
export RRDTOOL_HOME
Save the file then exit and run the command to read /etc/profile.
[root@localhost rrdtool-1.0.50]#source /etc/profile
4. PostgreSQL Installation
Add tomcat group and tomcat user under group, modfiy password to tomcat.
[root@localhost ~]# groupadd postgres
[root@localhost ~]# useradd -g postgres -d /opt/pgsql postgres
[root@localhost ~]# passwd postgres
Changing password for user postgres.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]# chown -R postgres.postgres /opt/pgsql
Untar tar.gz file, and run the following commands to make and install postgresql.
[root@localhost jacky]# tar -zxvf postgresql-7.3.21.tar.gz
[root@localhost jacky]# cd postgresql-7.3.21
[root@localhost postgresql-7.3.21]# ./configure --prefix=/opt/pgsql
[root@localhost postgresql-7.3.21]# make && make install
After this process, add a user to manage postgresql and define home directory /opt/pqsql/ for this user.
[root@localhost ~]# cd /opt/pgsql/
[root@localhost pgsql]# mkdir /opt/pgsql/data
[root@localhost pgsql]# chown postgres /opt/pgsql/data
[root@localhost pgsql]# su - postgres
[postgres@localhost ~]$ cd /opt/pgsql/
[postgres@localhost pgsql]$ bin/initdb -D data/
Modfy postgresql connection parameters
[postgres@localhost pgsql]$ vi /opt/pgsql/data/postgresql.conf
tcpip_socket = true
max_connections = 256
shared_buffers = 1024
Copy postgresql src/include *.h file to /opt/pgsql/include, but don’t overwrite exists file.
[root@localhost /]# cd /home/jacky/postgresql-7.3.21/
[root@localhost postgresql-7.3.21]# cp -rf src/include /opt/pgsql/
cp: overwrite `/opt/pgsql/include/postgres_ext.h'? no
cp: overwrite `/opt/pgsql/include/libpq/libpq-fs.h'? no
cp: overwrite `/opt/pgsql/include/pg_config.h'? no
cp: overwrite `/opt/pgsql/include/pg_config_os.h'? no
Setup Environment variable for postgres home. Insert the following entries in /etc/profile.
[root@localhost ~]# vi /etc/profile
POSTGRES_HOME="/opt/pgsql"
export POSTGRES_HOME
Save the file then exit and run the command to read /etc/profile.
[root@localhost ~]# source /etc/profile
Start database use postgres user
su - postgres postmaster -i -D ~/data &
or
su - postgres -c "/opt/pgsql/bin/pg_ctl -D /opt/pgsql/data -l logfile start"
5. OpenNMS Installation
Install core and webapp OpenNMS of no dependencies with rpm package. Then OpenNMS default setup to directory /opt/opennms.
[root@localhost jacky]# rpm -ivh --nodeps opennms-1.2.9-0_rhel5.i386.rpm
Preparing... ########################################### [100%]
1:opennms ########################################### [100%]
- 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.
[root@Jacky-vm fang]# rpm -ivh --nodeps opennms-webapp-1.2.9-0_rhel5.i386.rpm
Preparing... ########################################### [100%]
1:opennms-webapp ########################################### [100%]
Now you can run following command to install opennms
[root@localhost source]# sh build.sh install
It will take time to complete installation process.
Setup Environment variable for OpenNMS home. Insert the following entries in /etc/profile.
[root@localhost jacky]# vi /etc/profile
OPENNMS_HOME=/opt/opennms
export OPENNMS_HOME
Save the file then exit and run the command to read /etc/profile.
[root@localhost ~]# source /etc/profile
6. OpenNMS Configuration
Before config OpenNMS, MUST start Postgresql.
Run the following commands to configure OpenNMS.
[root@localhost /]# /opt/opennms/bin/runjava -s
runjava: Looking for an appropriate JRE...
runjava: Checking for an appropriate JRE in JAVA_HOME...
runjava: found: "/opt/java/bin/java" is an appropriate JRE
runjava: value of "/opt/java/bin/java" stored in configuration file
[root@localhost /]# /opt/opennms/bin/runjava -S /opt/java/jre/bin/java
runjava: checking specified JRE: "/opt/java/jre/bin/java"...
runjava: specified JRE is good.
runjava: value of "/opt/java/jre/bin/java" stored in configuration file
Now run following command to create OpenNMS database and make sure postgres service is running.
[root@localhost /]# su - postgres -c "/opt/pgsql/bin/pg_ctl -D /opt/pgsql/data -l logfile stop"
[root@localhost /]# su - postgres -c "/opt/pgsql/bin/postmaster -i -D /opt/pgsql/data &"
[root@localhost /]# /opt/opennms/bin/install -disU
Set opennms web application environment
[root@localhost /]# /opt/opennms/bin/install -y -w /opt/tomcat/webapps/ -W /opt/tomcat/server/lib
Configure auto discovery
Go into following directory, open the discovery-configuration.xml with vi and add your ip range in begin and end tags.
[root@localhost /]# cd /opt/opennms/etc/
[root@localhost /etc]# vi discovery-configuration.xml
<discovery-configuration threads="1" packets-per-second="1"
initial-sleep-time="300000" restart-sleep-time="86400000"
retries="3" timeout="800">
<include-range retries="2" timeout="3000">
<begin>192.168.6.1</begin>
<end>192.168.6.254</end>
</include-range>
<include-url>file:/opt/OpenNMS/etc/include</include-url>
</discovery-configuration>
7. OpenNMS Start up
Run the following commands to start services.
[root@localhost /]# su - postgres -c "/opt/pgsql/bin/pg_ctl -D /opt/pgsql/data -l logfile restart"
[root@localhost /]# su - tomcat -c "/opt/tomcat/bin/startup.sh"
[root@localhost /]# /opt/opennms/bin/install -disU
[root@localhost /]# /opt/opennms/bin/install -y -w /opt/tomcat/webapps/ -W /opt/tomcat/server/lib
[root@localhost /]# /opt/opennms/bin/opennms.sh start
Now you can login to main page of OpenNMS in your browser.
http://localhost:8080/opennms
Use user name "admin" and password "admin" to logging to main page.
分享到:
相关推荐
NULL 博文链接:https://yinbangmin.iteye.com/blog/2414062
openNMS1.6.5源码,最新稳定的版本。OpenNMS是第一个开发在开源模式下的企业级网络管理平台应用。OpenNMS的目标是成为一个真真的分布式、可升级的网络管理平台,尽管它看似一个FCAPS网络管理模型,使之可用于开放...
OpenNMS是一款开源的网络监控系统,用于管理网络设备、服务和应用程序。它提供了一整套功能,包括自动发现网络资源、性能监控、故障检测、报警通知和报告生成。本手册将详细介绍OpenNMS的配置与功能,帮助你充分利用...
"Opennms从源码编译安装指南" Opennms是一款功能强大的网络管理系统,能够提供网络设备的监控、配置和故障排除等功能。从源码编译安装Opennms可以提供更高的自定义化和灵活性,满足个性化的需求。本文将详细介绍...
《基于SNMP协议的OpenNMS网络管理平台详解》 在IT行业中,网络管理是至关重要的环节,而OpenNMS作为一款开源的网络管理系统,以其强大的功能和灵活的可扩展性,深受广大网络管理员的喜爱。"opennms-source.tar.gz_...
在Linux系统中,可以通过包管理器安装OpenJDK。 2. **数据库系统**:OpenNMS使用数据库来存储采集的数据。PostgreSQL是一个广泛支持的数据库选项。需要下载并安装PostgreSQL数据库服务器,并确保它在系统中运行正常...
本文将详细介绍如何在Linux环境下安装OpenNMS,并提供一些试用过程中的注意事项。 首先,安装OpenNMS之前,确保你的系统是Linux,并且具备访问互联网的能力,因为我们将使用Yum包管理器进行安装。Yum是Red Hat和...
OpenNMS Introduction,OpenNMS architecture,OpenNMS SNMP Data Collection,Data Collection Configuration example
**openNMS1.10.3-1源代码详解** `openNMS` 是一个全球广泛使用的开源网络管理系统,其核心目标是监控网络设备、服务和应用程序的可用性、性能和流量。作为一款强大的网络监控平台,它提供了一整套功能,包括自动...
OpenNMS安装、配置详解 OpenNMS是一个流行的开源网络管理平台,提供了强大的网络监控和管理功能。本文将详细介绍如何在Ubuntu系统上安装和配置OpenNMS。 一、安装OpenNMS 1. 首先,需要编辑Ubuntu的sources.list...
OpenNMS是开源网络管理平台,它主要用于监控网络设备、服务和应用程序的性能与可用性。这个"opennms1.12.5-1源码下载"标题指的是该平台的1.12.5-1版本的源代码,允许用户深入理解其内部工作原理,进行定制开发或调试...
OpenNMS数据库,OpenNMS数据库中各个字段的关系矢量图
《openNMS操作手册》是一份详尽的指导文档,旨在帮助用户理解和使用openNMS这一网络管理系统。openNMS是一个全面的网络监控和管理平台,它的主要功能包括网络节点的自动发现、服务监控、故障通知、事件整合、自动...
OpenNMS是一个开源的网络监控平台,它支持多种网络协议和服务,用于监控网络设备的性能和可用性。OpenNMS数据采集配置是这个系统中非常重要的一个环节,涉及到从网络设备中采集各种性能指标数据的过程,以及后续数据...
openNMS开源网管,OpenNMS是一个企业级基于Java/XML的分布式网络和系统监控管理平台-OpenNMS Open Source Network Management, OpenNMS is an enterprise-class based on the Java/XML distributed network and ...
OpenNMS 启动过程分析 OpenNMS 作为一个功能强大的网络管理系统,其启动过程中涉及到多个服务的启动、线程的启动和配置文件的解析。下面将对 OpenNMS 的启动过程进行详细分析。 一、OpenNMS 系统架构 OpenNMS 的...
windows下opennms jicmp.dll
在IT行业中,OpenNMS是一个开源的网络管理系统,它可以监控网络中的设备和服务,并在出现问题时进行通知。本文将深入介绍如何在OpenNMS中配置邮件通知,让管理员能够通过邮件接收来自OpenNMS的事件通知。 首先,...
OpenNMS是一款开源的网络管理平台,专门用于监视网络、网络设备和服务的状态。其具有多种功能,其中之一便是通过邮件发送功能,当网络事件发生时,能够自动发送邮件通知系统管理员,便于及时响应问题。这项功能对于...