Installion Problems with 2011 Nagios XL

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mpenland
Posts: 8
Joined: Tue Mar 15, 2011 10:59 am

Installion Problems with 2011 Nagios XL

Post by mpenland »

Installation went good until I ran ./B-installxi

I get the following errors.

[root@NagiosXL nagiosxi]# ./B-installxi
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Building latest perms binary...
~/nagiosxi/nagiosxi/basedir/scripts ~/nagiosxi
~/nagiosxi
Checking PostgresQL status...
PostgresQL running - continuing...
Creating role and database...
-bash: /root/nagiosxi/nagiosxi/create_postgres_db.sh: Permission denied
ERROR: PostgresQL user 'nagiosxi' was not created - exiting.
ERROR: Nagios XI database was not setup properly - exiting.

Any idea on how to fix?
mpenland
Posts: 8
Joined: Tue Mar 15, 2011 10:59 am

Re: Installion Problems with 2011 Nagios XL

Post by mpenland »

Here is the contents of the B-installxi file --Also running on centos

[root@NagiosXL nagiosxi]# vi B-installxi

Code: Select all

#!/bin/sh

source "./init.sh"

# Was previous step completed?
if [ ! -f installed.subcomponents ]; then
    echo "Subcomponents were not installed - run previous script"
    exit 1
fi

# Was this step already completed?
if [ -f installed.nagiosxi ]; then
        echo "Nagios XI base files already installed - skipping."
        exit 0
fi


##########################################
# CREATE MAIN PRODUCT DIRECTORIES
##########################################

echo "Installing Nagios XI base files..."

echo "Creating product directory..."
if [ ! -d $proddir ]; then
   `$mkdirbin $proddir`
fi

# Copy over XI files
`cp -r ./nagiosxi/basedir/* $proddir`

# Init script
cp ./nagiosxi/nagiosxi.init /etc/init.d/nagiosxi

# Logrotate entry
cp ./nagiosxi/logrotate.nagiosxi /etc/logrotate.d/nagiosxi

# Change ownership on directories and files
`$chownbin -R $nagiosuser.$nagiosgroup $proddir`

# Set permissions on temp directory
chown -R apache.nagios $proddir/tmp
chmod -R 6775 $proddir/tmp

# Set permissions on component etc directory
chown -R apache.nagios $proddir/etc/components
chmod -R 6775 $proddir/etc/components

# Set permissions on component var directory
chown -R apache.nagios $proddir/var/components
chmod -R 6775 $proddir/var/components

# Set perms on NagiosQL import script
chown root.nagios $proddir/scripts/nagiosql_importall.php
chmod u+s $proddir/scripts/nagiosql_importall.php

# Add main Apache conf file
`cp nagiosxi/httpd.nagiosxi.conf $httpdconfdir/nagiosxi.conf`

# Create Apache authentication credential file
# This is needed by Nagios Core  and PNP
$htpasswdbin -c -b $proddir/etc/htpasswd.users $nagioswebuser $nagioswebpwd

# Set permissions on htpasswd file
chown -R nagios.apache $proddir/etc/htpasswd.users


# Fix permissions on config files
chown -R apache.nagios /usr/local/nagios/etc/*.cfg
#chown apache.nagios /usr/local/nagios/etc/hosts/*.cfg
#chown apache.nagios /usr/local/nagios/etc/services/*.cfg

# Make latest config perm reset utility
./build-perms-bin

# Initialize database
./init-xidb
ret=$?
if [ $ret -ne 0 ]; then
        echo "ERROR: Nagios XI database was not setup properly - exiting."
        exit 1
fi


# Things are okay
echo "Nagios XI base files installed OK"
touch installed.nagiosxi
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Installion Problems with 2011 Nagios XL

Post by mguthrie »

Just to verify a couple of items:

Are you running this on a cleanly installed system? (No previous mysql or postgres users present)

Did you run the installer scripts from the /tmp/nagiosxi directory?

Do you have any special firewall, SSL, or proxy configurations on your system?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Installion Problems with 2011 Nagios XL

Post by mguthrie »

Oh, nevermind, I see the problem:
/root/nagiosxi/nagiosxi/create_postgres_db.sh: Permission denied
untar to your /tmp directory and try the install scripts again.
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: Installion Problems with 2011 Nagios XL

Post by rdedon »

Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
mpenland
Posts: 8
Joined: Tue Mar 15, 2011 10:59 am

Re: Installion Problems with 2011 Nagios XL

Post by mpenland »

Thanks for the quick response. I loaded from the tmp and it worked.
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: Installion Problems with 2011 Nagios XL

Post by rdedon »

Great! Feel free to post again if you have any additional questions or issues. Thanks! :-)
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
e.kurt1979
Posts: 3
Joined: Tue Mar 08, 2011 9:01 am

Re: Installion Problems with 2011 Nagios XL

Post by e.kurt1979 »

I'm having the same problem, how to find a solution?



[root@nagiosxi nagiosxi]# ./B-installxi
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Building latest perms binary...
~/Desktop/nagiosxi/nagiosxi/basedir/scripts ~/Desktop/nagiosxi
~/Desktop/nagiosxi
Checking PostgresQL status...
PostgresQL running - continuing...
Creating role and database...
-bash: /root/Desktop/nagiosxi/nagiosxi/create_postgres_db.sh: Permission denied
ERROR: PostgresQL user 'nagiosxi' was not created - exiting.
ERROR: Nagios XI database was not setup properly - exiting.
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Installion Problems with 2011 Nagios XL

Post by tonyyarusso »

Use /tmp rather than /root.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
mpenland
Posts: 8
Joined: Tue Mar 15, 2011 10:59 am

Re: Installion Problems with 2011 Nagios XL

Post by mpenland »

That worked thanks :D
Locked