分类:
2005-07-27 13:58:20
RRD TOOLS 安装手册
1. 下载
wget
下载完毕,解压缩:
tar zxf rrdtool-
cd rrdtool-
2. 安装必要的软件
看看你的机器有没有这些包,cgilib、zlib、libpng、freetype、libart_lgpl,没有就装吧。
设定环境变量:
set BUILD_DIR=/tmp/rrdbuild
set INSTALL_DIR=/usr/local/rrdtool-
开始安装啦(我用的是RedHat Linux7.3)
安装cgilib
cd $BUILD_DIR
wget
tar zxf cgilib-0.5.tar.gz
cd cgilib-0.5
make CC=gcc CFLAGS="-O3 -fPIC -I."
mkdir -p $BUILD_DIR/lb/include
cp *.h $BUILD_DIR/lb/include
mkdir -p $BUILD_DIR/lb/lib
cp libcgi* $BUILD_DIR/lb/lib
安装zllib
cd $BUILD_DIR
wget
tar
zxf zlib-
cd zlib-
env CFLAGS="-O3 -fPIC" ./configure --prefix=$BUILD_DIR/lb
make
make install
安装libpng
cd $BUILD_DIR
wget
tar zxvf libpng-
cd libpng-
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
安装freetype
cd $BUILD_DIR
wget
tar zxvf freetype-
cd freetype-
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
安装libart_lgpl
cd $BUILD_DIR
wget
tar zxvf libart_lgpl-
cd libart_lgpl-
env CFLAGS="-O3 -fPIC" ./configure --disable-shared --prefix=$BUILD_DIR/lb
make
make install
如果你用bash/sh/ash/ksh/zsh,就执行下面的:
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
真的开始安装rrd了
cd $BUILD_DIR/rrdtool-
./configure --prefix=$INSTALL_DIR --disable-python && make clean && make && make install
安装完毕啦。(详细参见rrd安装包中的doc/rrdbuild.txt)