웹 분석 툴 Webalizer 설치

웹 분석 툴 Webalizer 설치
 

Webalizer 설치 > 업로드
설치할 소스를 http://webalizer.org에서 webalizer-2.01-10-src.tgz 파일을 다운 받은 후 서버로 업로드 한다.

Webalizer 설치 > 압축 해제 후 /usr/local/webalizer 폴더로 이동
#tar xvzf webalizer-2.01-10-src.tgz -C /tmp/src
#mv webalizer-2.01-10 /usr/local/webalizer

Webalizer 설치 > Configure
[root@smit21 webalizer]# pwd
/usr/local/webalizer

[root@smit21 webalizer]# ./configure --with-language=korean
loading cache ./config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking whether ln -s works... (cached) yes
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking how to run the C preprocessor... (cached) gcc -E
checking whether char is unsigned... (cached) no
checking for main in -l44bsd... (cached) no
checking for main in -lm... (cached) yes
checking for main in -lz... (cached) yes
checking for gzrewind in -lz... (cached) yes
checking for main in -lpng... (cached) yes
checking for gdImagePng in -lgd... (cached) yes
checking for gd.h... (cached) /usr/include
checking for getopt.h... (cached) yes
checking for math.h... (cached) yes
checking default config dir... (cached) /etc
checking for language file... yes - korean
updating cache ./config.cache
creating ./config.status
creating Makefile
linking ./lang/webalizer_lang.korean to webalizer_lang.h

Webalizer 설치 > make & make install
[root@smit21 webalizer]# make
[root@smit21 webalizer]# make install

Webalizer 설치 > 환경 설정
도메인에 대한 Conf 파일을 만들기 위해 /etc/webalizer.conf.sample 파일을 /usr/local/webalizer 로 복사 한다 (여기서는 smit21.co.kr를 기준으로 한다)
[root@smit21 webalizer]# cp /etc/webalizer.conf.sample ./smit21.conf

smit21.conf 파일을 vi로 연 후 다음 항목을 수정한다.
[root@smit21 webalizer]# vi smit21.conf
[root@smit21 webalizer]# vi smit21.conf
#LogFile        /var/lib/httpd/logs/access_log
LogFile         /usr/local/apache/logs/access_log  //아파치 액세스 로그 파일
...
#OutputDir      /var/lib/httpd/htdocs/usage
OutputDir       /usr/local/www/smit/html/webalizer  //분석결과를 저장할 웹 디렉토리
...
#Incremental    no
Incremental     yes     //분석안된 최근 로그만 분석
...
#IncrementalName        webalizer.current
IncrementalName        webalizer.current   //이미 분석한 로그정보 저장
...
#ReportTitle    Usage Statistics for
ReportTitle    smit21 hommpage access   //리포트 타이틀
...
#HostName       localhost
HostName        smit21.co.kr    //호스트 이름

참조로 OutputDir은 아파치의 Document Root로 설정된 하위에 위 패스와 동일하게 만들어줘야 한다

Webalizer 설치 > 아파치 Conf 파일의 수정
아파치 Conf 파일은 수정하지 않아도 되나 Referer 정보(예, 현재 페이지를 접속하기 전 있었던 페이지)를 기록하기 위해 다음과 같은 내용을 수정한다.
CustomLog /var/log/httpd/access_log common
CustomLog /var/log/httpd/access_log combined

Webalizer 설치 > 실행
[root@smit21 webalizer]# ./webalizer -c smit21.conf 
Webalizer V2.01-10 (Linux 2.4.2-3) English
Using logfile /usr/local/apache/logs/access_log (clf)
Creating output in /usr/local/www/smit/html/webalizer
Hostname for reports is 'smit21.co.kr'
History file not found...
Previous run data not found...
Saving current run data... [11/24/2005 16:42:20]
Generating report for November 2005
Generating summary report
Saving history information...
5710 records in 0.23 seconds




이 글은 2008-04-30 에 작성된 글 입니다.

댓글 없음: