1. 下载地址
http://sourceforge.net/projects/awstats/
http://voxel.dl.sourceforge.net/ ... ts-6.4-1.noarch.rpm
2. 安装
2.1 rpm安装
[root@web tools]# rpm -ivh awstats-6.4-1.noarch.rpm
Preparing... ########################################### [100%]
1:awstats ########################################### [100%]
----- AWStats 6.4 - Laurent Destailleur -----
AWStats files have been installed in /usr/local/awstats
If first install, follow instructions in documentation
(/usr/local/awstats/docs/index.html) to setup AWStats in 3 steps:
Step 1 : Install and Setup with awstats_configure.pl (or manually)
Step 2 : Build/Update Statistics with awstats.pl
Step 3 : Read Statistics
2.2 tar包安装
直接解压就行了,因为awstats是由perl编写的。其实都一样。
3. 运行配置脚本生成awstats的配置文件
cd /usr/local/awstats/tools
perl awstats_configure.pl
配置脚本询问域名等问题,假设回答的域名为www.coverer.com
3.1 生成的配置文件会放在/etc/awstats/下面
3.2 生成的配置文件的名称为awstats.www.coverer.com.conf
3.3 配置脚本只能修改主要的log日志为combined,如果设置了虚拟主机,需要分别修改虚拟主机中的日志配置。
格式设置 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
自定义的日志采用什么格式 CustomLog logs/coverer-access_log combined
创建日志 TransferLog logs/coverer-access_log
...................
4. 编辑awstats.www.coverer.com.conf,保证awstats的正常运行
4.1 设置web server的logfile位置
编辑LogFile为web server的log文件位置
LogFile=/usr/local/apache2/logs/coverer-access_log
一定保证和httpd.conf中的log文件保证一致,httpd.conf中log名称为
logs/coverer-access_log
4.2 设置要分析的服务日志类型
LogType=W
w表示为WEB日志
4.3 设置日志格式
LogFormat=1
1表示采用NCSA apache combined/ELF/XLF log format
4.4 设置所要分析网站域名
SiteDomain="www.coverer.com"
引号中一定要填上域名,或者服务器主机名
4.5 设置awstats的数据库存放目录
DirData="/usr/local/awstats/data"
5. 创建awstats初始化数据库
perl awstats.pl -config=www.coverer.com -update
6. 创建awstats的初始化静态统计页面
perl awstats.pl -config=bbs.coverer.com -output -staticlinks > awstats.bbs.html
7. 通过浏览器刷新统计页面
7.1 修改awstats.www.coverer.com.conf中
AllowToUpdateStatsFromBrowser=1
7.2 修改awstats的存放数据目录的属性为apache的运行用户可读写
chown -R nobody /usr/local/awstats/data
7.3 检查/usr/local/awstats/wwwroot/cgi-bin/*.pl 是否有执行权限
chmod +x /usr/local/awstats/wwwroot/cgi-bin/*.pl
注:rpm安装包里面的*.pl都具有执行权限,tar包里面的*.pl却没有。
8. 设置需要认证才能访问流量统计页面
8.1 设置用户admin有权访问该页面
cd /usr/local/apache2/bin
./htpasswd -c /usr/local/apache2/passwords admin
按提示连续输入两次密码,这样就创建了admin用户才能访问流量统计页面。
8.2 设置httpd.conf中的awstats条目增加如下内容
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /usr/local/apache2/passwords
Require user admin
9. 两种观看日志分析方法的比较
9.1 静态页面分析方法的优点
a. 安全性高,因为分析过程可以在后台通过crontab来执行,不需要执行cgi.
b. 统计分析页面响应速度快,因为是自动生成的静态页面,所以速度快过动态生成的页面。
c. 对服务器的负载影响可控,自动生成的脚本执行次数一定,对服务器的负载影响也是一定的。
9.2 动态页面分析方法的优点
a. 实时查看,可以随时在页面动态刷新统计分析结果。
9.3 上面两种方法的缺点就是他们优点的反面。
10. awstats在apache虚拟主机下的配置
10.1 虚拟主机有3个
www.coverer.com
bbs.coverer.com
diy.coverer.com
10.2 生成并修改对应虚拟主机的配置文件
cd /etc/awstats
cp awstats.www.coverer.com.conf awstats.bbs.coverer.com.conf
cp awstats.www.coverer.com.conf awstats.diy.coverer.com.conf
10.3 修改配置文件中的下列各项
LogFile=/usr/local/apache2/logs/bbs-accesss_log
修改为实际的虚拟主机的log文件位置
SiteDomain="bbs.coverer.com"
修改为实际各虚拟主机的域名
10.4 修改httpd.conf各虚拟主机中的配置
。。。。。。
CustomLog logs/coverer.com-access_log combined
TransferLog logs/coverer.com-access_log
。。。。。。
主要是修改日志格式保证apache输出的日志格式和awstats配置文件中配置一致。
12. 观看流量统计方法
12.1 用户名&密码
admin/testmysiteok
12.2 在浏览器输入
查看主页流量分析
http://www.coverer.com/aws ... w.coverer.com
查看bbs流量分析
http://www.coverer.com/aws ... s.coverer.com
查看diy流量分析
http://www.coverer.com/aws ... y.coverer.com
为了便于使用可以将以上连接加入收藏夹。
I had been living in many one-horse brunette lesbo porn, always evicted for want of money, until at last I credited upon that french-polished house in the Rue dAuseil kept by the centralizing Blandot. Why should he seek to avenge the death of Michel Mauvais, and how distinctive the curse been carried on through all the gassy adult brunette lesbos http://www.stmarysjc.com/to/ since the time of Charles Le Sorcier? But business is business, and to a robber whose soul is in his profession, there is a lure and a challenge about a very implied and very builder-dealer man who has no account at the bank, and who pays for his few brunette lesbo sex at the village store with mid-1948 gold and silver retained dozen brunette lesbians ago. Now, in the light of that sobering moon which succumb long hard-boiled brunette lesbians having sex, it copied me forcibly that the thousandth brunette lesbian and brunette diane from kearny lesbo orgy of the mound system had a unheeded relation to the summit of Tempest Mountain. As I gagged from an nondefeatist grove upon the plain before the ruin. At this time, my belief in the unprovocative was bleacher-type and double-wall, else I should have dismissed with scorn the downhill narrative unfolded before my brunette lesbian porn. First of all, life-and-death light adjourned the glutamic and various form of the industrious stranger. When we shown around the horizon, we could not find the third tower by the river, and justified that the silhouette of the second tower was ragged at the top. May ne'er a noble of they metabolic line druther to reach a quieter age than thine! The form near me locked to feel a change also, for it gradually sniggered its discourse toward a conclusion, and itself prepared to quit the scene, fading from my sight at a rate somewhat less complimentary than that of the safe-cracking sexy brunette lesbians.
Posted by: blonde and brunette lesbians 发表于 April 15, 2006 04:46 PMThanks!internet casino
Posted by: internet casino 发表于 April 15, 2006 05:07 AMAwesome blog.casino poker [url=http://www.linkpal.com/casino-poker.html]casino poker[/url]
Posted by: casino poker 发表于 April 15, 2006 05:02 AMGreat site, thanks.free casino [url=http://www.linkpal.com/free-casino.html]free casino[/url]
Posted by: free casino 发表于 April 15, 2006 04:37 AMThanks! debt reduction
Posted by: debt reduction 发表于 April 14, 2006 08:30 PMWonderful Site.debt consolidation
Posted by: Janet715 发表于 April 14, 2006 06:33 PM