Skip to content

2008.12.25 22:28

AWSTATS 설치

조회 수 23731 추천 수 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. No Image 23Jan
    by ADMINPLAY
    2009/01/23 by ADMINPLAY
    Views 15435 

    RedirectMatch (도메인포워딩)

  2. No Image 29Jul
    by ADMINPLAY
    2010/07/29 by ADMINPLAY
    Views 19117 

    mod_gzip, mod_deflate

  3. No Image 18Mar
    by ADMINPLAY
    2011/03/18 by ADMINPLAY
    Views 21236 

    mod_deflate 설정

  4. No Image 07Aug
    by ADMINPLAY
    2009/08/07 by ADMINPLAY
    Views 27109 

    make[2]: *** [htpasswd] 오류 1 , make[1]: *** [all-recursive] 오류 1

  5. No Image 16Jan
    by ADMINPLAY
    2012/01/16 by ADMINPLAY
    Views 19891 

    KeepAlive 설정 및 정의

  6. No Image 08Oct
    by ADMINPLAY
    2008/10/08 by ADMINPLAY
    Views 14196 

    httpd.conf 파일에 대한 설명 / 번역

  7. No Image 13Aug
    by ADMINPLAY
    2012/08/13 by ADMINPLAY
    Views 17173 

    h264 스트리밍 서버 구축(리눅스,아파치) (실시간 아님, 그냥 서버에 있는 동영상 파일을 스트리밍 방식으로 쏴줌)

  8. No Image 18Apr
    by ADMINPLAY
    2009/04/18 by ADMINPLAY
    Views 14662 

    expires설정으로 브라우저캐시

  9. No Image 12Jan
    by ADMINPLAY
    2009/01/12 by ADMINPLAY
    Views 14674 

    CGI 퍼미션 으로 웹페이지 열리지 않음

  10. CGI 오류: Premature end of script headers (Internal Server Error)

  11. No Image 06Jun
    by ADMINPLAY
    2014/06/06 by ADMINPLAY
    Views 6878 

    CentOS 5.X 에 MRTG설치 할때 한글 문제

  12. No Image 25Dec
    by ADMINPLAY
    2008/12/25 by ADMINPLAY
    Views 23731 

    AWSTATS 설치

  13. No Image 25Dec
    by ADMINPLAY
    2008/12/25 by ADMINPLAY
    Views 14463 

    AWSTATS 국가별 사용자 분석

  14. APM설치 후 80포트가 연결이 안되요....ㅜㅜ

  15. No Image 08Aug
    by ADMINPLAY
    2009/08/08 by ADMINPLAY
    Views 21875 

    APM 기본설치후 아파치 실행에러 httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

  16. No Image 29May
    by l2zeo
    2010/05/29 by l2zeo
    Views 20816 

    APM + Snort + ADODB + BASE + oinkmaster 설치

  17. Apache의 Indexes된 페이지에서 한글표시

  18. apache가 worker 모드인지 prefork 모드로 동작하는지 확인

  19. No Image 25Oct
    by ADMINPLAY
    2010/10/25 by ADMINPLAY
    Views 21665 

    Apache: client denied by server configuration

  20. No Image 26Nov
    by ADMINPLAY
    2009/11/26 by ADMINPLAY
    Views 16069 

    apache2 worker 방식 client 수치 설정법

Board Pagination Prev 1 2 3 4 5 Next
/ 5

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234