Home > Database > Mysql Tutorial > awstats安装与配置

awstats安装与配置

WBOY
Release: 2016-06-07 15:10:55
Original
12057 people have browsed it

1、到以下网站下载awstats和cronolog 安装 包: http://sourceforge.net/projects/awstats/ http://www.cronolog.org 2、解压和 安装 文件 1)tar xzvf awstats-version.tgz 如下: data docs README.TXT tools wwwroot (1)默认 安装 方法 进入tools目录运行aws

1、到以下网站下载awstats和cronolog安装包:

http://sourceforge.net/projects/awstats/

http://www.cronolog.org

2、解压和安装文件

1)tar xzvf awstats-version.tgz 如下:

data docs README.TXT tools wwwroot

(1)默认安装方法

进入tools目录运行awstats_configure.pl文件:

perl awstats_configure.pl

按提示对awstats进行设置

主要包括:发布的目录、配置文件存放的目录和其他信息的指定,一般采用默认设置即可

(2)直接编辑apache的httpd.conf文件添加如下内容:

#

# Directives to allow use of AWStats as a CGI

#

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/"

#

# This is to permit URL access to scripts/files in AWStats directory.

#

#

# Options None

# AllowOverride None

# Order allow,deny

# Allow from all

#




RewriteEngine On

RewriteCond %{REQUEST_METHOD} ^TRACE

RewriteRule .* - [F]

DocumentRoot "/usr/local/awstats/docs/"

ErrorLog /var/log/httpd/erro_awstat.log

CustomLog "|/usr/local/sbin/cronolog /var/log/httpd/access_awstat.%Y%m%d" combined



Options Includes FollowSymLinks

AllowOverride All

Order allow,deny

Allow from all





2)tar xzvf cronolog-1.6.2.tar.gz

cd cronolog-1.6.2

configure

make

make install

安装完成将在/usr/local/sbin目录下生成以下两个文件:

cronolog cronosplit

3、修改apache的httpd.conf文件

设置生成log的文件名:

CustomLog "|/usr/local/sbin/cronolog /var/log/httpd/access_awstat.%Y%m%d" combined

4、编辑配置文件

默认是在/etc/awstats目录下的文件,awstats+域名+conf

例如:awstats.www.taiyu.com.conf

可以在awstats.www.taiyu.com.conf指定域名、log文件

SiteDomain="www.taiyu.com"

LogFile="/var/log/httpd/access_awstat.%YYYY-0%MM-0%DD-0"

5、生成数据

进入../awstats/wwwroot/cgi-bin/目录里执行如下语句:

./awstats.pl -update -config=www.taiyu.com #www.taiyu.com是我们的域名

6、查看成果

http://192.168.2.252/awstats/awstats.pl?config=www.taiyu.com
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template