Page 2 of 3
Re: Install on clean RHEL 7
Posted: Mon Jun 20, 2016 10:14 pm
by BanditBBS
Code: Select all
[root@iss-365-nag11 nagiosxi]# grep nag /etc/passwd
systemd-network:x:998:996:systemd Network Management:/:/sbin/nologin
nagios:x:1779:1779:nagios:/home/nagios:/bin/bash
[root@iss-365-nag11 nagiosxi]# grep nag /etc/group
nagios:x:1779:nagios,apache
nagcmd:x:1780:nagios,apache
and
Code: Select all
[root@iss-365-nag11 scripts]# ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.login--2016-06-20 22:13:51-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’
[ <=> ] 25,314 --.-K/s in 0.02s
2016-06-20 22:13:52 (1.33 MB/s) - ‘nagiosql.login’ saved [25314]
LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
Another reconfigure process is still running, sleeping...
^C
[root@iss-365-nag11 scripts]#
Re: Install on clean RHEL 7
Posted: Mon Jun 20, 2016 10:49 pm
by Box293
Is there a .lock file in /tmp/nagiosxi/nagiosxi/basedir/scripts/ OR /usr/local/nagiosxi/scripts/
If there is, please delete it and re-run ./reconfigure_nagios.sh
Re: Install on clean RHEL 7
Posted: Tue Jun 21, 2016 8:43 am
by BanditBBS
I think it is because this isn't in the sudoers:
But if I add that and run the full install again, I get this:
Code: Select all
[root@iss-365-nag11 nagiosxi]# ./fullinstall
========================
Nagios XI Full Installer
========================
This script will do a complete install of Nagios XI by executing all necessary sub-scripts.
IMPORTANT: This script should only be used on a 'clean' install of CentOS or RedHat. Do NOT use this on a system that has been tasked with other purposes or has an existing
install of Nagios Core. To create such a clean install you should have selected ONLY the 'Base' package in the OS installer.
Do you want to continue? [Y/n] y
Proceeding with installation...
Checking MySQL credentials...
Stored MySQL password validated.
Running './0-repos'...
Repos already configured - exiting.
RESULT=0
Running './1-prereqs'...
Prereqs already installed - skipping...
Note: If you want to update the RPMs installed on this system, run your package manager's update command
RESULT=0
Running './2-usersgroups'...
Users/groups already configured - skipping.
RESULT=0
Running './3-dbservers'...
Database servers already initialized - skipping.
RESULT=0
Running './4-services'...
/etc/services already updated - skipping.
RESULT=0
Running './5-sudoers'...
sudoers already configured - skipping.
RESULT=0
Running './6-firewall'...
Firewall rules already configured - skipping.
RESULT=0
Running './7-sendmail'...
Step completed OK
RESULT=0
Running './8-selinux'...
SELinux already configured - skipping.
RESULT=0
Running './9-dbbackups'...
Database backups already configured - skipping.
RESULT=0
Running './10-phplimits'...
PHP limits already configured - skipping.
RESULT=0
Running './11-sourceguardian'...
Sourceguardian already configured - skipping.
RESULT=0
Running './12-mrtg'...
MRTG already configured - skipping.
RESULT=0
Running './13-cacti'...
Step completed OK
RESULT=0
Running './14-timezone'...
PHP timezone already configured - skipping.
RESULT=0
Running './A-subcomponents'...
Subcomponents already configured - skipping.
RESULT=0
Running './B-installxi'...
Nagios XI base files already installed - skipping.
RESULT=0
Running './C-cronjobs'...
Crontabs already configured - skipping.
RESULT=0
Running './D-chkconfigalldaemons'...
Daemons already configured - skipping.
RESULT=0
Running './E-importnagiosql'...
httpd: no process found
Applying patches to Apache configs for Apache 2.4.x syntax...
Redirecting to /bin/systemctl start httpd.service
Sleeping...
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
ERROR: No files to import - exiting. Were Nagios Core and NagiosQL installed?
RESULT=1
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.
The script that failed was: './E-importnagiosql'
Re: Install on clean RHEL 7
Posted: Tue Jun 21, 2016 10:46 am
by lmiltchev
Can you run the fullinstall script one more time, then post the "updated"
install.log? Are you running the fullinstall from "/tmp/nagiosxi/" directory or an alternative location?
Run the following commands, and show the output:
Re: Install on clean RHEL 7
Posted: Tue Jun 21, 2016 10:49 am
by BanditBBS
Code: Select all
[root@iss-365-nag11 nagiosxi]# yum repolist
Loaded plugins: langpacks, linbit, product-id, search-disabled-repos, subscription-manager
repo id repo name status
!drbd-8.4/x86_64 LINBIT Packages for drbd-8.4 - x86_64 73
!drbd-proxy-3.2/x86_64 LINBIT Packages for drbd-proxy-3.2 - x86_64 3
!epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 10,170
!nagios-base Nagios 31
!nagiosxi-deps Nagios XI Dependencies 26
rhel-7-server-eus-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - Extended Update Support (RPMs) 10,860
rhel-7-server-optional-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - Optional (RPMs) 8,617
rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 10,869
rhel-ha-for-rhel-7-server-eus-rpms/7Server/x86_64 Red Hat Enterprise Linux High Availability (for RHEL 7 Server) - Extended Update Support (RPMs) 206
rhel-ha-for-rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux High Availability (for RHEL 7 Server) (RPMs) 206
rhel-rs-for-rhel-7-server-eus-rpms/7Server/x86_64 Red Hat Enterprise Linux Resilient Storage (for RHEL 7 Server) - Extended Update Support (RPMs) 249
rhel-rs-for-rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux Resilient Storage (for RHEL 7 Server) (RPMs) 249
rhel-sap-for-rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux for SAP (RHEL 7 Server) (RPMs) 37
rhel-sap-hana-for-rhel-7-server-eus-rpms/7Server/x86_64 RHEL for SAP HANA (for RHEL 7 Server) Extended Update Support (RPMs) 0
rhel-sap-hana-for-rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux for SAP HANA (RHEL 7 Server) (RPMs) 10
!rpmforge RHEL 7Server - RPMforge.net - dag 245
repolist: 41,851
Code: Select all
[root@iss-365-nag11 nagiosxi]# sestatus
SELinux status: disabled
Code: Select all
[root@iss-365-nag11 nagiosxi]# umask
0022
Fullinstall(run from /tmp/nagiosxi):
Code: Select all
[root@iss-365-nag11 nagiosxi]# cat install.log
Nagios XI Installation Log
==========================
DATE: Tue Jun 21 10:49:08 CDT 2016
DISTRO INFO:
RedHatEnterpriseServer
7.2
x86_64
THIS IS AN UPGRADE!
OLD VERSION:
full=5.2.9
major=5
minor=2.9
releasedate=2016-06-14
release=520
INSTALLING:
full=5.2.9
major=5
minor=2.9
releasedate=2016-06-14
release=520
Repos already configured - exiting.
Prereqs already installed - skipping...
Note: If you want to update the RPMs installed on this system, run your package manager's update command
Users/groups already configured - skipping.
Database servers already initialized - skipping.
/etc/services already updated - skipping.
sudoers already configured - skipping.
Firewall rules already configured - skipping.
Step completed OK
SELinux already configured - skipping.
Database backups already configured - skipping.
PHP limits already configured - skipping.
Sourceguardian already configured - skipping.
MRTG already configured - skipping.
Step completed OK
PHP timezone already configured - skipping.
Subcomponents already configured - skipping.
Nagios XI base files already installed - skipping.
Crontabs already configured - skipping.
Daemons already configured - skipping.
httpd: no process found
Applying patches to Apache configs for Apache 2.4.x syntax...
Redirecting to /bin/systemctl start httpd.service
Sleeping...
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
ERROR: No files to import - exiting. Were Nagios Core and NagiosQL installed?
EDIT: I think its because it is defaulting to UPGRADE now instead of fullinstall thats why its not working. Is there a way to make it not do that?
Re: Install on clean RHEL 7
Posted: Tue Jun 21, 2016 12:50 pm
by lmiltchev
I believe the script is looking at "/usr/local/nagiosxi/var/xiversion" file. You can try moving it to a different location or renaming it, and rerunning the fullinstall.
Re: Install on clean RHEL 7
Posted: Tue Jun 21, 2016 1:16 pm
by BanditBBS
That was partly it. I moved the installed.* files too and is treated it as a full install, but having this issue now:
Code: Select all
ERROR 1007 (HY000) at line 4: Can't create database 'nagiosxi'; database exists
ERROR: Nagios XI database was not setup properly - exiting.
RESULT=1
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.
The script that failed was: './B-installxi'
You have new mail in /var/spool/mail/root
Is there an uninstall script so i can undo what it has done and start over?
Re: Install on clean RHEL 7
Posted: Tue Jun 21, 2016 1:42 pm
by lmiltchev
There is an uninstall script in the "scripts" directory - /usr/local/nagiosxi/scripts/uninstall_xi.sh (if Nagios XI has beed installed). I am not sure if you will have it but you can download it from here:
uninstall_xi.zip
The script may be a bit outdated but it should work. As you haven't been able to install XI, you will need to run the commands in the script manually. Open the file in a text editor and read through it to see what it does.
Hope this helps.
Re: Install on clean RHEL 7
Posted: Tue Jun 21, 2016 2:01 pm
by BanditBBS
Running the uninstall seems to have done the trick.
One last question though.....
I noticed during the install it was installing postgres...I though new installs did not use that anymore?
Re: Install on clean RHEL 7
Posted: Tue Jun 21, 2016 2:23 pm
by lmiltchev
I noticed during the install it was installing postgres...I though new installs did not use that anymore?
The postgres package may be installed but is postgres initiated and running?! It shouldn't be.
Run the following commands and show the output:
Code: Select all
ps -ef | grep '[p]ostmaster\|[m]ysqld'
echo 'show databases;' | mysql -t -u root -pnagiosxi