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:
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
tar xvfz 1.2.tar.gz
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:
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
systemctl enable postgresql
systemctl start postgresql
su - postgres
Create database user:
createuser -P opennms
createdb -O opennms opennms
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';"
To allow access over the local network:
Be sure that the file looks like this:
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
systemctl restart postgresql
Next, alter the database configuration:
Make sure it looks like below as there may be some differently formatted text for the username and/or password:
user-name="** YOUR-OPENNMS-USERNAME **"
password="** YOUR-OPENNMS-PASSWORD **" />
password="** YOUR-POSTGRES-PASSWORD **" />`
You can install the
jdk packages I listed above at this point if you didn't already.
OPENNMS_HOME variable isn't set, it is equal to
/opt/opennms or you can run the commands with the full paths:
You may get some error messages but if everything went well, you'll be okay. There should be a file created to confirm:
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.