아파치 로그 정리(압축) 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년 전 | 1310 | ||
| 7729 | 10년 전 | 1150 | ||
| 7728 |
잘살아보자
|
10년 전 | 603 | |
| 7727 |
잘살아보자
|
10년 전 | 497 | |
| 7726 |
잘살아보자
|
10년 전 | 828 | |
| 7725 |
잘살아보자
|
10년 전 | 557 | |
| 7724 |
잘살아보자
|
10년 전 | 471 | |
| 7723 |
잘살아보자
|
10년 전 | 533 | |
| 7722 |
잘살아보자
|
10년 전 | 480 | |
| 7721 |
잘살아보자
|
10년 전 | 511 | |
| 7720 |
잘살아보자
|
10년 전 | 469 | |
| 7719 |
비긴어게인
|
10년 전 | 692 | |
| 7718 |
|
10년 전 | 2540 | |
| 7717 |
잘살아보자
|
10년 전 | 652 | |
| 7716 |
잘살아보자
|
10년 전 | 404 | |
| 7715 |
잘살아보자
|
10년 전 | 432 | |
| 7714 |
잘살아보자
|
10년 전 | 500 | |
| 7713 | 10년 전 | 1788 | ||
| 7712 | 10년 전 | 1717 | ||
| 7711 | 10년 전 | 1103 | ||
| 7710 | 10년 전 | 1403 | ||
| 7709 | 10년 전 | 1521 | ||
| 7708 | 10년 전 | 1463 | ||
| 7707 | 10년 전 | 859 | ||
| 7706 |
별지기천사
|
10년 전 | 571 | |
| 7705 | 10년 전 | 1079 | ||
| 7704 |
ICONdesignstudio
|
10년 전 | 626 | |
| 7703 | 10년 전 | 595 | ||
| 7702 |
|
10년 전 | 729 | |
| 7701 | 10년 전 | 1417 | ||
| 7700 | 10년 전 | 1108 | ||
| 7699 | 10년 전 | 583 | ||
| 7698 | 10년 전 | 1145 | ||
| 7697 | 10년 전 | 5167 | ||
| 7696 | 10년 전 | 659 | ||
| 7695 | 10년 전 | 1689 | ||
| 7694 | 10년 전 | 1062 | ||
| 7693 | 10년 전 | 1559 | ||
| 7692 | 10년 전 | 1299 | ||
| 7691 | 10년 전 | 827 | ||
| 7690 | 10년 전 | 1393 | ||
| 7689 | 10년 전 | 1019 | ||
| 7688 | 10년 전 | 618 | ||
| 7687 |
파랑새1597
|
10년 전 | 598 | |
| 7686 | 10년 전 | 856 | ||
| 7685 | 10년 전 | 1345 | ||
| 7684 | 10년 전 | 802 | ||
| 7683 | 10년 전 | 1100 | ||
| 7682 | 10년 전 | 1025 | ||
| 7681 | 10년 전 | 666 | ||
| 7680 | 10년 전 | 992 | ||
| 7679 | 10년 전 | 507 | ||
| 7678 | 10년 전 | 742 | ||
| 7677 | 10년 전 | 638 | ||
| 7676 |
|
10년 전 | 948 | |
| 7675 |
|
10년 전 | 1177 | |
| 7674 | 10년 전 | 1053 | ||
| 7673 | 10년 전 | 755 | ||
| 7672 | 10년 전 | 1094 | ||
| 7671 | 10년 전 | 893 | ||
| 7670 | 10년 전 | 658 | ||
| 7669 |
mashmellow
|
10년 전 | 1234 | |
| 7668 | 10년 전 | 721 | ||
| 7667 | 10년 전 | 1014 | ||
| 7666 |
senseme
|
10년 전 | 657 | |
| 7665 | 10년 전 | 508 | ||
| 7664 | 10년 전 | 1899 | ||
| 7663 |
mixx애교
|
10년 전 | 985 | |
| 7662 | 10년 전 | 1045 | ||
| 7661 |
hkhkah
|
10년 전 | 792 | |
| 7660 | 10년 전 | 1068 | ||
| 7659 |
커네드커네드
|
10년 전 | 935 | |
| 7658 |
바람돌이팡
|
10년 전 | 679 | |
| 7657 | 10년 전 | 1168 | ||
| 7656 | 10년 전 | 1577 | ||
| 7655 | 10년 전 | 997 | ||
| 7654 |
개발짜증나
|
10년 전 | 859 | |
| 7653 |
네이비칼라
|
10년 전 | 881 | |
| 7652 |
밥먹고합시다
|
10년 전 | 815 | |
| 7651 |
플라이SINJI
|
10년 전 | 1514 | |
| 7650 |
개발짜증나
|
10년 전 | 1421 | |
| 7649 | 10년 전 | 454 | ||
| 7648 |
이미영ㅇㅇ
|
10년 전 | 867 | |
| 7647 | 10년 전 | 441 | ||
| 7646 | 10년 전 | 809 | ||
| 7645 | 10년 전 | 2325 | ||
| 7644 | 10년 전 | 825 | ||
| 7643 |
|
10년 전 | 2874 | |
| 7642 | 10년 전 | 1514 | ||
| 7641 | 10년 전 | 1141 | ||
| 7640 |
개발짜증나
|
10년 전 | 476 | |
| 7639 |
|
10년 전 | 817 | |
| 7638 |
개발짜증나
|
10년 전 | 1135 | |
| 7637 | 10년 전 | 1556 | ||
| 7636 | 10년 전 | 2917 | ||
| 7635 | 10년 전 | 1696 | ||
| 7634 | 10년 전 | 1888 | ||
| 7633 | 10년 전 | 2343 | ||
| 7632 | 10년 전 | 3952 | ||
| 7631 |
|
10년 전 | 1541 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기