这是我参与更文应战的第 19 天,活动概况检查:更文应战


一名致力于在技能道路上的终身学习者、实践者、分享者,一位忙起来又偶然偷闲的原创博主,一个偶然无聊又偶然诙谐的少年。

欢迎各位掘友们微信查找「杰哥的IT之旅长沙师范学院注重!

原文链接:如安在 Linux 环境下安顿 AWStats 剖析体系来监控 Web 站点?

前语

在上一篇文章《详解 Linux 环境下安顿 HTTPD 服务》中我CSS们介绍了 Linux 环境下安顿 httpd 服务的基本建立、相关装备以及相关阐明描绘,那么搭起来这个 httpd 服务肯定是需求长沙师范学院为咱们供给服务的。一起,在 httpd 服务器的拜访日志文件html代码中,也记录了许多的客户端的拜访信息。经过这些信息能够了解到 Web 站点的拜访情况等等;

那么,在这篇文章中咱们将给咱们介绍一款功用强壮的免费html是什么意思东西 AWStats,能够将图软件商铺下载形的方法来进行展示核算信息,以结束主动化的架构师需求把握哪些常识日志剖析及核算作业。

一、AWStats简介

AWStats 是运用 Perl 言语开发的CSS一款开源日志剖析体系,可用来剖析 Apache 网站服务器的拜访日志、Samba、Vsftpd 等服务的日志信息,且结合计划使命 crond 服务对不断添加日志内容守时进行剖析。

AWStats 软件包下载地址:

sourceforge.net/phtml简略网页代码rojects/aw…

AWStats 剖析体系监控 Web 站点,yyds!!!

www.awstats.linux是什么操作体系org/

二、设备 AWStats 软架构是什么意思件包linux必学的60个指令

将下载好的 AW软件开发Stats 软件包解压到 httpd 服务器中的 /usr/local/ 目录下。

# tar zxf awstats-7.3.tar.gz
# mv awstatslinux体系安装-7.3 /usr/local/awstats

为需核算的站点建立装备文件,AWSta架构图用什么软件做ts 体系支撑核算多个网站的日志文件,以网站称html网页制造谓来区分不同的站点。实施日志文件剖析前,需为每个 web 站点建立站点核算装备文件,这时需在 awstats/tools 目录下实施 AWStats 体系供给的 awstats_configure.pl 脚本创立进程。

实施后,将会进入交互式的装备终端,需用户根据提示来进行手动输入指定 http架构是什么意思d 主配html标签特点大全备文件的途径。

# cd /usr/local/awstats/tools/
# chmod软件库 +x awstats_configure.pl
# ./awstats_configure.pl
----- AWStats awstat陈省身s_configure 1.0 (build 20140126) (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 setlinuxup, however following the step by step manual setup
docume陈省身ntathtml标签ion (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 anallinux体系yze mailhtml简略网页代码 or ftp log files instead of web log files,
- You need to analyze load balanced servers log files,
- You want to 'understand' all poss长沙师范学院ible ways to use AWStats...
Read the AWStats documentation (docs/index.html).
-----> Running OS deteclinuxted: Lhtml标签inux, BSD or Unix
-----> Check for web server install
Enter full config file path of your Web server.
Examhtml代码ple: /etc/httpd/httpd.conf
Example: /usr/local/apache2/conf/httpd.conlinux重启指令f
Example: c:Progrhtml网页制造am filesapaclinux指令he groupapacheconfhttpd.conf
C陈思思onfig file path ('none' to skip web server setup):
> /usr/local/httpd/conf/httpd.conf                 # 输入 httpd.conf 装备文件的途径

实施完上一步的操作后,接下来需设置日志类型,当提示是否修改日志类型时,输入 “y”字母后装备脚本将主动修改 httpd.conf 装备文件,来进行添加拜访 AWStats 剖析体系的相关装备内容。

-----> Check架构师 and complete web server c架构师和程序员的差异onfig file '/usr/local/httpd/conf/httpd.conf'
Warning: You Apache config file co软件技能专业ntains directives to write 'co软件商铺mm架构是什么意思on' log files
This means that some features can't work (os, browsers and keyword软件技能专业s detection).
Do you want me to setup Apache to write 'combined' log files [y/N] ? y
Add 'Alia架构师s /awstatsclasses "/usr/local/awstats/html文件怎样翻开wwwroot/classes/"'
Adlinuxd 'Alias /awstatscss "/usr/local/awstats/wwwr软件技能oot/css/"'
Add 'Alias /awstatsicons架构师和程序员的差异 "/uhtml个人网页完好代码sr/local/awstats/wwwroot/icon/"'
Add 'ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"'
Add '<Dirhtml文件怎样翻开ectory>' directive
AWStats directives added to Apach软件商铺下载e conhtml是什么意思fig file.
-----> Update软件库 model config file '/usr/local/awstats/www仓鼠养殖八大忌讳root/cgi-bin/awstats.model.conf'
File awstats.model.conf updated.

为指定 web 站点创立装备文件,根据提示输入 “y” 来创立站点装备文件,并指定要核算的方针网站称谓 www.jacktiangjwan.com 站点装备文件的寄存途径(/etc/awstats)等;后续直接按 回车键 直到退出装备东西即可。

-----> Need to create a new config file ?
Do youhtml个人网页完好代码 want me to buil软件库d 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 ?
E架构师需求把握哪些常识xample: www.mysitehtml代码.com
Example: demo
Your web site, virtual server or profillinux指令e name:
> www.jacktiangjwan软件应用.com                   # 指定要核算的方针网站称谓
-----> Define config file path
In which directory do you plan to store your config file(s) ?
De架构师工资一月多少fault: /etc/awstats
Directory path tohtml store config file(s) (Enter for default):
>                              # 直接按 Enter 键承受默认设置
-----> Create config file '/etc/awstats/awstats.wwwlinux.jacktiangjwan.com.conf'
Config fil长生十万年e /etc/awstats/awstats.www.jacktiangjwan.com.conf createdlinux是什么操作体系.

按照上述政仓鼠养殖八大忌讳策网站称谓 www.jacktiangjw架构an.com 建立的站点核算装备文件将寄存在 /etc/awstats 目录下,文件名为:awstats.www.jacktiangjwan.con.conf ,辰时是几点到几点然后需修改站点核算装备文件中的指定剖析的web日志文件和指定用来寄存html是什么意思核算数据的目录,所修改的装备如下;

  • LogFile:指定日志途径,设置 web 日志文件的方位;
  • SiteDomain:为指定的网站架构师需求把握哪些常识HTML谓;
  • DirData:指定数据目录,但需求创linux建指定的目录;
# vi /etc/awsta仓鼠养殖八大忌讳ts/awstatslinux必学的60个指令.www.jac架构师工资一月多少khtml个人网页完好代码tiangjwan.com.conf # 修改装备文件,将陈思思以下原有的三行装备进行替换成如下即可;
LogFile="/usr/local/httpd架构图用什么软件做/logs/ac潮汕是哪个省的城市cess_log"
SiteDomain="wlinux必学的60个指令ww.jacktiangjwan.com"
DirData="/var/lib/awstats"
# mkdir /var/lib/awstats

运用 awstats 供给的 awstats_updateall.pl 脚本,可更html个人网页完好代码新所有站点的日志核算数据。实施该脚本时,体系将会主动剖析新增的日志内容,并将剖析效果更新到核算数据库中。

#linux chmod +x awsta架构规划ts_updateall.pl
# ./awstats_updateall.pl now架构图
R软件应用unning '"/usr/local/awstahtmlts/wwwrlinuxoot/cgi-bin/awstats.pl" -update -config=www.jacktia超神兽宠店ngjwan.com -configdir="/etc/aw软件商铺stats"' to update config w软件应用ww.jacktiangjwan.com
Create/Update database for configlinux常用指令 "/etc/awstats/awstats.www.jacktCSSiangj架构是什么意思wan.com.conf" by AWStats version 7.3 (build 20140126)
From data in log file架构图 "/usr/local/httpd/logs/access_log"...
Phase 1 : First bypass old records, searching new record...
Sea架构规划rching ne软件测试w records from beginning of log file...软件库
Jumped lines in file: 0
Parsed lines in file: 4
Found 0 dro软件库pped records,
Found 0 comments,
Found 0 blanlinux重启指令k records,
Found 4 corrupted r架构图用什么软件做ecords,
Found 0 old records,
Found辰时是几点到几点 0 new qualified records.

因为 w软件技能专业eb 日志文件的内容将不断更新,咱们能够设置成软件技能守时使命来守时并主动的实施该使命来结束日软件应用志剖析作业。

# crontab -e
*/5 * * * * /usr/local/awstats/tools/awstats_updateall.pl now
# /etc/init.d/crond start
# chkconfig --level 35 crond on

以上进程做完后,这时需求来验证是否做得成功,需把客户端的 IP 地仓鼠养殖八大忌讳址及指定网站称谓添加在/etc/hosts 文件软件技能专业中,并进行重启 httpd 服务及 crond 守时使命;

# vi /etc/hosts
127.0.0.1 localhost localhos陈涉世家翻译及原文t.localdomain localh陈涉世家翻译及原文ost4 local架构师需求把握哪些常识hostHTML4.localdomain4
::1 localhost lhtml文件怎样翻开ocalhost.localdomain localhost6 localhost6.localdomain6
19软件开发2.168.3.123 www.jacktiangjwan.com
# service httpd restart
# service crond restart
中止 crond:[承潮汕是哪个省的城市认]
正在发起 crond:[供认]

三、拜访 AWStats 剖析体系

在客户端翻开浏览器地址栏中拜访站点 :www架构师需求把握哪些常识.jacktiangjwan.com/awstaHTMLts/aws… 后即可看到 AWStats 日志剖析体系的页面(如下图所示)该页面分别按拜访架构师和程序员的差异时刻、用户来历、所用浏览器等多种类别分别列出html是什么意思了具体的网站拜访情况;还能够经过左边栏中能够检查每个小时、天、周、月的网站拜访次数、网页数、文件数等信息;除超神兽宠店此之外,还有许多其他的功用,在这里就不逐一演示了,感兴趣的朋友能够建立一下该环境研究一下。

AWStats 剖析体系监控 Web 站点,yyds!!!

在拜访 AWStats 剖析体系时,需软件工程指定 awstats 目录、脚本方位、核Linux算方针等相关信息,这样看来,不方便咱们的回忆,输入比较费事,因此咱们能够在 web 根目录下建立一个主动跳转的 html 网页文件。在 /usr/local/httpd/htdocs/ 目录下建立 abc.html 的文件,将上述拜访软件商铺的 url 写linux指令在该文件中。用陈涉世家翻译及原文户只需求拜访 www.jacktiangjwan.com/abc.html ,即可主动跳转到 ww架构图用什么软件做w.jacktiangjwan.com 站点的 AWStatlinux指令s 日系剖析体系页面中。

# vi /usr/local/httpd/htdocs/abc.html
<html>
<head>
&html5lt;meta http-equiv=refresh content="0;
url=http://ww架构图w.jacktiangjwan.com/awst架构图ats/awstats.pl?config=www.jacktiangjwan.com">
</head>
<body></body>
</html&陈省身gt;

AWStats 剖析体系监控 Web 站点,yyds!!!

举荐阅览

Nginx系列教程(一)| 手把手教你在Linhtml是什么意思ux环境下建立Nginx软件工程服务

Nginx系列教程(二)| 一文带你读懂Nginx的正向与反向代理

Nginx系列教程(三)| 一文带你读懂Nginx的负载均衡

Nginx系列教程(四)|HTML 一文带你读懂Nginx的动态分别

Nginx系列教程(五)| 使用 Nginx+Keepalived 完结高可用技能

Nginx系列教程(六)| 手把手教你建立 LNMP 架构并安顿一套体系

详解 L软件工程专业inux 环境下html简略网页代码安顿 HTTPD 服务!


原创不易,假如你觉得这篇文章对你有点用的话,费事你为本文点个赞、谈论或转发一下,因为这linux指令将是我输出更多优质文章的动力,感谢!

对了,掘友们记得给我点个免费的注重哟!避免你走失下次就找不到我了。

咱们下期再见!