Skip to content

2008.12.25 22:28

AWSTATS 설치

조회 수 23669 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

1. 설치방법
OS : LINUX
WebServer : Apache
현재 버전은 6.8까지 나온상태..http://awstats.sourceforge.net/?seenIEPage=1 에서 다운받으면 됩니다.

 

다운받은 파일은 서버에다가 옮겨놓고 다음과 같이 실행합니다.
tar xvfz awstats-6.8.tar.gz
mv awstats-6.8/ /usr/local/awstats
chmod 755 /usr/local/awstats
mkdir /etc/awstats
mkdir /var/lib/awstats <- 기본적으로 분석된 로그가 쌓이는 위치입니다.

cd /usr/local/awstats/tools
./awstats_configure.pl

 

실행할경우 아래와 같이 물어봅니다.(awstat 버전따라 조금 다르게 나올수 있음)


----- AWStats awstats_configure 1.0 (build 1.8) (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
  Found Web server Apache config file '/usr/local/apache/conf/httpd.conf'

-----> Check and complete web server config file '/usr/local/apache/conf/httpd.conf'
  All AWStats directives are already present.

-----> Update model config file '/usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf'
  File awstats.model.conf updated.

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


-----> 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.xxxx.com (웹로그분석을 하고자 하는 사이트명을 적어주시면 됩니다.)

 

-----> 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):
> (그냥 엔터칩니다)

 

-----> Create config file '/etc/awstats/awstats.www.xxx.com.conf'
 Config file /etc/awstats/awstats.www.xxx.com.conf created.

 

-----> 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/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.xxx.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.xxx.com.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for 'www.xxx.com' with command:
> perl awstats.pl -update -config=www.xxx.com

You can also read your statistics for 'www.xxx.com' with URL:
> http://localhost/awstats/awstats.pl?config=www.xxx.com

Press ENTER to finish...

 

이렇게 되면서 1차적으로 설치는 완성됩니다.

 

2.

 1) conf 파일 수정
   위에서 Define config file path 부분에 넣었던 (전 그냥 디폴트로 엔터를 쳤지요)
   /etc/awstats 로 가시면 awstats.www.xxx.com.conf 파일이 있습니다.
   이제 이걸 수정해야겠지요
   vi awstats.www.xxx.com.conf 의 51번째 라인을 보시면

   LogFile="/var/log/httpd/mylog.log" 라고 있습니다.

 

   이것을 LogFile="[자신이 사용하는 웹서버의 access 로그]" 를 지정하시면 됩니다.
   저는 apache 의 로그를 /var/log/httpd/access_log 로 사용하고 있으므로

   LogFile="/var/log/httpd/access_log" 로 변경했습니다.

 

    로그파일 위치변경 : DirData 부분을 보시면 DirData="/var/lib/awstats" 로 되어있는데 보기가 좀 불편할 수 있으니
    저는 /usr/local/awstats/ 디렉토리밑에 logs 라고 디렉토리를 만들었습니다.

    그리고 DirData="/usr/local/awstats/logs" 로 변경했습니다.

 

    한글설정하기

    Lang="auto" 를 Lang="ko" 로 수정합니다.

 

 2) httpd.conf 파일 수정

    apache 의 httpd.conf 파일을 수정을 좀 해야합니다.
    /usr/local/atstats/tools/ 의 httpd_conf 파일을 열어보시면 내용이 나오는데 이 내용전체를
    apache 의 httpd.conf 파일 맨 하단에 붙여넣으세요
    저는 httpd.conf 파일이 /etc/httpd/conf/httpd.conf 에 있군요

 

 3) cron 에 등록하기
    vi /etc/crontab 파일에 다음과 같이 추가를 합니다. 업데이트 주기는 사용자가 많으면 좀 짧게해주면 되겠죠..
    0 0 * * * root /usr/local/awstats/wwwroot/cgi-bin/awstats -update -config=www.pcbang.net

 

3. 마무리 작업

   apachectl restart 로 아파치를 재구동 시켜줍니다.
   웹페이지에서 확인하기 : http://도메인주소/awstats/awstats.pl?config=www.xxx.com
   그런데 별로 보이는것이 없다고요??
   왜냐면 크론이 돌지 않았기 때문이죠..지금 당장 보고 싶다면
   /usr/local/awstats/wwwroot/cgi-bin/awstats -update -config=www.xxx.com 를 실행하신 후 웹에서 보시면 됩니다.


  1. expires설정으로 브라우저캐시

    Date2009.04.18 ByADMINPLAY Views14662
    Read More
  2. 아파치 웹서버 사용 시 무단 링크 방지법

    Date2009.04.03 ByADMINPLAY Views15592
    Read More
  3. xcache 설치 (xcache-1.2.2.tar.gz)

    Date2009.03.17 ByADMINPLAY Views18362
    Read More
  4. 아파치웹서버 모니터링하기

    Date2009.03.17 ByADMINPLAY Views16476
    Read More
  5. 초간단 웹 페이지 로딩시간 체크법

    Date2009.03.17 ByADMINPLAY Views15350
    Read More
  6. 아파치에서 한글 파일 읽기 [mod_url 설치]

    Date2009.03.17 ByADMINPLAY Views17297
    Read More
  7. 웹 사이트 속도측정

    Date2009.03.04 ByADMINPLAY Views16462
    Read More
  8. Apache 1.3.12 httpd.conf 파일 한글설명

    Date2009.03.04 ByADMINPLAY Views13361
    Read More
  9. 리눅스 APM 소스설치시 에러에 대한 대처

    Date2009.01.30 ByADMINPLAY Views15132
    Read More
  10. RedirectMatch (도메인포워딩)

    Date2009.01.23 ByADMINPLAY Views15435
    Read More
  11. 아파치 2.X 버전에서 mod_cband를 이용한 트래픽관리

    Date2009.01.17 ByADMINPLAY Views19019
    Read More
  12. CGI 퍼미션 으로 웹페이지 열리지 않음

    Date2009.01.12 ByADMINPLAY Views14674
    Read More
  13. Address already in use: make_sock:could not bind to ad...

    Date2009.01.10 ByADMINPLAY Views23798
    Read More
  14. Apache 웹페이지 한글깨짐, AddDefaultsCharset 설정

    Date2009.01.03 ByADMINPLAY Views30520
    Read More
  15. 웹페이지에서 한글이 깨지는 현상 막기

    Date2009.01.03 ByADMINPLAY Views16528
    Read More
  16. AWSTATS 국가별 사용자 분석

    Date2008.12.25 ByADMINPLAY Views14463
    Read More
  17. AWSTATS 설치

    Date2008.12.25 ByADMINPLAY Views23669
    Read More
  18. Apache 버전확인

    Date2008.12.23 ByADMINPLAY Views15428
    Read More
  19. CGI 오류: Premature end of script headers (Internal Se...

    Date2008.12.14 ByADMINPLAY Views14127
    Read More
  20. apache log 정리

    Date2008.12.14 ByADMINPLAY Views13527
    Read More
Board Pagination Prev 1 2 3 4 5 Next
/ 5

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234