차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
linux_logrotate_설정 [2015/12/03 06:29] – 만듦 zzunglinux_logrotate_설정 [2016/03/29 01:35] (현재) – [logrotate 사용방법] koov
줄 9: 줄 9:
 </code> </code>
   * logrotate 구성파일 위치 : /etc/logrotate.conf   * logrotate 구성파일 위치 : /etc/logrotate.conf
-  * +  * logrotate 구성 디렉토리 위치 : /etc/logrotate.d/ 
 +  * 파일 서비스 대부분의( Apache webserver, postgreSQL, MySQL, KED 데스크탑 매니저 등) 구성 파일을 만들어 사용할 수 있음 
 + 
 +<code vim> 
 +[root@localhost logrotate.d]# ls -al 
 +total 64 
 +drwxr-xr-x.   2 root root  4096 Jun 24 15:01 . 
 +drwxr-xr-x. 119 root root 12288 Dec  3 15:17 .. 
 +-rw-r--r--.   1 root root    71 Aug  7  2013 cups 
 +-rw-r--r--.   1 root root   103 Oct 15  2013 dracut 
 +-rw-r--r--.   1 root root   185 Aug 15  2014 httpd 
 +-rw-r--r--.   1 root root   871 Jun 16 21:38 mysqld 
 +-rw-r--r--.   1 root root   136 Mar  5  2010 ppp 
 +-rw-r--r--.   1 root root   329 Jul 11  2012 psacct 
 +-rw-r--r--.   1 root root   219 Oct 23  2013 sssd 
 +-rw-r--r--.   1 root root    71 Oct 17  2013 subscription-manager 
 +-rw-r--r--.   1 root root   210 Aug 15  2013 syslog 
 +-rw-r--r--.   1 root root    32 Nov  7  2012 up2date 
 +-rw-r--r--.   1 root root   100 Sep  7  2012 wpa_supplicant 
 +-rw-r--r--.   1 root root   100 Jan  9  2013 yum 
 +</code> 
 + 
 +===== logrotate.conf ===== 
 +<code vim> 
 +/var/log/linuxserver/linux.log {  
 +  rotate 7  
 +  daily  
 +  compress  
 +  delaycompress  
 +  missingok  
 +  notifempty  
 +  create 660 linuxuser linuxuser }  
 +</code> 
 + 
 +^ Option         ^ Description                                              ^ 
 +| daily          | 로그파일을 일 단위로 순환 시킨다.                                      | 
 +| weekly         | 로그파일을 주 단위로 순환 시킨다.                                      | 
 +| monthly        | 로그파일을 월 단위로 순환 시킨다.                                      | 
 +| notifempty     | 로그파일이 비어있는 경우 순환에서 제외한다.                                 | 
 +| nocompress     | 로그파일 이전 버전은 압축하지 않는다.                                    | 
 +| delaycompress  | 압축을 연기 할수 있다, 해당 옵션은 compress 명령어와 함께 사용되는 경우에만 효과가 있다. 
 +| compress       | 로그파일을 압축한다. 기본적으로 gzip 을 사용한다.                           | 
 +| mail address   | logrotate 작업 후에 이전 로그파일을 지정된 메일주소로 메일을 보낸다.              | 
 +| missingok      | 로그 파일이 누락 된 경우, 오류 메시지를 발행하지 않고 다음단계로 이동한다.              | 
 + 
 +더 자세한 옵션을 확인 하고 싶으면 logrotate(8) -man page 참고 하면된다.  
 +url : http://linux.die.net/man/8/logrotate 
  • linux_logrotate_설정.1449124176.txt.gz
  • 마지막으로 수정됨: 2015/12/03 06:29
  • 저자 zzung