OPENNMS detaching a database

Source: Internet
Author: User
Tags postgresql opennms

1. Detaching a Database 1.1 configuration OpenNMS file

1. We need to modify the DataSource data source in OpenNMS, in the following directory in OPENNMS:

/opt/opennms/etc/opennms-datasources.xml

2. Change localhost to the database host IP address

<jdbc-data-source name= "OpenNMS"

                     database-name= "OpenNMS"

                     class-name= " Org.postgresql.Driver "                      url= "jdbc:postgresql://database host Ip:5432/opennms"

                     user-name= "OpenNMS"

                     password= "OpenNMS"/

Before modification:


After modification:


1.2 Installing the PostgreSQL database

1. Installing the PostgreSQL database

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

2. Start PostgreSQL First

Run the command as root:

/sbin/service PostgreSQL Start


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

/sbin/service PostgreSQL Initdb


/sbin/service PostgreSQL Start

4. 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.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 = ' * '

#port = 5432 Remove the "#" number

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

/sbin/service PostgreSQL Restart

1.3 Testing

Testing the PostgreSQL database on a detached host in a OPENNMS host

1. Log in to the OPENNMS host with Putty

2. Execute psql-h Database host IP -u opennms-d opennms


3. View the database

Execute COMMAND \l

View User

Execute Command \du


Exit

Execute Command \q


The above test instructions can be successfully connected on the OPENNMS host to isolate the database

1.4 Execute the SQL statement on the client:

1. Under the/OPT/OPENNMS/ETC directory


Restart OpenNMS after execution is complete

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

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

OPENNMS detaching a database

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.