码迷,mamicode.com
首页 > 其他好文 > 详细

配置Mailgraph_ext,使用Extman的图形日志

时间:2016-04-11 19:04:47      阅读:320      评论:0      收藏:0      [点我收藏+]

标签:配置mailgraph_ext   使用extman的图形日志   

注意:此篇博客内容是基于 (在Lamp平台上基于postfix+mysql+dovecot+sasl+courier-authlib+extmail+extman搭建企业级邮件系统  http://luochen2015.blog.51cto.com/9772274/1761969)这篇博客上进行测试的。

1,安装依赖包

# yum install cairo-devel libxml2-devel pango-devel libpng-devel freetype-devel libart_lgpl-devel perl-File-Tail


2,安装Time::HiRes

# tar xf Time-HiRes-1.9732.tar.gz

# cd Time-HiRes-1.9732

# perl Makefile.PL

# make

# make test

# make install


3,安装rrdtool-1.4.0.tar.gz  (http://oss.oetiker.ch/rrdtool/pub/?M=D)

# tar xf rrdtool-1.4.0.tar.gz

# cd rrdtool-1.4.0

# ./configure --prefix=/usr/local/rrdtool 

# make

# make install


4,创建必要的符号链接(Extman会到这些路径下找相关的库文件)

# ln -sv /usr/local/rrdtool/lib/perl/5.10.1/x86_64-linux-thread-multi/auto/RRDs/RRDs.so  /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi

# ln -sv /usr/local/rrdtool/lib/perl/5.10.1/x86_64-linux-thread-multi/RRDs.pm 

/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/

# ln -sv /usr/local/rrdtool/lib/perl/5.10.1/x86_64-linux-thread-multi/auto/RRDs/RRDs.so  /var/www/extsuite/extman/libs


5,复制mailgraph_ext到/usr/local,并启动之

# cp -r /var/www/extsuite/extman/addon/mailgraph_ext  /usr/local  

# /usr/local/mailgraph_ext/mailgraph-init start 


6,启动 mailgraph-init 错误:

Starting mail statistics grapher: mailgraph_ext

Can‘t locate loadable object for module RRDs in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/mailgraph_ext/mailgraph_ext.pl line 292

Compilation failed in require at /usr/local/mailgraph_ext/mailgraph_ext.pl line 292.

BEGIN failed--compilation aborted at /usr/local/mailgraph_ext/mailgraph_ext.pl line 292.

Starting queue statistics grapher: qmonitor

Can‘t locate loadable object for module RRDs in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/mailgraph_ext/qmonitor.pl line 8

Compilation failed in require at /usr/local/mailgraph_ext/qmonitor.pl line 8.

BEGIN failed--compilation aborted at /usr/local/mailgraph_ext/qmonitor.pl line 8.

==============================================================

解决方法:

a,首先检测RRDs 模块是否安装

# perl -MRRDs -le ‘print q(ok!)‘


b,再创建链接文件

# ln -sv /usr/local/rrdtool/lib/perl/5.10.1/x86_64-linux-thread-multi/auto/RRDs/RRDs.so  /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi

# ln -sv /usr/local/rrdtool/lib/perl/5.10.1/x86_64-linux-thread-multi/RRDs.pm 

/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/

# ln -sv /usr/local/rrdtool/lib/perl/5.10.1/x86_64-linux-thread-multi/auto/RRDs/RRDs.so  /var/www/extsuite/extman/libs


c,再次验证

# perl -MRRDs -le ‘print q(ok!)‘

================================================================


7,启动cmdserver(在后台显示系统信息) 

# /var/www/extsuite/extman/daemon/cmdserver --daemon


8,添加到自动启动队列

# echo “/usr/local/mailgraph_ext/mailgraph-init start” >> /etc/rc.d/rc.local

# echo “/var/www/extsuite/extman/daemon/cmdserver -v -d” >> /etc/rc.d/rc.local 


9,重新启动httpd

# service httpd restart

# service postfix restart


10,在Extman后台就可以查看图形日志了

技术分享

技术分享



本文出自 “珞辰的博客” 博客,请务必保留此出处http://luochen2015.blog.51cto.com/9772274/1762624

配置Mailgraph_ext,使用Extman的图形日志

标签:配置mailgraph_ext   使用extman的图形日志   

原文地址:http://luochen2015.blog.51cto.com/9772274/1762624

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!