1

I need to install Opennms monitoring software because I'm getting error trying to install it on Oracle Linux 6.9.

I used this commands:

wget https://yum.postgresql.org/9.3/redhat/rhel-6.9-x86_64/pgdg-oraclelinux93-9.3-3.noarch.rpm
yum install postgresql93-server postgresql93-contrib uuid-pgsql.x86_64 repmgr93.x86_64 rhdb-utils.x86_64 skytools-93-modules.x86_64 pgbackrest.x86_64 pgdg-oraclelinux93.noarch pgloader.x86_64 pgmemcache-93.x86_64 pgmp93.x86_64 phpPgAdmin.noarch pgagent_93.x86_64 ora2pg.noarch -y 

Then, with sudo rights did:

sudo bash bootstrap-yum.sh

And getting the error below:

PostgreSQL initialize                 ... FAILED

I'm using the installer provided by official site.

  • I successfully installed Opennms and got the service to start but I did it on CentOS 7.5 and it took a lot of rigmarole. I can post what I did as an answer if you'd like. – Nasir Riley Jun 13 '18 at 2:17
  • Oks, yes, please, show me the steps under Centos 7.5. As well, I want also setting up an Opennms under OL 6.9. – vicdeveloper Jun 13 '18 at 17:02
0

Here is what I did to install it and get the service start on CentOS 7.5. It's probably best that you completely remove Opennms and Postresql before you begin. I did this by running as root.

Beforehand, make sure that you have the following java packages installed:

java-1.8.0-openjdk
java-1.8.0-openjdk-devel
java-1.8.0-openjdk-src
java-1.8.0-openjdk-headless
javapackages-tools
jdk
jdk1.8.0_144

I installed some of these packages when I got the end of this and the setup was giving me errors so you can wait until you get to the Java part at the bottom if you can't install them at this point due to the opennms repos not being available.

First, I created a directory at /opt/opennms and then downloaded a tar.gz inside and decompressed it using the instructions in this link(I used wget instead of curl -L:

https://www.opennms.org/en/install-centos

wget https://github.com/opennms-forge/opennms-install/archive/1.2.tar.gz
tar xvfz 1.2.tar.gz
cd opennms-install-1.2
bash bootstrap-yum.sh

I went through the same steps that you did and got the same error so I then went to the link to the installation guide:

https://docs.opennms.org/opennms/releases/latest/guide-install/guide-install.html#gi-install-opennms-rhel

Postgresql and Opennms were already installed so I skipped again to the part about setting up Postresql(I created a different name for the user but it really doesn't matter):

Enable and start postgresql service

systemctl enable postgresql
systemctl start postgresql
su - postgres

Create database user:

createuser -P opennms
createdb -O opennms opennms
exit

Create password for Postgresql super user where YOUR-POSTGRES-PASSWORD is a password of your choosing.

su - postgres
psql -c "ALTER USER postgres WITH PASSWORD 'YOUR-POSTGRES-PASSWORD';"
exit

To allow access over the local network:

vim /var/lib/pgsql/data/pg_hba.conf

Be sure that the file looks like this:

host    all             all             127.0.0.1/32            md5
host    all             all             ::1/128                 md5

Afterwards:

systemctl restart postgresql

Next, alter the database configuration:

vim ${OPENNMS_HOME}/etc/opennms-datasources.xml

Make sure it looks like below as there may be some differently formatted text for the username and/or password:

<jdbc-data-source name="opennms"
database-name="opennms"
class-name="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/opennms"
user-name="** YOUR-OPENNMS-USERNAME **"
password="** YOUR-OPENNMS-PASSWORD **" />

<jdbc-data-source name="opennms-admin"
database-name="template1"
class-name="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/template1"
user-name="postgres"
password="** YOUR-POSTGRES-PASSWORD **" />`

You can install the java and jdk packages I listed above at this point if you didn't already.

Initialize Opennms:

{OPENNMS_HOME}/bin/runjava -s
{OPENNMS_HOME}/bin/install -dis

If the OPENNMS_HOME variable isn't set, it is equal to /opt/opennms or you can run the commands with the full paths:

/opt/opennms/bin/run/java -s
/opt/opennms/bin/run/install -dis

You may get some error messages but if everything went well, you'll be okay. There should be a file created to confirm:

/opt/opennms/etc/configured

Lastly:

systemctl enable opennms
systemctl start opennms

If that starts up with no errors then you're done.

This may not work exactly for you as it did for me and you might have to modify a few things but hopefully this gives you some headway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.