Linux/RedHat, CentOS, ubuntu

[ CentOS 7 ] cronolog 유틸을 이용한 Access Log 날짜별 적재

Pydole 2019. 4. 22. 13:11

 

Homepage : https://github.com/fordmason/cronolog

 

아파치 로그(httpd)를 cronolog를 이용하여 날짜별로 관리해주는 유틸이다.

 

웹 서비스를 체계적으로 분석하기 위해서는 우선 로그를 잘 적재할 필요가 있다.

 


 

 

 

# yum install cronolog

 

설치가 않된다면 " yum install epel-release "  # Extra Packages for Enterprise Linux 저장소 설치

 

 

 

 

# find / -name cronolog                   [ 프로그램 설치 확인 ]
/usr/sbin/cronolog

 

 

 

 

# vi /etc/httpd/conf/httpd.conf

 

CustomLog "|/usr/sbin/cronolog /var/log/httpd/%Y/%m/%Y-%m-%d-access.log" combined

 

 

# systemctl resrtart httpd

 

 

 

# ls -l /var/log/httpd/2019/04/*-access*
-rw-r--r--. 1 root root 89774  4월 22 13:08 /var/log/httpd/2019/04/2019-04-22-access.log