AWStats는 다음 과정으로 간단하게 설치할 수 있습니다.(작성시점 AWStats-6.7 설치)
cd /usr/ports/www/awstats
make install clean
설치한 이후에는 다음과 같은 메시자가 표시됩니다.
*****************************************************************
Please add the following to your apache config, and restart.#
# Directives to allow use of AWStats as a CGI
#
Alias /awstatsclasses "/usr/local/www/awstats/classes/"
Alias /awstatscss "/usr/local/www/awstats/css/"
Alias /awstatsicons "/usr/local/www/awstats/icons/"
ScriptAlias /awstats/ "/usr/local/www/awstats/cgi-bin/"#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory "/usr/local/www/awstats/">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>*****************************************************************
If you are upgrading from AWStats 6.4 or older, please note the following:
If you used the geoip plugin, you must edit your AWStats config file
to change the line
LoadPlugin="geoip GEOIP_STANDARD"
into
LoadPlugin="geoip GEOIP_STANDARD /pathto/GeoIP.dat"*****************************************************************
위 메시지를 바탕으로 아파치의 httpd.conf 를 수정한 이후에 아래와 같이 awstats_configure를 실행하여 기본 을 설정합니다.
# /usr/local/www/awstats/tools/awstats_configure.pl
-----> Running OS detected: Linux, BSD or Unix
Warning: AWStats standard directory on Linux OS is '/usr/local/awstats'.
If you want to use standard directory, you should first move all content
of AWStats distribution from current directory:
/usr/local/www/awstats
to standard directory:
/usr/local/awstats
And then, run configure.pl from this location.
Do you want to continue setup from this NON standard directory [yN] ? y
-----> Check for web server installEnter 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):
> /usr/local/etc/apache22/httpd.conf
-----> 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] ? N
-----> Add update process inside a scheduler
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/www/awstats/wwwroot/cgi-bin/awstats.pl -update -config=myvirtualserver
Or if you have several config files and prefer having only one command:
/usr/local/www/awstats/tools/awstats_updateall.pl now
No config file was built. You can run this tool later to build as
much config/profile files as you want.
Once you have a config/profile file, for example 'awstats.demo.conf',
You can manually update your statistics for 'demo' with command:
> perl awstats.pl -update -config=demo
You can also read your statistics for 'demo' with URL:
> http://localhost/awstats/awstats.pl?config=demo
# awstats의 환경설정 파일 작성
mkdir /etc/awstats 디렉토리 생성
cp /usr/local/www/awstats/cgi-bin/awstats.model.conf /etc/awstats/awstats.myvirtualserver.conf
awstats.myvirtualserver.conf 파일의 다음 부분 수정
LogFile="/var/log/http_log/access_log.%YYYY-24%MM-24%DD-24"
SiteDomain="myvirtualdomain.com"
HostAliases="localhost 127.0.0.1 REGEX[myvirtualdomain\.com$]"
Lang="ko"
DirData="/var/log/http_log"
# 통계 데이터 갱신
/usr/local/www/awstats/cgi-bin/awstats.pl -update -config=myvirtualserver
또는
/usr/local/www/awstats/tools/awstats_updateall.pl now -awstatsprog=/usr/local/www/awstats/cgi-bin/awstats.pl
# crontab에 등록
0 * * * * www /usr/local/www/awstats/tools/awstats_updateall.pl now -awstatsprog=/usr/local/www/awstats/cgi-bin/awstats.pl
'Linux,Unix,BSD > Apache, PHP' 카테고리의 다른 글
[awstats] IIS 로그 분석시 우리 나라 시간으로 분석하기 (0) | 2008.07.04 |
---|---|
경로 분석을 위한 TraceWatch (0) | 2008.07.02 |
AWstats를 통하여 과거 로그를 자동으로 분석하는 스크립트. (0) | 2008.07.02 |
웹로그 분석툴 : webalizer (2) | 2008.03.12 |
서버 접속 지연 문제 최적화. (0) | 2008.03.04 |