1.首先安装awstats
cd /data0/software
wget http://sourceforge.net/projects/awstats/files/AWStats/6.9/awstats-6.9.tar.gz/download
tar zxvf awstats-6.9.tar.gz#mv /data0/software/awstats-6.9/* /usr/local/awstats
#cd /usr/local/awstats/tools
#./awstats_configure.pl
安装过程中会让你回答下列等问题
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):
> /opt/apache/conf/httpd.conf
Do you want me to setup Apache to write ‘combined’ log files [y/N] ? y
Do you want me to build a new AWStats config/profile file (required if first install) [y/N] ? y
Your web site, virtual server or profile name:
> redis.spy.com
Directory path to store config file(s) (Enter for default):
>
安装过程会自动在httpd.conf文件中添加下面的配置信息
Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"
Options None
AllowOverride None
Order allow,deny
Allow from all