二十、Extmail配置Mailgraph_ext,使用Extman的图形日志
所需要的软件包Time::HiRes、File::Tail和rrdtool,其中前两个包您可以去http://search.cpan.org 路径:File Name Systems Locking和Operating System Interfaces搜索并下载获得,后一个包您可以到 http://oss.oetiker.ch/rrdtool/pub/?M=D下载获得; 注意安装顺序不能改换。
1、安装Time::HiRes
[root@mail ~]# tar -zxvf Time-HiRes-1.9725.tar.gz -C /usr/local/src/
[root@mail ~]# cd /usr/local/src/
[root@mail src]# cd Time-HiRes-1.9725/
[root@mail Time-HiRes-1.9725]# perl Makefile.PL
[root@mail Time-HiRes-1.9725]# make
[root@mail Time-HiRes-1.9725]# make test
[root@mail Time-HiRes-1.9725]# make install
2、安装File::Tail
[root@mail ~]# tar -zxvf File-Tail-0.99.3.tar.gz -C /usr/local/src/
[root@mail ~]# cd /usr/local/src/
[root@mail src]# cd File-Tail-0.99.3/
[root@mail File-Tail-0.99.3]# perl Makefile.PL
[root@mail File-Tail-0.99.3]# make
[root@mail File-Tail-0.99.3]# make test
[root@mail File-Tail-0.99.3]# make install
3、安装rrdtool-1.4.7
[root@mail ~]# tar -zxvf rrdtool-1.4.7.tar.gz -C /usr/local/src/
[root@mail ~]# cd /usr/local/src/
[root@mail src]# cd rrdtool-1.4.7/
[root@mail rrdtool-1.4.7]# ./configure --prefix=/usr/local/rrdtool
[root@mail rrdtool-1.4.7]# yum -y install zlib libpng freetype libart_lgpl libart_lgpl-devel libxml* pango*
[root@mail rrdtool-1.4.7]# make
[root@mail rrdtool-1.4.7]# make install
创建必要的符号链接(Extman会到这些路径下找相关的库文件)
[root@mail rrdtool-1.4.7]# ln -sv /usr/local/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/auto/RRDs/RRDs.so /usr/lib/perl5/5.8.8/i386-linux-thread-multi/
create symbolic link `/usr/lib/perl5/5.8.8/i386-linux-thread-multi/RRDs.so' to `/usr/local/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/auto/RRDs/RRDs.so'
[root@mail rrdtool-1.4.7]# ln -sv /usr/local/rrdtool/lib/perl/5.8.8/RRDp.pm /usr/lib/perl5/5.8.5
create symbolic link `/usr/lib/perl5/5.8.5' to `/usr/local/rrdtool/lib/perl/5.8.8/RRDp.pm'
[root@mail rrdtool-1.4.7]# ln -sv /usr/local/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/RRDs.pm /usr/lib/perl5/5.8.8
create symbolic link `/usr/lib/perl5/5.8.8/RRDs.pm' to `/usr/local/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/RRDs.pm'
复制mailgraph_ext到/usr/local,并启动
[root@mail rrdtool-1.4.7]# cp -r /var/www/extsuite/extman/addon/mailgraph_ext /usr/local
[root@mail rrdtool-1.4.7]# /usr/local/mailgraph_ext/mailgraph-init start
Starting mail statistics grapher: mailgraph_ext
Starting queue statistics grapher: qmonitor
启动cmdserver(在后台显示系统信息)
[root@mail rrdtool-1.4.7]# /var/www/extsuite/extman/daemon/cmdserver --daemon
loaded ok
添加到自动启动队列
[root@mail ~]# echo “/usr/local/mailgraph_ext/mailgraph-init start” >> /etc/rc.d/rc.local
-bash: syntax error near unexpected token `&'
[root@mail ~]# echo “/var/www/extsuite/extman/daemon/cmdserver -v -d” >> /etc/rc.d/rc.local
-bash: syntax error near unexpected token `&'
好了,接下来您就可以到Extman的后台查看图表日志。效果如下图:
使用方法: 等待大约15分钟左右,如果邮件系统有一定的流量,即可登陆到extman里,点“图形日志”即可看到图形化的日志。具体每天,周,月,年的则点击相应的图片进入即可。
配置完成!
本文转自 yhw85 51CTO博客,原文链接:http://blog.51cto.com/yanghuawu/1103297,如需转载请自行联系原作者