亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 12588 | 回復(fù): 3
打印 上一主題 下一主題

[Mail] AWStats分析postfix日志(這個(gè)文章很詳細(xì)所以轉(zhuǎn)過來) [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2008-04-01 08:57 |只看該作者 |倒序?yàn)g覽
【前言】
AWStats是一套免費(fèi)及功能強(qiáng)大的Log分析軟體,它可以透過CGI及Command line的方式來產(chǎn)生報(bào)表。

它支援了以下的Log格式

(1)Apache-combined log(XLF/ELF)
(2)Apache or Squid-common log(CLF)
(3)IIS 5.0/6.0-W3C log
(4)大部份的Web/Wap/Proxy/Streaming Servers(Apache 1.3.x and 2.x, IIS 5.0 and 6.0, WebStar, WebLogic, WebSite, Windows Media Server, Tomcat, Squid, Sambar,Roxen, Resin, RealMedia server, Oracle9iAS, Lotus Notes/Domino, Darwin, IPlanet, IceCast, ZeroBrand, Zeus, Zope,
Abyss..)
(5)FTP Server(ProFTP...)
(6)Mail Server(Postfix/Sendmail/QMail/Mdaemon/www4mail...)


支援平臺(tái)

(1)Windows 2000/NT4/Me、Linux、Macintosh、Solaris、Aix、BeOS、FreeBSD
(2)ActivePerl 5.6/5.8、Perl 5.6/5.8


=========================================
作者: zoob (vincent@myunix.idv.tw)

版權(quán)聲明:可以任意轉(zhuǎn)載,轉(zhuǎn)載時(shí)請(qǐng)務(wù)必標(biāo)明原始出處和作者資訊

【安裝AWStats】

(1)請(qǐng)先從官方網(wǎng)址 ( http://awstats.sourceforge.net/ ) 下載AWStats ( http://prdownloads.sourceforge.net/awstats/awstats-6.1.tgz )

(2)解壓縮 awstats-6.1.tgz

(3)將解壓縮出來的 tools 及 wwwroot 目錄複製到 /usr/local/awstats 目錄下

(4)切換目錄至 /usr/local/awstats 目錄

(5)執(zhí)行 tools 目錄下的 configure.pl

代碼:
tools/configure.pl


(6)設(shè)定config檔
----- AWStats configure 1.0 (build 1.32) (c) Laurent Destailleur -----
This tool will help you to configure AWStats to analyze statistics for
one web server. You can try to use it to let it do all that is possible
in AWStats setup, however following the step by step manual setup
documentation (docs/index.html) is often a better idea. Above all if:
- You are not an administrator user,
- You want to analyze downloaded log files without web server,
- You want to analyze mail or ftp log files instead of web log files,
- You need to analyze load balanced servers log files,
- You want to 'understand' all possible ways to use AWStats...
Read the AWStats documentation (docs/index.html).

-----> Running OS detected: Linux, BSD or Unix

-----> Check for web server install

Enter full config file path of your Web server.
Example: /etc/httpd/httpd.conf
Example: /usr/local/apache2/conf/httpd.conf
Example: c:\Program files\apache group\apache\conf\httpd.conf
Config file path ('none' to skip web server setup):
> /etc/httpd/conf/httpd.conf <-----輸入httpd.conf的絕對(duì)路徑

-----> Check and complete web server config file '/etc/httpd/conf/httpd.conf'
AWStats directives already present.

-----> Update model config file '/usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf'
File awstats.model.conf updated.

-----> Need to create a new config file ?
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ?y

-----> Define config file name to create
What is the name of your web site or profile analysis ?
Example: www.mysite.com
Example: demo
Your web site, virtual server or profile name:
> www.myunix.idv.tw <-------- 輸入你所要建立的WebSite name

-----> Add update process inside a scheduler
Sorry, configure.pl does not support automatic add to cron yet.
You can do it manually by adding the following command to your cron:
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=wwww.myunix.idv.tw
Or if you have several config files and prefer having only one command:
/usr/local/awstats/tools/awstats_updateall.pl now
Press ENTER to continue...

A SIMPLE config file has been created: /etc/awstats/awstats.wwww.myunix.idv.tw.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for 'wwww.myunix.idv.tw' with command:
> perl awstats.pl -update -config=wwww.myunix.idv.tw
You can also read your statistics for 'wwww.myunix.idv.tw' with URL:
> http://localhost/awstats/awstats.pl?config=wwww.myunix.idv.tw

Press ENTER to finish...

(7)以上步驟完成後,會(huì)在/etc/awstats目錄下建立一檔案- awstats.www.myunix.idv.tw.conf

(建立 /var/lib/awstats 目錄,並給予 777 之權(quán)限
註:若不給予777權(quán)限,將來若設(shè)定 AllowToUpdateStatsFromBrowser=1 時(shí),會(huì)無法透過Browser來即時(shí)更新Report

(9)設(shè)定 httpd.conf,檢查在httpd.conf中是否有以下設(shè)定,如果沒有的話,請(qǐng)自行加入,並且重新啟動(dòng)httpd服務(wù)

代碼:
#
# Directives to add to your Apache conf file to allow use of AWStats as a CGI.
# Note that path "/usr/local/awstats/" must reflect your AWStats install path.
#
Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"
#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory "/usr/local/awstats/wwwroot">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory> 【分析 Mail Log-Postfix/Sendmail/Qmail/MDaemon】
適用於:Postfix/Sendmail/Qmail/MDaemon

(1)設(shè)定awstats.mail.myunix.idv.tw.conf

代碼:
LogFile="perl /usr/local/awstats/tools/maillogconvert.pl standard < /var/log/maillog |"  <----請(qǐng)指定你mail log file的絕對(duì)路徑及l(fā)og名稱
LogType=M <---- M代表分析類型為mail log files
LogFormat="%time2 %email %email_r %host %host_r %method %url %code %bytesd"
SiteDomain="mail.myunix.idv.tw" <----指定定從log檔中過濾符合SiteDomain的記錄
HostAliases="myunix.idv.tw mail.myunix.idv.tw localhost 127.0.0.1" <-----指定哪些Domain或ip address為Local,其餘皆視為External
LevelForBrowsersDetection=0
LevelForOSDetection=0
LevelForRefererAnalyze=0
LevelForRobotsDetection=0
LevelForWormsDetection=0
LevelForSearchEnginesDetection=0
LevelForFileTypesDetection=0
ShowMenu=1
ShowMonthStats=HB
ShowDaysOfMonthStats=HB
ShowDaysOfWeekStats=HB
ShowHoursStats=HB
ShowDomainsStats=0
ShowHostsStats=HBL
ShowAuthenticatedUsers=0
ShowRobotsStats=0
ShowEMailSenders=HBML
ShowEMailReceivers=HBML
ShowSessionsStats=0
ShowPagesStats=0
ShowFileTypesStats=0
ShowFileSizesStats=0
ShowBrowsersStats=0
ShowOSStats=0
ShowOriginStats=0
ShowKeyphrasesStats=0
ShowKeywordsStats=0
ShowMiscStats=0
ShowHTTPErrorsStats=0
ShowSMTPErrorsStats=1



設(shè)定完畢,請(qǐng)存檔

(2)執(zhí)行awstats.pl,記得指定設(shè)定檔時(shí),不要輸入設(shè)定檔名前面的 awstats. 及 .conf

代碼:
[root@xxx awstats]# /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=mail.myunix.idv.tw -update


如果出現(xiàn)以下訊息,就代表執(zhí)行成功


Update for config "/etc/awstats/awstats.mail.myunix.idv.tw.conf"
With data in log file "perl /usr/local/awstats/tools/maillogconvert.pl standard < /var/log/maillog |"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Jumped lines in file: 0
Parsed lines in file: 358
Found 0 dropped records,
Found 0 corrupted records,
Found 358 old records,
Found 0 new qualified records.


(3)開啟Browser,輸入 http://www.xxx.xxx/awstats/awstats.pl?config=mail.myunix.idv.tw ,便可檢視你剛剛所產(chǎn)生的報(bào)表了。

Demo Site

(4)記得將步驟(2)的指令設(shè)定在crontab,讓它定期產(chǎn)生Log Report

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2008-04-03 15:13 |只看該作者
很好的東西為什么沒人頂呢?

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2008-09-08 10:06 |只看該作者
好文,馬上測(cè)試下。。。

論壇徽章:
8
綜合交流區(qū)版塊每周發(fā)帖之星
日期:2015-12-02 15:03:53數(shù)據(jù)庫技術(shù)版塊每日發(fā)帖之星
日期:2015-10-02 06:20:00IT運(yùn)維版塊每日發(fā)帖之星
日期:2015-10-02 06:20:00IT運(yùn)維版塊每日發(fā)帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年紀(jì)念徽章
日期:2013-10-24 15:41:34酉雞
日期:2013-10-19 10:17:1315-16賽季CBA聯(lián)賽之北京
日期:2017-03-06 15:12:44
4 [報(bào)告]
發(fā)表于 2008-09-08 10:57 |只看該作者
AWStats非常不錯(cuò)
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP