아파치 로그 정리(압축) 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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7730 | 10년 전 | 1312 | ||
| 7729 | 10년 전 | 1156 | ||
| 7728 |
잘살아보자
|
10년 전 | 607 | |
| 7727 |
잘살아보자
|
10년 전 | 502 | |
| 7726 |
잘살아보자
|
10년 전 | 833 | |
| 7725 |
잘살아보자
|
10년 전 | 564 | |
| 7724 |
잘살아보자
|
10년 전 | 474 | |
| 7723 |
잘살아보자
|
10년 전 | 539 | |
| 7722 |
잘살아보자
|
10년 전 | 481 | |
| 7721 |
잘살아보자
|
10년 전 | 512 | |
| 7720 |
잘살아보자
|
10년 전 | 472 | |
| 7719 |
비긴어게인
|
10년 전 | 694 | |
| 7718 |
|
10년 전 | 2543 | |
| 7717 |
잘살아보자
|
10년 전 | 657 | |
| 7716 |
잘살아보자
|
10년 전 | 407 | |
| 7715 |
잘살아보자
|
10년 전 | 435 | |
| 7714 |
잘살아보자
|
10년 전 | 503 | |
| 7713 | 10년 전 | 1789 | ||
| 7712 | 10년 전 | 1719 | ||
| 7711 | 10년 전 | 1107 | ||
| 7710 | 10년 전 | 1406 | ||
| 7709 | 10년 전 | 1525 | ||
| 7708 | 10년 전 | 1463 | ||
| 7707 | 10년 전 | 860 | ||
| 7706 |
별지기천사
|
10년 전 | 573 | |
| 7705 | 10년 전 | 1083 | ||
| 7704 |
ICONdesignstudio
|
10년 전 | 628 | |
| 7703 | 10년 전 | 597 | ||
| 7702 |
|
10년 전 | 734 | |
| 7701 | 10년 전 | 1423 | ||
| 7700 | 10년 전 | 1113 | ||
| 7699 | 10년 전 | 584 | ||
| 7698 | 10년 전 | 1149 | ||
| 7697 | 10년 전 | 5171 | ||
| 7696 | 10년 전 | 663 | ||
| 7695 | 10년 전 | 1690 | ||
| 7694 | 10년 전 | 1066 | ||
| 7693 | 10년 전 | 1561 | ||
| 7692 | 10년 전 | 1303 | ||
| 7691 | 10년 전 | 829 | ||
| 7690 | 10년 전 | 1394 | ||
| 7689 | 10년 전 | 1022 | ||
| 7688 | 10년 전 | 623 | ||
| 7687 |
파랑새1597
|
10년 전 | 602 | |
| 7686 | 10년 전 | 861 | ||
| 7685 | 10년 전 | 1346 | ||
| 7684 | 10년 전 | 804 | ||
| 7683 | 10년 전 | 1106 | ||
| 7682 | 10년 전 | 1033 | ||
| 7681 | 10년 전 | 673 | ||
| 7680 | 10년 전 | 992 | ||
| 7679 | 10년 전 | 512 | ||
| 7678 | 10년 전 | 746 | ||
| 7677 | 10년 전 | 645 | ||
| 7676 |
|
10년 전 | 951 | |
| 7675 |
|
10년 전 | 1182 | |
| 7674 | 10년 전 | 1056 | ||
| 7673 | 10년 전 | 756 | ||
| 7672 | 10년 전 | 1095 | ||
| 7671 | 10년 전 | 895 | ||
| 7670 | 10년 전 | 666 | ||
| 7669 |
mashmellow
|
10년 전 | 1236 | |
| 7668 | 10년 전 | 724 | ||
| 7667 | 10년 전 | 1019 | ||
| 7666 |
senseme
|
10년 전 | 661 | |
| 7665 | 10년 전 | 517 | ||
| 7664 | 10년 전 | 1900 | ||
| 7663 |
mixx애교
|
10년 전 | 985 | |
| 7662 | 10년 전 | 1047 | ||
| 7661 |
hkhkah
|
10년 전 | 798 | |
| 7660 | 10년 전 | 1075 | ||
| 7659 |
커네드커네드
|
10년 전 | 939 | |
| 7658 |
바람돌이팡
|
10년 전 | 680 | |
| 7657 | 10년 전 | 1170 | ||
| 7656 | 10년 전 | 1582 | ||
| 7655 | 10년 전 | 1000 | ||
| 7654 |
개발짜증나
|
10년 전 | 863 | |
| 7653 |
네이비칼라
|
10년 전 | 885 | |
| 7652 |
밥먹고합시다
|
10년 전 | 815 | |
| 7651 |
플라이SINJI
|
10년 전 | 1514 | |
| 7650 |
개발짜증나
|
10년 전 | 1424 | |
| 7649 | 10년 전 | 455 | ||
| 7648 |
이미영ㅇㅇ
|
10년 전 | 872 | |
| 7647 | 10년 전 | 444 | ||
| 7646 | 10년 전 | 817 | ||
| 7645 | 10년 전 | 2327 | ||
| 7644 | 10년 전 | 825 | ||
| 7643 |
|
10년 전 | 2875 | |
| 7642 | 10년 전 | 1518 | ||
| 7641 | 10년 전 | 1144 | ||
| 7640 |
개발짜증나
|
10년 전 | 478 | |
| 7639 |
|
10년 전 | 818 | |
| 7638 |
개발짜증나
|
10년 전 | 1139 | |
| 7637 | 10년 전 | 1558 | ||
| 7636 | 10년 전 | 2917 | ||
| 7635 | 10년 전 | 1701 | ||
| 7634 | 10년 전 | 1890 | ||
| 7633 | 10년 전 | 2347 | ||
| 7632 | 10년 전 | 3956 | ||
| 7631 |
|
10년 전 | 1543 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기