# tar zxvf awstats-6.95.tar.gz
# mv awstats-6.95 /usr/local/awstats
# mkdir -m 755 data
# perl tools/awstats_configure.pl
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).
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 《---------此处需要给出httpd的主配置文件的位置以使得awstats可以添加新的配置项。如果此前已经做过此配置,则使用"none"略过此步。
You will need to setup your web server manually to declare AWStats
script as a CGI, if you want to build reports dynamically.
See AWStats setup documentation (file docs/index.html)
File awstats.model.conf updated.
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ? y 《----------这里用来指定是否需要为某站点创建统计日志的配置文件,如果需要,则指定"y"。
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.test.com《---------这里接上一步,说明需要为哪个站点创建统计日志所需的配置文件,此名字仅作为标识站点的名称使用,因此可以使用您方便区别和记忆的名字。
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,通常默认即可。
Config file /etc/awstats/awstats.www.test.com.conf created.
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.test.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.test.com.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for 'www.test.com' with command:
> perl awstats.pl -update -config=www.test.com
You can also build static report pages for 'www.test.com' with command:
> perl awstats.pl -output=pagetype -config=www.test.com
3、调整前面为某站点创建的统计日志所需的配置文件中指定的、某站点实际使用的日志文件的路径
LogFile="/var/log/httpd/mylog.log"
LogFile="/var/log/httpd/access_log"
4、手动更新网站的统计数据,以上面的www.test.com为例
# perl awstats.pl -update -config=www.test.com