把rrd官方的rrdbuild.txt 稍微改一下就得到如下脚本rrdbuild.sh
脚本内容如下:
BUILD_DIR=/tmp/rrdbuild
INSTALL_DIR=/usr/local/rrdtool-1.2.22
mkdir -p $BUILD_DIR
cd $BUILD_DIR
wget
cd $BUILD_DIR
wget
tar zxf zlib-1.2.3.tar.gz
cd zlib-1.2.3
env CFLAGS="-O3 -fPIC" ./configure --prefix=$BUILD_DIR/lb
make
make install
cd $BUILD_DIR
wget
tar zxvf libpng-1.2.10.tar.gz
cd libpng-1.2.10
env CPPFLAGS="-I$BUILD_DIR/lb/include" LDFLAGS="-L$BUILD_DIR/lb/lib" CFLAGS="-O3 -fPIC" \
./configure --disable-shared --prefix=$BUILD_DIR/lb
make
make install
cd $BUILD_DIR
wget
tar jxvf freetype-2.1.10.tar.bz2
cd freetype-2.1.10
env CPPFLAGS="-I$BUILD_DIR/lb/include" LDFLAGS="-L$BUILD_DIR/lb/lib" CFLAGS="-O3 -fPIC" \
./configure --disable-shared --prefix=$BUILD_DIR/lb
make
make install
cd $BUILD_DIR
wget
tar zxvf libart_lgpl-2.3.17.tar.gz
cd libart_lgpl-2.3.17
env CFLAGS="-O3 -fPIC" ./configure --disable-shared --prefix=$BUILD_DIR/lb
make
make install
ranlib $BUILD_DIR/lb/lib/*.a
set IR=-I$BUILD_DIR/lb/include
setenv CPPFLAGS "$IR $IR/libart-2.0 $IR/freetype2 $IR/libpng"
setenv LDFLAGS -L$BUILD_DIR/lb/lib
setenv CFLAGS -O3
IR=-I$BUILD_DIR/lb/include
CPPFLAGS="$IR $IR/libart-2.0 $IR/freetype2 $IR/libpng"
LDFLAGS="-L$BUILD_DIR/lb/lib"
CFLAGS=-O3
export CPPFLAGS LDFLAGS CFLAGS
cd $BUILD_DIR/rrdtool-1.2.22
./configure --prefix=$INSTALL_DIR --disable-python --disable-tcl
make clean
make
make install
阅读(1640) | 评论(0) | 转发(1) |