64位 CentOS 5.6 中 rrdtool 的编译安装

所有包都在code.google.com或者sourceforge之类的地方寻找尽可能新的版本,名称以及md5如下:


  1. cgilib-0.7.tar.gz                              2c7053f58dfb06f7a80a112797ed7e86
  2. expat-2.0.1.tar.gz                             ee8b492592568805593f81f8cdf2a04c
  3. fontconfig-2.8.0.tar.gz                        77e15a92006ddc2adbb06f840d591c0e
  4. freetype-2.4.8.tar.gz                          5d82aaa9a4abc0ebbd592783208d9c76
  5. gd-2.0.33.tar.gz                               be0a6d326cd8567e736fbc75df0a5c45
  6. jpegsrc.v8c.tar.gz                             a2c10c04f396a9ce72894beb18b4e1f9
  7. libart_lgpl-2.3.21.tar.gz                      722471ec8ae084af4293126d06b60880
  8. libpng-1.5.7.tar.gz                            944b56a84b65d94054cc73d7ff965de8
  9. libxml2-2.7.8.tar.gz                           8127a65e8c3b08856093099b52599c86
  10. rrdtool-1.4.5.tar.gz                           4d116dba9a0888d8aaac179e35d3980a
  11. zlib-1.2.5.tar.gz                              c735eab2d659a96e5a594c9e8541ad63


将以上的包放在同一个目录内,比如 /root/rrdtool/ 中

###########################   START   #####################################
#将以下内容保存为 install_rrdtool.sh

#!/bin/sh

export CFLAGS="-O3 -fPIC" 

tar zxvf zlib-1.2.5.tar.gz
cd zlib-1.2.5
CFLAGS="-O3 -fPIC" ./configure --prefix=/usr
make
make install

cd ..
echo
read -n 1 -p 'Press any key to continue...'
echo

tar zxvf expat-2.0.1.tar.gz
cd expat-2.0.1
./configure
make
make install

cd ..
echo
read -n 1 -p 'Press any key to continue...'
echo

tar zxvf cgilib-0.7.tar.gz
cd cgilib-0.7
aclocal
autoconf
libtoolize --force
automake --add-missing --foreign
./configure
make
make install

cd ..
echo
read -n 1 -p 'Press any key to continue...'
echo

tar zxvf libpng-1.5.7.tar.gz
cd libpng-1.5.7
mv scripts/makefile.linux ./makefile
make
make install

cd ..
echo
read -n 1 -p 'Press any key to continue...'
echo

tar zxvf freetype-2.4.8.tar.gz
cd freetype-2.4.8
./configure --prefix=/usr/local/freetype
make
make install

cd ..
echo
read -n 1 -p 'Press any key to continue...'
echo

tar zxvf fontconfig-2.8.0.tar.gz
cd fontconfig-2.8.0
./configure --with-freetype-config=/usr/local/freetype/bin/freetype-config
make
make install

cd ..
echo
read -n 1 -p 'Press any key to continue...'
echo

tar zxvf libart_lgpl-2.3.21.tar.gz
cd libart_lgpl-2.3.21
./configure
make
make install

cd ..
echo
read -n 1 -p 'Press any key to continue...'
echo

tar zxvf libxml2-2.7.8.tar.gz
cd libxml2-2.7.8
./configure --with-zlib=/usr
make
make install

cd ..
echo
read -n 1 -p 'Press any key to continue...'
echo

tar zxvf jpegsrc.v8c.tar.gz
cd jpeg-8c/
./configure --prefix=/usr/local/libjpeg --enable-shared --enable-static
make
make install

cd ..
echo
read -n 1 -p 'Press any key to continue...'
echo

tar zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --prefix=/usr/local/libgd --with-png --with-freetype=/usr/local/freetype --with-jpeg=/usr/local/libjpeg --with-xpm --enable-m4_pattern_allow
make
make install

cd ..
echo
read -n 1 -p 'Press any key to continue...'
echo

tar zxvf rrdtool-1.4.5.tar.gz
cd rrdtool-1.4.5
./configure --prefix=/usr/local/rrdtool --disable-python --disable-tcl
make
make install

#验证
/usr/local/rrdtool/bin/rrdtool --help



###########################   END    ####################################

然后执行该脚本即可
chmod u+x install_rrdtool.sh;
./install_rrdtool.sh > test.log;

可能会有很多warning,但只要没有严重错误,就可以一直回车,直至脚本运行完成。
如果觉得烦的话,可以删掉  read -n 1 -p 'Press any key to continue...'   的部分,那样脚本就直接能运行完了。
运行完成后,rrdtool即安装完毕,可以手动进行下测试。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值