Jump to content

Installing nagios xi on centos 6.x


Recommended Posts

First let's install the pre-req's



yum install httpd -y

service httpd start

chkconfig httpd on

NOTE: If you get an error like

[root@srvr01 ~]# service httpd start

Starting httpd: httpd: apr_sockaddr_info_get() failed for srvr01.thezah.com

httpd: Could not reliably determine the server's fully qualified domain name, using for ServerName


The fix is to add your IPAddress and hostname to /etc/hosts


Allow port 80 through the builtin firewall (iptables)

vi /etc/sysconfig/iptables

Add the following line

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

Restart the builtin firewall

service iptables restart

Test that Apache is working by opening a browser and navigating to http://localhost/ or http://server-ip-address/



yum install mysql mysql-server -y

Start MySQL Service

service mysqld start

Turn mysql service each time your server reboots

chkconfig mysqld on

Set the mysql root password



yum install php -y

Create a test php file

vi /var/www/html/testphp.php

Add the following


Restart Apache

service httpd restart

See if your PHP is working by loading that testphp.php file you created


Install mysql plugin for php

yum install php-mysql -y

INSTALL phpMyAdmin

PreReq is to add distribution that holds the phpmyadmin package to yum repository

wget http://epel.mirror.net.in/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
yum repolist

installing phpmyadmin

yum install phpmyadmin -y

cp /usr/share/phpMyAdmin/config.sample.inc.php /usr/share/phpMyAdmin/config.inc.php

vi /usr/share/phpMyAdmin/config.inc.php

change cookie to http

/* Authentication type */ 
$cfg['Servers'][$i]['auth_type'] = 'http';

edit config to allow access

vi /etc/httpd/conf.d/phpMyAdmin.conf

Comment out entire

#     # Apache 2.4 
#     Require local 
#     # Apache 2.2 
#     Order Deny,Allow 
#     Deny from All 
#     Allow from 
#     Allow from ::1 


Restart Apache

service httpd restart

Test phpMyAdmin by navigating to http://server-ip-address/phpmyadmin/





cd /tmp

tar xzf xi-latest.tar.gz

cd /tmp/nagiosxi








Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...