OpenNMS post-compilation deployment

Source: Internet
Author: User
Tags snmp postgres createdb opennms

1.1 Mounting Media

After the source code compiles, the packing completes, may carry on the platform installment, but at this time still needs to install such as the database, the data source and so on some plug-ins. The relevant list is as follows;

tr>

dependent Name

remarks

opennms-repo-stable-rhel6.noarch.rpm

Span style= "font-size:18px" >yum source

jdk-7 u55-linux-x64.tar.gz

jdk

postgresql-9.2.4.tar.bz2

postgresql

net-snmp-x86_64 package. zip

SNMP Group package

1.1.1 Installing data sources

The data source for OPENNMS is provided by some of the plug-ins that must be installed, otherwise it may cause the installation to fail.

Method One: The command is installed as follows; (suitable for installing the latest version of OPENNMS)

rpm-uvhhttp://yum.opennms.org/repofiles/opennms-repo-stable-rhel6.noarch.rpm

After the installation is complete, you are prompted as follows.


Method Two: Offline installation

Download opennms-repo-stable-rhel6.noarch.rpm

Installation Run

RPM-IVH opennms-repo-stable-rhel6.noarch.rpm


1.1.2 Installing the PostgreSQL database

Method One: Offline source installation

1. Unzip the source package into the current directory

tar–xjfpostgresql-9.2.4.tar.bz2

2. Enter the extracted directory

cdpostgresql-9.2.4

3. Start compiling and installing the PostgreSQL database

./configure

If GCC is not installed in the system, an error is indicated and GCC must be installed

Run again./configure

The hint is missing the ReadLine package, and the lookup determines that the missing Readline-devel package needs to be installed and the system comes with the same version of the ReadLine package or below its Readline-devel package.

Run again./configure

The hint is missing the zlib package, and the lookup determines that the missing Zlib-devel package needs to be installed and the system comes with a zlib package of the same version or below its Zlib-devel package.

Run again./configure

This operation was successful.

Execute gmake Command

Execute gmake Install command

4. Modify the environment variable/etc/profile

Export Path=/usr/local/pgsql/bin: $PATH: $JAVA _home/bin

Execute source/etc/profile after saving

5. Create a database data file directory/data/pgsql/data

6. Operational database

Initializing the database


New user

AddUser Postgres

Modify the directory Owner


Change login User

Su–postgres

Execute the database initialization script

/usr/local/pgsql/bin/initdb--encoding=utf8-d/data/pgsql/data/

Exit Change Login

Exit

Copy PostgreSQL Execution script

Cp/opt/postgresql-9.2.4/contrib/start-scripts/linux/etc/init.d/postgresql

Increase execution permissions

chmod +x/etc/init.d/postgresql

Edit PostgreSQL execution script, specify database file directory

Vi/etc/init.d/postgresql

Pgdata= "/data/pgsql/data"

Edit the configuration file to configure the network address that can access the database

Vi/data/pgsql/data/postgresql.conf

listen_addresses = ' * '

Start the PostgreSQL service

Service PostgreSQL Start

Modify the database password of the Postgres user by logging in to the Postgres user database

Psql-u Postgres

postgres=# ALTER USER postgres PASSWORD ' 123456 ';

postgres=# \q

Edit configuration file, set password MD5 authentication

Vi/data/pgsql/data/pg_hba.conf

# "Local" is for Unix domain sockets connections only

Local all MD5

# IPV4 Local connections:

#host All 127.0.0.1/32 Trust

Host all All MD5

7. Restart the database service

Service PostgreSQL Restart

8. Set the start-up service automatically

Chkconfig PostgreSQL on

9. Create a database with Postgres users

Su Postgres

Createdb OpenNMS

Exit

Method Two: Yum source installation

Yum install PostgreSQL postgresql-server command, the system automatically download PostgreSQL installation.

1. Start PostgreSQL First

Run the command as root:

/sbin/service PostgreSQL Start


2. If you see an error, you must initialize PostgreSQL and run the following command:

/sbin/service PostgreSQL Initdb


/sbin/service PostgreSQL Start


3. To ensure that PostgreSQL will start after a restart, use the "chkconfig" command to start at startup and run the following command:

/sbin/chkconfig PostgreSQL on

1.1.2.1 configuration allows user access to the database

1. Find the/var/lib/pgsql/data/pg_hba.conf content:

ident-"Trust

Revision changed to


Can.

2. Locate/var/lib/pgsql/data/postgresql.conf to modify the following:

listen_addresses = ' * '

3. After the modification, you need to restart the database to run as root:

/sbin/service PostgreSQL Restart

1.1.2.2 Creating a Database

Sudo-u postgres createdb-u postgres-e UNICODE opennms

1.1.3 Installation Iplike

Method One: Offline installation

Download postgresql92-libs-9.2.4-1pgdg.didt.ep.x86_64.rpm

1. Install, run

rpm–ivhpostgresql92-libs-9.2.4-1pgdg.didt.ep.x86_64.rpm

2. Restart the database

Servicepostgresql restart

3. Install RPM-IVH iplike-2.0.2-1rhel6.x86_64.rpm

Method Two: Yum source installation

Yum Install Iplike


Run the install_iplike.sh command


1.1.4 Testing Navicat Client connections

1. Installing the NAVICAT Client

After setting the installation path, select the default installation

After the installation is successful, open the Navicat client

2. Configure the database connection


3. Configure page Information


4. Then click "Connect Test", test successfully, connect as


1.1.5 binding JDK

Create a new directory OpenNMS under/opt/and place the combined OPENNMS compressed package under it

Note: This OpenNMS directory is the installation directory (on the implementation site or new virtual machine, please distinguish it from the above directory, the following refers to the OPENNMS directory is this directory)

1. OPENNMS compressed Package after decompression

Tar–zxvfopennms-14.0.3.tar.gz

2. Run the following command under the extracted OPENNMS root directory to bind the OPENNMS to our own installed JDK

Bin/runjava-s/usr/java/jdk1.7.0_55/bin/java


Run the JAVA_HOME=/USR command


1.1.6 Installing opennms1.1.6.1 Creating a shortcut to OpenNMS

Creating shortcuts helps us to start quickly with the Serviceopennms start command

Ln-s/opt/opennms/bin/opennms/etc/init.d/opennms

1.1.6.2 Installing the OPENNMS application

1. Configuration in Environment variables

Export OPENNMS_HOME=/OPT/OPENNMS

2. Associate the database and create the OPENNMS database to create the necessary functions

$OPENNMS _home/bin/install-dis

Note: The $OPENNMS _home can be defined in the environment variable, or the opennms_home can be changed to OPENNMS directory execution;


The following appears to indicate that the installation was successful.


2. We need to tell OpenNMS where to find libjicmp.so,

Note: libjicmp.so in OpenNMS is not a few plugins

# I386example

$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

We need to run 64-bit


The following content has been installed successfully


1.1.7 Installation JICMP6

Method One: Offline source package Installation

1. Download jicmp6-1.2.1-1.x86_64.rpm in http://yum.opennms.org/stable/rhel6/opennms/

Run RPM–IVH jicmp6-1.2.1-1.x86_64.rpm

Method Two: Yum source installation

Yum-y Install JICMP6

2. Start OpenNMS after installation is complete

Service OpenNMS Start

1.1.8 opening access and acquisition ports

Add the following in/etc/sysconfig/iptables

-A input-m state--state new-m tcp-ptcp--dport 8980-j ACCEPT

-A input-p udp-m UDP--dport 161-jaccept

1.1.9 page Access

1. Page Access Path

http://yourhost£ 8980/opennms/


2. View data

A few minutes later, the data will show.

Lost Jian file
Reprint Please specify link: http://blog.csdn.net/awenluck/article/details/48598339

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

OpenNMS post-compilation deployment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.