设为首页 收藏本站
查看: 1300|回复: 0

[经验分享] Linux 安装 awstats 网站分析器,很强大

[复制链接]
发表于 2015-11-27 15:02:25 | 显示全部楼层 |阅读模式
  AWStats简单介绍
  AWStats是在Sourcefroge上发展很快的一个基于perl的web日志分析工具。与其他工具相比,其优势在于
  1. 界面友好,可以根据浏览器直接调用相应的语言界面(支持中文);
  2.基于perl,并且很好的解决了跨平台的问题
  3. 效率比较高,对于一个日访问量百万的网站,是可以承受的
  4. 配置方便简单
  5. 可以自由扩展。
  页面可以提供的信息
  1、访问量,访问次数、页面浏览量、点击数、数据流量等。
  2、精确到每月、每日、每小时的数据。
  3、访问者国家。
  4、访问者IP
  5、robots/spiders的统计
  6、访问者持续访问时间
  7、文件类型的统计信息
  8、客户的浏览器信息
  ……
   DSC0000.jpg

  

  安装:
  wget http://nchc.dl.sourceforge.net/project/awstats/AWStats/7.0/awstats-7.0.tar.gz

  [iyunv@localhost src]# tar xf awstats-7.0.tar.gz -C /usr/local/
[iyunv@localhost src]# cd /usr/local/
[iyunv@localhost local]# mv awstats-7.0 awstats

  [iyunv@localhost local]# cd ./awstats/
[iyunv@localhost awstats]# ls
docs  README.TXT  tools  wwwroot

  [iyunv@localhost tools]# perl awstats_configure.pl

  …………
  -----> 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.xxx.com

  -----> Define config file path
In which directory do you plan to store your config file(s) ?
Default: /etc/awstats
Directory path to store config file(s) (Enter for default):
>


-----> Create config file '/etc/awstats/awstats.www.kissing.com.conf'
Config file /etc/awstats/awstats.www.kissing.com.conf created.


-----> 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=www.kissing.com
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.www.kissing.com.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for 'www.kissing.com' with command:
> perl awstats.pl -update -config=www.kissing.com
You can also read your statistics for 'www.kissing.com' with URL:
> http://localhost/awstats/awstats.pl?config=www.xxx.com(等会用这个地址访问,如果不是本机,将localhost换成本机的IP地址)


Press ENTER to finish...

  修改awastats的配置文件
  [iyunv@localhost tools]# mkdir /var/lib/awstats

  [iyunv@localhost tools]# vi /etc/awstats/awstats.www.xxx.com.conf

  

  [iyunv@localhost tools]# cat  /etc/awstats/awstats.www.xxx.com.conf | grep -vnE ^#  |less

51:LogFile="/var/log/ppp/access.log"

63:LogType=W

122:LogFormat=1

134:LogSeparator=" "

153:SiteDomain="www.xxx.com"

168:HostAliases="kissing.com www.xxx.com 127.0.0.1 localhost"

188:DNSLookup=2

  203:DirData="/var/lib/awstats"

  

  开始分析命令
  [iyunv@localhost tools]# /usr/local/awstats/wwwroot/cgi-bin/awstats.
pl --update -config=www.xxx.com
Create/Update database for config "/etc/awstats/awstats.www.kissing.com.conf" by AWStats version 7.0 (build 1.971)
From data in log file "/var/log/ppp/access.log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 1759345
Found 6 dropped records,
Found 0 comments,
Found 0 blank records,
Found 20 corrupted records,
Found 0 old records,
Found 1759319 new qualified records.

  访问分析页面
  本地
  http://localhost/awstats/awstats.pl?config=www.XXX.com
  非本地访问
  http://192.168.254.46/awstats/awstats.pl?config=www.XXX.com

   DSC0001.jpg

  

   DSC0002.jpg

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-144190-1-1.html 上篇帖子: Linux Apache 给 awstats 创建 访问密码 下篇帖子: linux下安装awstats6.5
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表