'cronolog'에 해당되는 글 1건

  1. 2008.09.26 아파치 로그 날짜 별로 남기기


위 파일을 다운받아 리눅스 서버에 갖다 놓는다.

tar xvzf cronolog-1.6.2.tar.gz 로 압축을 푼다

명령어는 다음과 같다

./configure
make && make install

설치 완료!
/usr/local/sbin/ 에 설치되어 있음을 확인.

httpd.conf 를 수정

vi /usr/local/apache/conf/httpd.conf

기존

CustomLog logs/access_log combined

이걸 이렇게 변경

CustomLog "|/usr/local/sbin/cronolog /data2/server/apache/logs/info.daum.net.access_log.%Y.%m.%d" common

이 설정은 info.daum.net.access_log 파일을

info.daum.net.access_log.20060322
info.daum.net.access_log.20060323

이런 식으로 일자별로 분할해 주는 옵션이다.

그리고 마지막으로 /bin/apachectl restart

끝~!
Posted by 서오석
,