아파치 로그 정리(압축) logrotate
우선 아파치을 컴파일 설치하였다면
/etc/logrotate.d/ apache 파일을 만든다.
파일을 만들고 밑에 있는 파일을 적어넣는다.
------------------------------------------------------------------------
/usr/local/apache/logs/access_log {
notifempty
missingok
size 500k # 500k 킬로바이트로 짤라준다
daily # 매일 확인
rotate 1 # 1 일동안 보관한다
create 0664 root root
compress
postrotate
/bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2 > /dev/null` 2 > /dev/null || true
endscript
}
/usr/local/apache/logs/error_log {
notifempty
missingok
size 500k
daily
rotate 1
create 0664 root root
compress
postrotate
/bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2 > /dev/null` 2 > /dev/null || true
endscript
}
/usr/local/apache/logs/agent_log {
notifempty
missingok
compress
postrotate
/usr/bin/killall -HUP httpd 2> /dev/null || true
endscript
}
/usr/local/apache/logs/referer_log {
notifempty
missingok
compress
postrotate
/usr/bin/killall -HUP httpd 2> /dev/null || true
endscript
}
-----------------------------------------------------------------------------
위와 같이 다적었으면 ..
usr/sbin/logrotate -d /etc/logrotate.conf
또는
logrotate -d /etc/logrotate.conf 해준다
에러 메세지가 없으면 성공..
logrotate 는 /etc/cron.daily 에 등록 되어 있어 하루에 한번씩 새벽 4시 03분에 작동한다.
[이 게시물은 관리자님에 의해 2005-03-13 15:29:04 그누보드 팁앤테크(으)로 부터 복사됨]<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:30:25 Apache에서 이동 됨]</div>
/etc/logrotate.d/ apache 파일을 만든다.
파일을 만들고 밑에 있는 파일을 적어넣는다.
------------------------------------------------------------------------
/usr/local/apache/logs/access_log {
notifempty
missingok
size 500k # 500k 킬로바이트로 짤라준다
daily # 매일 확인
rotate 1 # 1 일동안 보관한다
create 0664 root root
compress
postrotate
/bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2 > /dev/null` 2 > /dev/null || true
endscript
}
/usr/local/apache/logs/error_log {
notifempty
missingok
size 500k
daily
rotate 1
create 0664 root root
compress
postrotate
/bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2 > /dev/null` 2 > /dev/null || true
endscript
}
/usr/local/apache/logs/agent_log {
notifempty
missingok
compress
postrotate
/usr/bin/killall -HUP httpd 2> /dev/null || true
endscript
}
/usr/local/apache/logs/referer_log {
notifempty
missingok
compress
postrotate
/usr/bin/killall -HUP httpd 2> /dev/null || true
endscript
}
-----------------------------------------------------------------------------
위와 같이 다적었으면 ..
usr/sbin/logrotate -d /etc/logrotate.conf
또는
logrotate -d /etc/logrotate.conf 해준다
에러 메세지가 없으면 성공..
logrotate 는 /etc/cron.daily 에 등록 되어 있어 하루에 한번씩 새벽 4시 03분에 작동한다.
[이 게시물은 관리자님에 의해 2005-03-13 15:29:04 그누보드 팁앤테크(으)로 부터 복사됨]<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:30:25 Apache에서 이동 됨]</div>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7830 | 10년 전 | 448 | ||
| 7829 |
|
10년 전 | 633 | |
| 7828 | 10년 전 | 558 | ||
| 7827 | 10년 전 | 457 | ||
| 7826 | 10년 전 | 468 | ||
| 7825 | 10년 전 | 509 | ||
| 7824 | 10년 전 | 469 | ||
| 7823 | 10년 전 | 412 | ||
| 7822 | 10년 전 | 388 | ||
| 7821 | 10년 전 | 331 | ||
| 7820 | 10년 전 | 361 | ||
| 7819 |
|
10년 전 | 761 | |
| 7818 | 10년 전 | 411 | ||
| 7817 | 10년 전 | 571 | ||
| 7816 | 10년 전 | 429 | ||
| 7815 | 10년 전 | 626 | ||
| 7814 | 10년 전 | 465 | ||
| 7813 | 10년 전 | 417 | ||
| 7812 | 10년 전 | 428 | ||
| 7811 | 10년 전 | 410 | ||
| 7810 | 10년 전 | 604 | ||
| 7809 | 10년 전 | 539 | ||
| 7808 | 10년 전 | 413 | ||
| 7807 | 10년 전 | 433 | ||
| 7806 |
프로그래머7
|
10년 전 | 1356 | |
| 7805 | 10년 전 | 1298 | ||
| 7804 |
zahir1312
|
10년 전 | 795 | |
| 7803 |
|
10년 전 | 1396 | |
| 7802 | 10년 전 | 490 | ||
| 7801 | 10년 전 | 880 | ||
| 7800 | 10년 전 | 1101 | ||
| 7799 | 10년 전 | 582 | ||
| 7798 | 10년 전 | 534 | ||
| 7797 | 10년 전 | 546 | ||
| 7796 | 10년 전 | 384 | ||
| 7795 | 10년 전 | 538 | ||
| 7794 | 10년 전 | 581 | ||
| 7793 | 10년 전 | 1079 | ||
| 7792 | 10년 전 | 502 | ||
| 7791 | 10년 전 | 584 | ||
| 7790 | 10년 전 | 523 | ||
| 7789 |
fbastore
|
10년 전 | 1472 | |
| 7788 | 10년 전 | 574 | ||
| 7787 | 10년 전 | 432 | ||
| 7786 | 10년 전 | 634 | ||
| 7785 | 10년 전 | 617 | ||
| 7784 | 10년 전 | 672 | ||
| 7783 | 10년 전 | 485 | ||
| 7782 | 10년 전 | 520 | ||
| 7781 | 10년 전 | 923 | ||
| 7780 | 10년 전 | 839 | ||
| 7779 | 10년 전 | 793 | ||
| 7778 | 10년 전 | 377 | ||
| 7777 | 10년 전 | 487 | ||
| 7776 | 10년 전 | 486 | ||
| 7775 | 10년 전 | 425 | ||
| 7774 | 10년 전 | 640 | ||
| 7773 | 10년 전 | 397 | ||
| 7772 | 10년 전 | 764 | ||
| 7771 | 10년 전 | 417 | ||
| 7770 | 10년 전 | 664 | ||
| 7769 | 10년 전 | 417 | ||
| 7768 | 10년 전 | 636 | ||
| 7767 | 10년 전 | 1199 | ||
| 7766 | 10년 전 | 520 | ||
| 7765 | 10년 전 | 572 | ||
| 7764 |
잘살아보자
|
10년 전 | 423 | |
| 7763 |
|
10년 전 | 1486 | |
| 7762 |
Tosea
|
10년 전 | 1081 | |
| 7761 | 10년 전 | 678 | ||
| 7760 |
잘살아보자
|
10년 전 | 723 | |
| 7759 |
잘살아보자
|
10년 전 | 564 | |
| 7758 |
잘살아보자
|
10년 전 | 624 | |
| 7757 | 10년 전 | 1265 | ||
| 7756 |
ITBANK
|
10년 전 | 1277 | |
| 7755 | 10년 전 | 1940 | ||
| 7754 | 10년 전 | 1087 | ||
| 7753 | 10년 전 | 907 | ||
| 7752 | 10년 전 | 1413 | ||
| 7751 |
잘살아보자
|
10년 전 | 562 | |
| 7750 |
잘살아보자
|
10년 전 | 495 | |
| 7749 |
잘살아보자
|
10년 전 | 515 | |
| 7748 |
잘살아보자
|
10년 전 | 538 | |
| 7747 |
잘살아보자
|
10년 전 | 615 | |
| 7746 |
잘살아보자
|
10년 전 | 694 | |
| 7745 |
잘살아보자
|
10년 전 | 936 | |
| 7744 |
잘살아보자
|
10년 전 | 433 | |
| 7743 | 10년 전 | 961 | ||
| 7742 |
starbros
|
10년 전 | 856 | |
| 7741 |
잘살아보자
|
10년 전 | 696 | |
| 7740 |
잘살아보자
|
10년 전 | 581 | |
| 7739 |
잘살아보자
|
10년 전 | 478 | |
| 7738 |
잘살아보자
|
10년 전 | 558 | |
| 7737 |
잘살아보자
|
10년 전 | 534 | |
| 7736 |
잘살아보자
|
10년 전 | 551 | |
| 7735 |
잘살아보자
|
10년 전 | 884 | |
| 7734 |
잘살아보자
|
10년 전 | 443 | |
| 7733 |
잘살아보자
|
10년 전 | 560 | |
| 7732 |
잘살아보자
|
10년 전 | 720 | |
| 7731 |
잘살아보자
|
10년 전 | 640 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기