今天安装nagios3.3.1,不是第一次安装了,之前都很顺利,这次安装的时候,在执行命令make install的时候,报错了。大致如下
- [root@magedu nagios]# make install
- cd ./base && make install
- make[1]: Entering directory `/root/nagios/base’
- make install-basic
- make[2]: Entering directory `/root/nagios/base’
- /usr/bin/install -c -m 775 -o nagios -g nagios -d /var/www/html/nagios/bin
- /usr/bin/install -c -m 774 -o nagios -g nagios nagios /var/www/html/nagios/bin
- /usr/bin/install -c -m 774 -o nagios -g nagios nagiostats /var/www/html/nagios/bin
- make[2]: Leaving directory `/root/nagios/base’
- make strip-post-install
- make[2]: Entering directory `/root/nagios/base’
- /usr/bin/strip /var/www/html/nagios/bin/nagios
- /usr/bin/strip /var/www/html/nagios/bin/nagiostats
- make[2]: Leaving directory `/root/nagios/base’
- make[1]: Leaving directory `/root/nagios/base’
- cd ./cgi && make install
- make[1]: Entering directory `/root/nagios/cgi’
- make install-basic
- make[2]: Entering directory `/root/nagios/cgi’
- /usr/bin/install -c -m 775 -o nagios -g nagios -d /var/www/html/nagios/sbin
- for file in *.cgi; do \
- /usr/bin/install -c -m 775 -o nagios -g nagios $file /var/www/html/nagios/sbin; \
- done
- make[2]: Leaving directory `/root/nagios/cgi’
- make strip-post-install
- make[2]: Entering directory `/root/nagios/cgi’
- for file in *.cgi; do \
- /usr/bin/strip /var/www/html/nagios/sbin/$file; \
- done
- make[2]: Leaving directory `/root/nagios/cgi’
- make[1]: Leaving directory `/root/nagios/cgi’
- cd ./html && make install
- make[1]: Entering directory `/root/nagios/html’
- /usr/bin/install -c -m 775 -o nagios -g nagios -d /var/www/html/nagios/share
- /usr/bin/install -c -m 775 -o nagios -g nagios -d /var/www/html/nagios/share/media
- /usr/bin/install -c -m 775 -o nagios -g nagios -d /var/www/html/nagios/share/stylesheets
- /usr/bin/install -c -m 775 -o nagios -g nagios -d /var/www/html/nagios/share/contexthelp
- /usr/bin/install -c -m 775 -o nagios -g nagios -d /var/www/html/nagios/share/docs
- /usr/bin/install -c -m 775 -o nagios -g nagios -d /var/www/html/nagios/share/docs/images
- /usr/bin/install -c -m 775 -o nagios -g nagios -d /var/www/html/nagios/share/images
- /usr/bin/install -c -m 775 -o nagios -g nagios -d /var/www/html/nagios/share/images/logos
- /usr/bin/install -c -m 775 -o nagios -g nagios -d /var/www/html/nagios/share/includes
- /usr/bin/install -c -m 775 -o nagios -g nagios -d /var/www/html/nagios/share/includes/rss
- /usr/bin/install -c -m 775 -o nagios -g nagios -d /var/www/html/nagios/share/includes/rss/extlib
- /usr/bin/install -c -m 775 -o nagios -g nagios -d /var/www/html/nagios/share/ssi
- /usr/bin/install -c -m 664 -o nagios -g nagios robots.txt /var/www/html/nagios/share
- rm -f /var/www/html/nagios/share/index.html
- rm -f /var/www/html/nagios/share/main.html
- rm -f /var/www/html/nagios/share/side.html
- for file in *.php; \
- do /usr/bin/install -c -m 664 -o nagios -g nagios $file /var/www/html/nagios/share; done
- for file in stylesheets/*.css; \
- do /usr/bin/install -c -m 664 -o nagios -g nagios $file /var/www/html/nagios/share/stylesheets; done
- for file in contexthelp/*.html; \
- do /usr/bin/install -c -m 664 -o nagios -g nagios $file /var/www/html/nagios/share/contexthelp; done
- for file in images/*.gif; \
- do /usr/bin/install -c -m 664 -o nagios -g nagios $file /var/www/html/nagios/share/images; done
- for file in images/*.jpg; \
- do /usr/bin/install -c -m 664 -o nagios -g nagios $file /var/www/html/nagios/share/images; done
- for file in images/*.png; \
- do /usr/bin/install -c -m 664 -o nagios -g nagios $file /var/www/html/nagios/share/images; done
- for file in images/*.ico; \
- do /usr/bin/install -c -m 664 -o nagios -g nagios $file /var/www/html/nagios/share/images; done
- for file in images/logos/*.*; \
- do /usr/bin/install -c -m 664 -o nagios -g nagios $file /var/www/html/nagios/share/images/logos; done
- for file in includes/*.*; \
- do /usr/bin/install -c -m 664 -o nagios -g nagios $file /var/www/html/nagios/share/includes; done
- for file in includes/rss/*; \
- do /usr/bin/install -c -m 664 -o nagios -g nagios $file /var/www/html/nagios/share/includes/rss; done
- /usr/bin/install: omitting directory `includes/rss/extlib’
- /usr/bin/install: omitting directory `includes/rss/htdocs’
- /usr/bin/install: omitting directory `includes/rss/scripts’
- make[1]: *** [install] Error 1
- make[1]: Leaving directory `/root/nagios/html’
- make: *** [install] Error 2
很纠结啊,google了一下,有解决方案,好像是makefile里有语法错误,具体怎么导致的不清楚,执行完以下命令,就OK了
- # sed -i ‘s:for file in includes/rss/\*;:for file in includes/rss/\*.\*;:g’ ./html/Makefile
- # sed -i ‘s:for file in includes/rss/extlib/\*;:for file in includes/rss/extlib/\*.\*;:g’ ./html/Makefile
- 然后,执行以下命令,来完成安装。
- # make fullinstall
没什么技术含量,小记一下,免得以后再遇到同样的错误了,不知道该怎么办。