awstats

1、安裝awstats軟件包

mount /dev/cdrom /media

cp /media/chapter05/awstats-7.0.zip /usr/src

cd /usr/src


unzip awstats-z.0.zip

mv awstats-7.0 /usr/local/awstats


2、爲要統計的站點建立配置文件

cd /usr/local/awstats/tools

./awstats_configure.pl

1)指定httpd主配置文件的路徑

2)設置日誌類型

3)爲指定WEB站點創建配置文件


rpm -e --nodeps httpd

/usr/local/httpd/bin/apachectl restart

3、修改站點統計配置文件

vim /etc/awstats/awstats.www.benet.com.conf


LogFile="/usr/local/httpd/logs/access_log"(指明網站日誌文件路徑)

DirData="/var/lib/awstats"


4、執行日誌分析,並設置cron計劃任務

mkdir /var/lib/awstats


/usr/local/awstats/tools/awstats_updateall.pl now(執行日誌分析)


crontab -e(設置cron計劃任務)

*/5 * * * * /usr/local/awstats/tools/awstats_updateall.pl now


/etc/init.d/crond start

chkconfig --level 35 crond on


5、訪問AWSTATS分析系統

http://10.0.0.1/awstats/awstats.pl?config=www.benet.com


如果看不到統計信息:

/usr/local/httpd/bin/apachectl restart

/usr/local/awstats/tools/awstats_updateall.pl now




6、簡化url

vim  /usr/local/httpd/htdocs/awb.html

<html>

<head>

<meta http-equiv=refresh content="0;

url=http://10.0.0.1/awstats/awstats.pl?config=www.benet.com">

</head>

<body></body>

</html>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章