Monday, September 27, 2010

make: *** [install-webconf] Error 1

Guys,

I got this error message during configuring the nagios : Here is the exact error message.

=======
root@server [/usr/local/src/nagios-3.2.1]# make install-webconf
/usr/bin/install -c -m 644 sample-config/httpd.conf
/etc/httpd/conf.d/nagios.conf
/usr/bin/install: cannot create regular file `/etc/httpd/conf.d/nagios.conf':
No such file or directory
make: *** [install-webconf] Error 1
=======

Sol: As per the error message it's clear that nagios is trying to create the nagios.conf file inside the /etc/httpd.conf file. So, to resolve this problem, please make a sysmlink with the current conf.d directory of httpd daemon. Here are the steps those I followed.

1. Grep httpd daemon :

root@server [/usr/local/nagios/etc]# ps aux | grep httpd
root 6900 0.0 0.0 4204 624 pts/1 S+ 00:12 0:00 grep httpd
root 25825 0.0 0.3 17400 7520 ? Ss Sep27 0:00 /usr/local/apache/bin/httpd -k start -DSSL
nobody 25826 0.0 0.2 16768 5152 ? S Sep27 0:00 /usr/local/apache/bin/httpd -k start -DSSL
nobody 25828 0.0 0.5 239148 10804 ? Sl Sep27 0:00 /usr/local/apache/bin/httpd -k start -DSSL
nobody 25830 0.0 0.5 239012 10732 ? Sl Sep27 0:00 /usr/local/apache/bin/httpd -k start -DSSL
nobody 25832 0.0 0.5 239284 10920 ? Sl Sep27 0:00 /usr/local/apache/bin/httpd -k start -DSSL
nobody 25852 0.0 0.5 239148 10768 ? Sl Sep27 0:00 /usr/local/apache/bin/httpd -k start -DSSL
nobody 25874 0.0 0.5 239148 10772 ? Sl Sep27 0:00 /usr/local/apache/bin/httpd -k start -DSSL
root@server [/usr/local/nagios/etc]#

2. Find Document root of apache or httpd :
root@server [/usr/local/nagios/etc]# /usr/local/apache/bin/httpd -V |grep HTTPD_ROOT
-D HTTPD_ROOT="/usr/local/apache"

3. Make a symlink like :
root@server [/usr/local/nagios/etc]# ln -s /etc/httpd/conf.d /usr/local/apache/conf.d

That's it. Try to re-execute above failed command. It'll work :)

2 comments:

  1. okay every one peace upon you, i was too in the same problem, after a long 15 minutes of searching i type those command's : all you need
    is to create the folders one by one and check the important command "sudo"
    1-sudo mkdir /etc/httpd
    2-sudo mkdir /etc/httpd/conf.d
    3-sudo mkdir /etc/httpd/conf.d/nagios.conf
    and in the last type :
    4-sudo make install-webconf

    ReplyDelete
  2. Please let me both virtually hug you !!!!!!!!

    ReplyDelete