依赖源码包下载地址:http://oss.oetiker.ch/rrdtool/pub/libs,参考地址:http://oss.oetiker.ch/rrdtool/doc/rrdbuild.en.html
安装前,请把每行命令搞清楚,根据自己情况而定,也可以参考手动安装。
系统环境:CentOS 5.4 64位,安装过程如下:
BUILD_DIR=/tmp/rrdbuild INSTALL_DIR=/usr/local/rrdtool mkdir -p $BUILD_DIR cd $BUILD_DIR export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig export PATH=$INSTALL_DIR/bin:$PATH export LDFLAGS="-Wl,--rpath -Wl,${INSTALL_DIR}/lib" wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz gunzip -c pkg-config-0.23.tar.gz | tar xf - cd pkg-config-0.23 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" make make install export PKG_CONFIG=$INSTALL_DIR/bin/pkg-config cd $BUILD_DIR wget http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz gunzip -c zlib-1.2.3.tar.gz | tar xf - cd zlib-1.2.3 ./configure --prefix=$INSTALL_DIR --shared make make install cd $BUILD_DIR wget http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz gunzip -c libpng-1.2.18.tar.gz | tar xf - cd libpng-1.2.18 env CFLAGS="-O3 -fPIC" ./configure --prefix=$INSTALL_DIR make make install cd $BUILD_DIR wget http://oss.oetiker.ch/rrdtool/pub/libs/freetype-2.3.5.tar.gz gunzip -c freetype-2.3.5.tar.gz | tar xf - cd freetype-2.3.5 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" make make install cd $BUILD_DIR wget http://oss.oetiker.ch/rrdtool/pub/libs/libxml2-2.6.32.tar.gz gunzip -c libxml2-2.6.32.tar.gz | tar xf - cd libxml2-2.6.32 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" make make install #下面的安装 --with-expat-lib=/usr/lib64/ 我加的是这个,但网上是--with-expat=builtin #不加的话,会报错: #/usr/lib/libexpat.so: could not read symbols: File in wrong format #主要是针对64位的操作系统才会出现这样的状况。 cd $BUILD_DIR wget http://oss.oetiker.ch/rrdtool/pub/libs/fontconfig-2.4.2.tar.gz gunzip -c fontconfig-2.4.2.tar.gz | tar xf - cd fontconfig-2.4.2 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --with-freetype-config=$INSTALL_DIR/bin/freetype-config --with-expat-lib=/usr/lib64/ make make install cd $BUILD_DIR wget http://oss.oetiker.ch/rrdtool/pub/libs/pixman-0.10.0.tar.gz gunzip -c pixman-0.10.0.tar.gz | tar xf - cd pixman-0.10.0 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" make make install cd $BUILD_DIR wget http://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz gunzip -c cairo-1.6.4.tar.gz | tar xf - cd cairo-1.6.4 ./configure --prefix=$INSTALL_DIR --enable-xlib=no --enable-xlib-render=no --enable-win32=no CFLAGS="-O3 -fPIC" make make install #下面的安装一定要记得加--with-libiconv=gnu,否则会提示你找到这个库,其实系统已经安装了,当然你若是没有装PHP之类的,你肯定没有装这个库,所以,这个你另外需要再安装。 cd $BUILD_DIR wget http://oss.oetiker.ch/rrdtool/pub/libs/glib-2.15.4.tar.gz gunzip -c glib-2.15.4.tar.gz | tar xf - cd glib-2.15.4 ./configure --prefix=$INSTALL_DIR CFLAGS="-O3 -fPIC" --with-libiconv=gnu make make install cd $BUILD_DIR wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz gunzip -c rrdtool-1.4.5.tar.gz | tar xf - cd rrdtool-1.4.5 ./configure --prefix=$INSTALL_DIR --disable-tcl --disable-python make make install
暂无评论
写评论