Linux安装nagios监控软件(二)修复问题

Linux安装nagios监控软件(二)修复问题

安装好了nagios后,点击菜单上的map,发现页面有错误信息如下:
/nagios/cgi-bin/statusmap.cgi was not found on this server

参考如下BLOG:http://www.245100.com/thread-12353-1-1.html
检查我本机是否安装了对应的包
rpm包的搜索地址
http://www.rpmfind.net/linux/rpm2html/search.php?query=&submit=Search+...&system=&arch=

libgd包
wget http://www.libgd.org/releases/gd-2.0.35.tar.gz
tar zxvf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure
make
make install

libpng包
wget http://nchc.dl.sourceforge.net/project/libpng/00-libpng-stable/1.2.41/libpng-1.2.41.tar.gz
tar zxvf libpng-1.2.41.tar.gz
cd libpng-1.2.41/
./configure
make
make install

zlib包
wget http://www.zlib.net/zlib-1.2.3.tar.gz
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3/
./configure
make
make install

rpm -qa | grep glibc-common 返回
glibc-common-2.3.4-2.25

rpm -qa | grep glibc 返回
glibc-2.3.4-2.25

rpm -qa | grep freetype 返回
freetype-2.1.9-1

freetype-devel包
第三张碟 中的freetype-devel-2.1.9-1.i386.rpm
rpm -ivh freetype-devel-2.1.9-1.i386.rpm

rpm -qa | grep libjpeg 返回
libjpeg-6b-33

libjpeg-devel包
第三张碟 中的libjpeg-devel-6b-33.i386.rpm
rpm -ivh libjpeg-devel-6b-33.i386.rpm

rpm -qa | grep zlib 返回
zlib-1.2.1.2-1.2
zlib-devel-1.2.1.2-1.2

rpm -qa | grep libpng 返回
libpng-1.2.7-1.el4.2
libpng10-1.0.16-1

libpng-devel包
第三张碟 libpng-devel-1.2.7-1.el4.2.i386.rpm
rpm -ivh libpng-devel-1.2.7-1.el4.2.i386.rpm

rpm -qa | grep gd 返回
gd-2.0.28-4.4E.1

libgd-devel包
第三涨碟gd-devel-2.0.28-4.4E.1.i386.rpm
rpm -ivh gd-devel-2.0.28-4.4E.1.i386.rpm

在原来没有安装gd包时,在configure nagios时应该要报错如下:
*** GD, PNG, and/or JPEG libraries could not be located... *********

Boutell's GD library is required to compile the statusmap, trends
and histogram CGIs. Get it from http://www.boutell.com/gd/, compile
it, and use the --with-gd-lib and --with-gd-inc arguments to specify
the locations of the GD library and include files.
NOTE: In addition to the gd-devel library, you'll also need to make
      sure you have the png-devel and jpeg-devel libraries installed
      on your system.
NOTE: After you install the necessary libraries on your system:
      1. Make sure /etc/ld.so.conf has an entry for the directory in
         which the GD, PNG, and JPEG libraries are installed.
      2. Run 'ldconfig' to update the run-time linker options.
      3. Run 'make clean' in the Nagios dblistribution to clean out
         any old references to your previous compile.
      4. Rerun the configure script.
NOTE: If you can't get the configure script to recognize the GD libs
      on your system, get over it and move on to other things. The
      CGIs that use the GD libs are just a small part of the entire
      Nagios package. Get everything else working first and then
      revisit the problem. Make sure to check the nagios-users
      mailing list archives for possible solutions to GD library
      problems when you resume your troubleshooting.
********************************************************************
回到nagios安装时解压开的目录
cd /usr/local/nagios
make devclean
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf

终于好了:)

你可能感兴趣的:(.net,linux,PHP,cgi,nagios)