BUILD_DIR=/home/soft/rrdbuild
INSTALL_DIR=/usr/local/rrdtool
set BUILD_DIR=/home/soft/rrdbuild
set INSTALL_DIR=/usr/local/rrdtool
mkdir -p $BUILD_DIR
cd $BUILD_DIR
wget
http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gztar zxf zlib-1.2.3.tar.gz
cd zlib-1.2.2
env CFLAGS="-O3 -fPIC" ./configure --prefix=$BUILD_DIR/lb
make
make install
cd $BUILD_DIR
wget
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs/libpng-1.2.10.tar.gztar 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
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs/freetype-2.1.10.tar.bz2tar 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
GNUMAKE=gmake EGREP=egrep
cd $BUILD_DIR
wget
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs/libart_lgpl-2.3.17.tar.gztar 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
set CPPFLAGS "$IR $IR/libart-2.0 $IR/freetype2 $IR/libpng12"
set LDFLAGS -L$BUILD_DIR/lb/lib
set CFLAGS -O3
IR=-I$BUILD_DIR/lb/include
CPPFLAGS="$IR $IR/libart-2.0 $IR/freetype2 $IR/libpng12"
LDFLAGS="-L$BUILD_DIR/lb/lib"
CFLAGS=-O3
export CPPFLAGS LDFLAGS CFLAGS
cd $BUILD_DIR/rrdtool-1.2.13
./configure --prefix=$INSTALL_DIR --disable-python --disable-tcl
make clean
make
make install
BUILD_DIR=/home/soft/rrdbuild
INSTALL_DIR=/usr/local/rrdtool
set BUILD_DIR=/home/soft/rrdbuild
set INSTALL_DIR=/usr/local/rrdtool
mkdir -p $BUILD_DIR
cd $BUILD_DIR
wget
http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gztar zxf zlib-1.2.3.tar.gz
cd zlib-1.2.2
env CFLAGS="-O3 -fPIC" ./configure --prefix=$BUILD_DIR/lb
make
make install
cd $BUILD_DIR
wget
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs/libpng-1.2.10.tar.gztar 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
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs/freetype-2.1.10.tar.bz2tar 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
GNUMAKE=gmake EGREP=egrep
cd $BUILD_DIR
wget
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs/libart_lgpl-2.3.17.tar.gztar 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
set CPPFLAGS "$IR $IR/libart-2.0 $IR/freetype2 $IR/libpng12"
set LDFLAGS -L$BUILD_DIR/lb/lib
set CFLAGS -O3
IR=-I$BUILD_DIR/lb/include
CPPFLAGS="$IR $IR/libart-2.0 $IR/freetype2 $IR/libpng12"
LDFLAGS="-L$BUILD_DIR/lb/lib"
CFLAGS=-O3
export CPPFLAGS LDFLAGS CFLAGS
cd $BUILD_DIR
wget
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.2.13.tar.gztar zxvf rrdtool-1.2.13.tar.gz
cd $BUILD_DIR/rrdtool-1.2.13
./configure --prefix=$INSTALL_DIR --disable-python --disable-tcl
make clean
make
make install
http://people.ee.ethz.ch/~dws/software/mailgraph/pub/mailgraph-1.12.tar.gzmailgraph+rrdtools作为postfix统计表安装指南
归类于 邮件— pat dong @ 9:52 pm
1 前提,安装apache
2 下载rrdtool和rrdtool
rrdtool
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.2.13.tar.gzmailgraph
http://people.ee.ethz.ch/~dws/software/mailgraph/pub/mailgraph-1.12.tar.gz3 安装
1 安装rrdtool
tar zxvf rrdtool-1.0.45.tar.gz
cd rrdtool-1.0.45
./configure—prefix=/usr/local/mailgraph/rrdtool
make
make install 2 安装mailgraph
tar zxvf mailgraph-1.9.tar.gz
cd mailgraph-1.9
cp mailgraph.cgi mailgraph.pl /usr/local/mailgraph/
cp mailgraph-init /etc/rc.d/init.d/mailgraph
chmod 755 /etc/rc.d/init.d/mailgraph 3 安装必要的perl
perl -MCPAN -e shell
install File::Tail
exit
4 配置
1 chown postfix.postfix /usr/local/mailgraph 2 edit /etc/rc.d/init.d/mailgraph
vi /etc/rc.d/init.d/mailgraph
#####
MAILGRAPH_PL=/usr/local/mailgraph/mailgraph.pl
MAIL_LOG=/var/log/maillog
PID_FILE=/var/run/mailgraph.pid
RRD_DIR=/usr/local/mailgraph/rrdtool
#####
3 edit mailgraph.cgi
vi /usr/local/mailgraph/mailgraph.cgi
#####
my $rrd = ’/usr/local/mailgraph/rrdtool/mailgraph.rrd’; # RRD database is
my $rrd_virus = ’/usr/local/mailgraph/rrdtool/mailgraph_virus.rrd’; # path to where the Virus RRD
database is
#####
4 拷贝必要的perl模块到perl目录
cp /usr/local/mailgraph/rrdtool/lib/perl/RRDs.pm /usr/lib/perl5/5.8.0/i386-linux-thread-multi
cp /usr/local/mailgraph/rrdtool/lib/perl/auto/RRDs/RRDs.* /usr/lib/perl5/5.8.0/i386-linux-thread-multi
5 启动mailgraph
/etc/rc.d/init.d/mailgraph start
5 配置apache
cd /home/domain/webmail/
ln -s /usr/loca/mailgraph mailgraph
<virtualhost 211.147.224.10>
ServerAdmin
pat@yesright.com DocumentRoot /home/domain/webmail
ServerName demo.yesright.com
AddDefaultCharset gb2312
AddHandler cgi-script .cgi
ErrorLog /home/www/log/demo.yesright.com-error_log
CustomLog /home/www/log/demo.yesright.com-access_log commom
ScriptAlias /cgi-bin/ "/home/domain/webmail/mailgraph/"
<directory "/home/domain/webmail/mailgraph/">
Options Indexes FollowSymLinks ExecCGI
AllowOverride all
Order allow,deny
Allow from all
</directory>
</virtualhost>
######