How to install NagiosQL on CentOS
How to install NagiosQL on CentOS
NagiosQL is a tool manage Nagios configuration through Web browser. It is a web administration tool designed for Nagios and works with PHP, MySQL and local file or remote access to the Nagios configuration files. This tutorail covers the installation procedure of NagiosQL on CentOS.
Installation procedure
To begin with the installation procedure, first install the Nagios in the system. Install the following required packages for NagiosQL by running the following command and press y to continue with the installation.
[root@node1 ~]# yum install libssh2 libssh2-devel mysql mysql-server php-mysql php-pear php-devel -y
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.mirror.net.in
* extras: centos.mirror.net.in
* updates: centos.mirror.net.in
Package libssh2-1.4.2-2.el6_7.1.x86_64 already installed and latest version
Package mysql-5.1.73-8.el6_8.x86_64 already installed and latest version
Package mysql-server-5.1.73-8.el6_8.x86_64 already installed and latest version
Package php-mysql-5.3.3-49.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package libssh2-devel.x86_64 0:1.4.2-2.el6_7.1 will be installed
.
.
.
Dependency Updated:
e2fsprogs.x86_64 0:1.41.12-23.el6 e2fsprogs-libs.x86_64 0:1.41.12-23.el6 krb5-libs.x86_64 0:1.10.3-65.el6 krb5-workstation.x86_64 0:1.10.3-65.el6 libcom_err.x86_64 0:1.41.12-23.el6
libss.x86_64 0:1.41.12-23.el6 openssl.x86_64 0:1.0.1e-57.el6
Complete!
Install the SSH2 package using pecl php extension by running the following command.
[root@node1 ~]# pecl install ssh2
downloading ssh2-0.13.tgz ...
Starting to download ssh2-0.13.tgz (28,984 bytes)
.........done: 28,984 bytes
6 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
libssh2 prefix? [autodetect] :
building in /var/tmp/pear-build-root1KTaHv/ssh2-0.13
running: /var/tmp/ssh2/configure --with-ssh2
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
.
.
.
Build process completed successfully
Installing ' /usr/lib64/php/modules/ssh2.so'
install ok: channel://pecl.php.net/ssh2-0.13
configuration option " php_ini" is not set to php.ini location
You should add " extension=ssh2.so" to php.ini
Go to below mentioned directory and download the package for NagiosQL and execute the following commands.
[root@node1 ~]# cd /usr/local/nagios/share
[root@node1 share]# wget http://sourceforge.net/projects/nagiosql/files/nagiosql/NagiosQL%203.2.0/nagiosql_320.tar.gz
--2017-05-26 19:43:11-- http://sourceforge.net/projects/nagiosql/files/nagiosql/NagiosQL%203.2.0/nagiosql_320.tar.gz
Resolving sourceforge.net... 216.34.181.60
.
.
.
HTTP request sent, awaiting response... 200 OK
Length: 1417124 (1.4M) [application/x-gzip]
Saving to: “ nagiosql_320.tar.gz”
100%[==========================================================================================================================================================================> ] 1,417,124 1.04M/s in 1.3s
2017-05-26 19:43:17 (1.04 MB/s) - “ nagiosql_320.tar.gz” saved [1417124/1417124]
Extract the downloaded package using the following tar command.
[root@node1 share]# tar -xzvf nagiosql_320.tar.gz
nagiosql32/
nagiosql32/admin/
nagiosql32/admin/contacts.php
nagiosql32/admin/monitoring.php
nagiosql32/admin/helpedit.php
nagiosql32/admin/delconfig.php
nagiosql32/admin/index.html
nagiosql32/admin/verify.php
nagiosql32/admin/group.php
.
.
.
nagiosql32/functions/yui/build/json/
nagiosql32/functions/yui/build/json/json-min.js
nagiosql32/functions/prepend_scripting.php
nagiosql32/functions/mysql_class.php
nagiosql32/functions/data_class.php
nagiosql32/favicon.ico
Rename the extracted directory as “ webadmin” and set user and group ownership and also file permissions by extracting the following command.
[root@node1 share]# mv nagiosql32 webadmin [root@node1 share]# chown -R apache:apache . [root@node1 share]# chmod -R 775 .
Next set the Timezone on php.ini configuration file. Save and exit from the file.
[root@node1 share]# vim /etc/php.ini
Timezone = Asia/Kolkata
Restart the apache service by executing the following command.
[root@node1 share]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Now open the browser and start NagiosQL installation by using below URL http://192.168.7.171/nagios/webadmin/install/index.php and enter the link.
The NagiosQL installation wizard page appears. Click start installation to continue with the process.
Check the settings, system permissions and available database interfaces and click next.
Enter the database details by entering the required information to create the database and click next.
An error may occur stating the NagiosQL config path is not writable. So to remove this error, return to the terminal.
The terminal is opened and execute the below set of commands to clear the impending config path issue.
[root@node1 share]# cd /etc/
[root@node1 etc]# mkdir nagiosql
[root@node1 etc]# chmod -R 775 nagiosql/
[root@node1 etc]# chown -R nagios.apache nagiosql/
[root@node1 etc]# mkdir nagios
[root@node1 etc]# chmod -R 775 nagios
[root@node1 etc]# chown -R nagios.apache nagios
After executing the set of commands, click reload on the browser and the issue will be resolved. Click next.
The installation process is completed. The NagiosQL login page appears, enter the required credentials and login to the NagiosQL.
The NagiosQL is running and now the user can use the tool for various database administration purposes.
Wasn' t that an easy installation procedure? NagiosQL supports the auto backup of configuration files and does consistency checks periodically.
Comments ( 7 )
This page isn’t working right now149.20.187.188 can't currently handle this request.
HTTP ERROR 500