OpenNMS database Separation

Source: Internet
Author: User
Tags opennms

OpenNMS database Separation

1. Database Separation
1.1 configure the 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 IP address of the Database Host.

<Jdbc-data-source name = "opennms"

Database-name = "opennms"

Class-name = "org. postgresql. Driver" url = "jdbc: postgresql: // Database Host IP Address: 5432/opennms"

User-name = "opennms"

Password = "opennms"/>
 

Before modification:


 

After modification:

1.2 install the PostgreSQL database
1. Install the PostgreSql database

Yum install postgresql-server command, the system automatically downloads the postgreSQL installation.

2. Start PostgreSQL first

Run the following 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 restart, run the "chkconfig" command to start at startup and run the following command:

/Sbin/chkconfig postgresql on

1.2.1 configuration allows users to access the database
1. Find/var/lib/pgsql/data/pg_assist.conf with the following content:

Ident-> trust

Change


You can.

2. Find/var/lib/pgsql/data/postgresql. conf and modify the following content:

Listen_addresses = '*'

# Port = 5432 remove "#"

3. After modification, You need to restart the database and run it as root:

/Sbin/service postgresql restart

1.3 Test
Test the isolation of PostgreSql databases on the OpenNMS host.

1. Use putty to log on to the OpenNMS host

2. Run psql-h Database Host IP address-U opennms-d opennms

3. view the database

Execute Command \ l

View users

Run \ du


 

Exit

Execute Command \ q

The test description above indicates that the database can be successfully detached from the OpenNMS host.

1.4 run the SQL statement on the client:
1. In the/opt/opennms/etc directory


Restart OpenNMS after execution.

OpenNMS details: click here
OpenNMS: click here

This article permanently updates the link address:

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.