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

本文详细介绍了在Linux环境下解决Nagios监控软件地图显示功能的问题过程。通过手动安装缺失的依赖包如libgd、libpng和zlib等,最终成功解决了因缺少这些库文件而导致的地图显示错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

终于好了:)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值