• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install NagiosQL on CentOS

{{postValue.id}}

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.
Nagiosql installation

The NagiosQL installation wizard page appears. Click start installation to continue with the process.
installation index

Check the settings, system permissions and available database interfaces and click next.
start installation

Enter the database details by entering the required information to create the database and click next.
database details

An error may occur stating the NagiosQL config path is not writable. So to remove this error, return to the terminal.
nagiosql config path

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.
reload

The installation process is completed. The NagiosQL login page appears, enter the required credentials and login to the NagiosQL.
nagiosql login

The NagiosQL is running and now the user can use the tool for various database administration purposes.
nagiosql

Wasn' t that an easy installation procedure? NagiosQL supports the auto backup of configuration files and does consistency checks periodically.

Tags:
michael
Author: 

Comments ( 7 )

nirmal
I have tried to install NagiosQL but page is not opening. Anyone can help?

This page isn’t working right now149.20.187.188 can't currently handle this request.
HTTP ERROR 500
mikewillson
Hi, I got this error and I want to know how to fix it. Please help me. invalid Write test on settings directory (config/): failed
parthiban
Hi @anderson how you installed Nagios on your machine, what is the default installation location of your Nagios setup (for example the default is /usr/local/nagios) so we can find the nagios binary here /usr/local/nagios/bin/nagios so please check with your installation location it might be changed or something else
andersonporfirio
Hi! I've installed well on CentOS7, but when I try execute the Nagios Control functions I have a message "nagiosql Cannot find the Nagios binary". I've tried change the permissions, but the message keep the same, any help? Thanks.
anishroila
once you follow the above procedure , as @mikehomee said u will be stuck on 'apache'@'localhost' error.For that we need to install mysql-server (yum -y install mysql-server) .if already installed then remove (yum -y remove mysql-server) and reinstall .configure mysql installatioin (mysql_secure_installaton).then you will be able to successfully login .Be Careful while creating a user in database because it is case sensitive,password must be given carefully eg. password123#.
view More
Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is Nagios?

A

Nagios has a lot to offer, though the setup and administration of the network monitoring tool can be a challenge. Even once this powerful system is up and running, you have to manually configure flat text files to add hosts, domains, alerts, and more.

Q

What are the main features in Nagios?

A

NagiosQL's features include these capabilities:

Build complex configurations
Manage and use all of your configurations
Create, delete, modify, and copy settings
Create and export configuration files

Q

What are the requirements in Nagisql

A

NagiosQL's installation requirements

Web server (Apache 2.x or greater preferred)
MySQL 5.x or greater
Nagios 2.x/3.x (local or remote)
PHP 5.2.0 or greater including:

Q

What are the configuration file fpr Nagiosql?

A

Nagios main configuration files

sudo chgrp www-data /etc/nagios
sudo chgrp www-data /etc/nagios/nagios.cfg
sudo chgrp www-data /etc/nagios/cgi.cfg

Q

What are the Nagiosql Backup files?

A

NagiosQL backup configuration

sudo chmod 6755 /etc/nagiosql/backup
sudo chown www-data.nagios /etc/nagiosql/backup
sudo chmod 6755 /etc/nagiosql/backup/hosts

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Ryan ?
how to use visual traceroute tool

Am using traceroute command to check for the route. i got this tool while surfing. So pls help me out installation and usage of Visual traceroute tool.

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.