所有包都在code.google.com或者sourceforge之类的地方寻找尽可能新的版本,名称以及md5如下:
将以上的包放在同一个目录内,比如 /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 ####################################
然后执行该脚本即可