完整安装配置awstats的方法(V0.5版)[1]

[入库:2005年9月21日] [更新:2007年3月24日]

本文简介:


[b:794ef16052]作者:苏小勇
http://www.bestunix.net[/b:794ef16052]

[b:794ef16052]关键词: [/b:794ef16052]awstats 日志分析

说明:下面的完全安装步骤几乎完全是按照文档一步步来的,并没什么新意,但我在网上搜了一下,这样的操作说明还算是独一无二的了,谨以此文献给跟我一样菜的菜鸟们。本文还不太成熟,有什么问题欢迎大家反馈。转载请保留作者联系信息,谢谢。

首先,去http://awstats.sourceforge.net/下载awstats的安装包,解压缩该包,并把它复制到你希望安装的位置,awstats默认让你安装到/usr/local/awstats下面,当然你也可以安装到别的地方,不过这样的话系统会让你确认安装的路径。我们这里以安装到/usr/local/awstats为例。
另外,awstats要求将http.conf中的CustomLog /yourlogpath/yourlogfile common 改为
CustomLog /yourlogpath/yourlogfile combined ,我看了一下,我默认的就是combined,可能现在新版本默认的都是这个吧,那就不用改了。
一切准备妥当以后,我们就开始安装了,先进入/usr/local/awstats/tools里,运行awstats_configure.pl启动安装向导,步骤如下
[code:1:794ef16052][root@demo tools]# ./awstats_configure.pl 

----- AWStats awstats_configure 1.0 (build 1.3) (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 setup, however following the step by step manual setup
documentation (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 analyze mail or ftp log files instead of web log files,
- You need to analyze load balanced servers log files,
- You want to 'understand' all possible ways to use AWStats...
Read the AWStats documentation (docs/index.html).

-----> Running OS detected:; Linux, BSD or Unix

-----> Check for web server install

Enter full config file path of your Web server.
Example:; /etc/httpd/httpd.conf
Example:; /usr/local/apache2/conf/httpd.conf
Example:; c:;\Program files\apache group\apache\conf\httpd.conf
Config file path ('none' to skip web server setup):;
> /etc/httpd/conf/httpd.conf  [/color]#输入你httpc.conf的路径,对于httpd2系列的一般都在/etc/httpd/conf/这个目录下面[/code:1:794ef16052]
这里将awstats的配置信息直接写入了httpd.conf
[code:1:794ef16052]-----> Check and complete web server config file '/etc/httpd/conf/httpd.conf'
  Add '<Directory>' directive
  AWStats directives added to Apache config file.[/code:1:794ef16052]

 根据上面的httpd配置,更新了awstats.model.conf的内容,下面的.conf文件都要根据这个生成。
[code:1:794ef16052]
-----> Update model config file '/usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf'
  File awstats.model.conf updated.[/code:1:794ef16052]
下面问你是否要创建一个新的配置文件,我们当然要创建了,否则装awstats干什么呀。选y没说的。
[code:1:794ef16052]-----> 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[/color][/code:1:794ef16052]

下面是要生成conf文件的名称了,因为conf文件的名称都是awstats.yourdomainname.conf格式的,所以这里要求你输入你要监测的域名,其实这个域名只是与其他域名相区分的,并不一定非要真实的。我这里输入的是www.bestunix.net
[code:1:794ef16052]-----> 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.bestunix.net[/color][/code:1:794ef16052]

下面是让你输入配置文件的路径,直接回车就可以了,当然你也可以自己定义
[code:1:794ef16052]-----> 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):;
> /etc/awstats[/color][/code:1:794ef16052]

好了,现在就在/etc/awstats下面创建了你定义的配置文件,这里是awstats.www.bestunix.net.conf

本文关键:完整安装配置awstats的方法(V0.5版)
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top