全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1349
推到 Plurk!
推到 Facebook!

Web Server 紀錄檔分析軟體

 
jackkcg
站務副站長


發表:891
回覆:1050
積分:848
註冊:2002-03-23

發送簡訊給我
#1 引用回覆 回覆 發表時間:2002-12-22 13:28:29 IP:61.64.xxx.xxx 未訂閱
架設 Linux Webalizer               作者: ADJ網路實驗室    一.前言:            Webalizer 是一個好用的Web Server 紀錄檔分析軟體,它除了能夠分析 Apache web server 所產生的log 紀錄檔之外,還能夠分析FTP 的 Log 檔,以相當精美的HTML網頁輸出,目前相當多的網站便是使用這一個軟體作為流量分析統計之用,因此在這邊也分享給各位來使用。     Webalizer 還有一個好處便是您可以透過這個軟體來分析網站的運作情況,同時還有支援中文語系,不過要使用時請先看一下 INSTALL 及 README 兩個檔案,因為並不是很好安裝,同時設定也頗為困難,您可能先要了解 Apache Web Server 的運作才比較能夠了解選項的內容.     如何取得Package(目前最新版為webalizer-2.01-09):     Webalizer Homepage: http://www.mrunix.net/webalizer/download.html ADJ網頁流量分析: http://www.adj.idv.tw/usage    Before you compiler, decompress the tarball (tar.gz) : [root@linux /]# cp webalizer-2.01-09-src.tgz /home/webalizer/ [root@linux /]# cd /home/webalizer/ [root@linux webalizer]# tar zxvf webalizer-2.01-09-src.tgz      說明一下,由於網頁輸出時會用到 gd 這一個程式來作繪圖的部分,所以你必須先要有gd這一個軟體。您可以透過這個指令來看看是否有安裝gd:    [root@linux webalizer]# rpm -qi gd Name        : gd                           Relocations: /usrVersion     : 1.3                               Vendor: Red Hat, Inc.Release     : 6                             Build Date: 西元2000年02月04日 (星期五) 01時31分42秒Install date: 西元2001年08月02日 (星期四) 11時59分35秒      Build Host: porky.devel.redhat.comGroup       : System Environment/Libraries   Source RPM: gd-1.3-6.src.rpmSize        : 322718                           License: BSD-stylePackager    : Red Hat, Inc. Summary : A graphics library for drawing .gif files.Description :Gd is a graphics library for drawing .gif files. Gd allows your code toquickly draw images (lines, arcs, text, multiple colors, cutting andpasting from other images, flood fills) and write out the result as a.gif file. Gd is particularly useful in web applications, where .gifsare commonly used as inline images. Note, however, that gd is not apaint program. Install gd if you are developing applications which need to draw .gif files. If you install gd, you'll also need to install the gd-devel package. 二.Compile webalizer: Move into the new Webalizer directory and type the following commands on your terminal: --with-language=chinese:就是讓webalizer變成中文化 [root@linux webalizer]#./configure --with-language=chinese --with-gdlib=/usr/lib --with-gd=/usr/bin [root@linux webalizer]#make[root@linux webalizer]#mkdir /var/www/html/usage Compiler之後.資料夾會多幾個檔案: [root@linux webalizer]#ls CHANGES README.FIRST dns_resolv.h lang/ parser.c webalizer.LSMCOPYING aclocal.m4 dns_resolv.o lang.h parser.h webalizer.cCopyright config.cache graphs.c linklist.c parser.o webalizer.hDNS.README config.log graphs.h linklist.h preserve.c webalizer.oINSTALL config.status* graphs.o linklist.o preserve.h webalizer.pngMakefile configure* hashtab.c msfree.png preserve.o webalizer_lang.h@Makefile.in configure.in hashtab.h output.c sample.conf webazolver@Makefile.std country-codes.txt hashtab.o output.h webalizer*README dns_resolv.c install-sh* output.o webalizer.1 To run Webalizer, the following file is required, and must be created or copied to the appropriate directory on your server: [root@linux webalizer]#cp webalizer /usr/bin/ [root@linux webalizer]#cd /etc [root@linux etc]#ls webalizer* webalizer.conf.sample[root@linux etc]#cp webalizer.conf.sample webalizer.conf.adj [root@linux etc]#vi webalizer.conf.adj 三.Configure the /etc/webalizer.conf file: Edit the webalizer.conf.adj file(將裡面的值改成下列): LogFile /var/log/httpd/access_logOutputDir /var/www/html/usageHostName www.adj.idv.tw Incremental yesPageType htm*PageType cgiPageType phpHideURL *.gifHideURL *.GIFHideURL *.jpgHideURL *.JPGHideURL *.raIgnoreURL /taskbar* 四.Make Apache aware of Webalizer output directory: Once Webalizer has been installed in the system we must add the following lines into the httpd.conf file of Apache to be able to locate and use it features: 1.編輯 httpd.conf , vi /etc/httpd/conf/httpd.conf and add the following lines : Options NoneAllowOverride NoneOrder deny,allowAllow from all 2.別忘了重起 Apache: [root@linux webalizer]#service httpd restart Shutting down http: [ OK ]Starting httpd: [ OK ] 五:Running Webalizer manually first time: 第一次手動執行 Webalizer ,會有找不到記錄的現像..這是正常的...只要執行過第二次...就沒問題囉..: [root@linux webalizer]#/usr/bin/webalizer -c /etc/webalizer.conf.adj 正常訊息如下: [root@linux webalizer]#/usr/bin/webalizer -c /etc/webalizer.conf.adjWebalizer V2.01-09 (Linux 2.4.3-20mdk) Chinese使用記錄檔 /var/log/httpd/access_log (clf)產生輸出於 /var/www/html/usage主機名稱是 'www.adj.idv.tw'讀取歷史記錄 webalizer.histReading previous run data.. webalizer.currentSaving current run data... [03/03/2002 18:21:06]產生報表給 三月 2002產生彙總報表儲存歷史記錄資訊120778 記錄 (119881 忽略) in 6.02 秒, 20062/sec 設定crontab ..讓它每二小時跑一次: [root@linux webalizer]#crontab -e 0 */2 * * * /usr/bin/webalizer -c /etc/webalizer.conf.adj 執行結果如下: 這樣就大公告成啦....Good Lucky Everyone!!!
------
**********************************************************
哈哈&兵燹
最會的2大絕招 這個不會與那個也不會 哈哈哈 粉好

Delphi K.Top的K.Top分兩個字解釋Top代表尖端的意思,希望本討論區能提供Delphi的尖端新知
K.表Knowlege 知識,就是本站的標語:Open our mind
系統時間:2024-05-17 17:35:20
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!