아파치 로그 정리(압축) 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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 930 | 19년 전 | 3536 | ||
| 929 |
|
19년 전 | 2692 | |
| 928 |
|
19년 전 | 3443 | |
| 927 |
|
19년 전 | 3441 | |
| 926 |
|
19년 전 | 3145 | |
| 925 | 19년 전 | 5428 | ||
| 924 |
|
19년 전 | 2165 | |
| 923 |
|
19년 전 | 2212 | |
| 922 |
|
19년 전 | 2304 | |
| 921 |
|
19년 전 | 3388 | |
| 920 | 19년 전 | 3701 | ||
| 919 |
|
19년 전 | 3739 | |
| 918 |
|
19년 전 | 2342 | |
| 917 |
|
19년 전 | 2386 | |
| 916 |
|
19년 전 | 2683 | |
| 915 | 19년 전 | 3032 | ||
| 914 | 19년 전 | 2453 | ||
| 913 | 19년 전 | 2622 | ||
| 912 | 19년 전 | 2445 | ||
| 911 | 19년 전 | 2198 | ||
| 910 | 19년 전 | 3230 | ||
| 909 | 19년 전 | 3287 | ||
| 908 | 19년 전 | 3025 | ||
| 907 |
|
19년 전 | 4862 | |
| 906 |
|
19년 전 | 2692 | |
| 905 |
|
19년 전 | 3304 | |
| 904 |
|
19년 전 | 3131 | |
| 903 |
|
19년 전 | 1979 | |
| 902 |
|
19년 전 | 3118 | |
| 901 |
|
19년 전 | 1862 | |
| 900 |
|
19년 전 | 2325 | |
| 899 |
|
19년 전 | 2395 | |
| 898 |
|
19년 전 | 3976 | |
| 897 |
|
19년 전 | 3162 | |
| 896 |
|
19년 전 | 3087 | |
| 895 |
|
19년 전 | 2531 | |
| 894 |
|
19년 전 | 1998 | |
| 893 |
|
19년 전 | 1635 | |
| 892 |
|
19년 전 | 2401 | |
| 891 |
|
19년 전 | 2325 | |
| 890 |
|
19년 전 | 1811 | |
| 889 |
|
19년 전 | 1807 | |
| 888 |
|
19년 전 | 2599 | |
| 887 |
|
19년 전 | 2574 | |
| 886 |
|
19년 전 | 1871 | |
| 885 |
|
19년 전 | 2104 | |
| 884 |
|
19년 전 | 3290 | |
| 883 |
|
19년 전 | 1948 | |
| 882 |
|
19년 전 | 2488 | |
| 881 |
|
19년 전 | 2567 | |
| 880 |
|
19년 전 | 2655 | |
| 879 |
|
19년 전 | 2932 | |
| 878 |
|
19년 전 | 2556 | |
| 877 |
|
19년 전 | 2975 | |
| 876 |
|
19년 전 | 2761 | |
| 875 |
|
19년 전 | 3514 | |
| 874 | 19년 전 | 1866 | ||
| 873 | 19년 전 | 2725 | ||
| 872 |
|
19년 전 | 2363 | |
| 871 |
|
19년 전 | 2011 | |
| 870 |
|
19년 전 | 2419 | |
| 869 |
|
19년 전 | 1864 | |
| 868 |
|
19년 전 | 5436 | |
| 867 |
|
19년 전 | 2253 | |
| 866 |
|
19년 전 | 4238 | |
| 865 |
|
19년 전 | 2288 | |
| 864 | 19년 전 | 1838 | ||
| 863 | 19년 전 | 2584 | ||
| 862 | 19년 전 | 2324 | ||
| 861 | 19년 전 | 2523 | ||
| 860 | 19년 전 | 2155 | ||
| 859 | 19년 전 | 3912 | ||
| 858 | 19년 전 | 3414 | ||
| 857 | 19년 전 | 2194 | ||
| 856 |
Power
|
19년 전 | 2102 | |
| 855 | 19년 전 | 1969 | ||
| 854 | 19년 전 | 1995 | ||
| 853 |
pearly
|
19년 전 | 4373 | |
| 852 |
pearly
|
19년 전 | 3349 | |
| 851 | 19년 전 | 2770 | ||
| 850 |
pearly
|
19년 전 | 3343 | |
| 849 |
pearly
|
19년 전 | 2998 | |
| 848 |
pearly
|
19년 전 | 2838 | |
| 847 | 19년 전 | 2341 | ||
| 846 |
|
19년 전 | 2155 | |
| 845 |
pearly
|
19년 전 | 2481 | |
| 844 | 19년 전 | 3093 | ||
| 843 | 19년 전 | 2119 | ||
| 842 |
pearly
|
19년 전 | 3116 | |
| 841 |
pearly
|
19년 전 | 3240 | |
| 840 | 19년 전 | 2910 | ||
| 839 |
|
19년 전 | 1931 | |
| 838 |
|
19년 전 | 1696 | |
| 837 |
|
19년 전 | 2312 | |
| 836 |
|
19년 전 | 2248 | |
| 835 |
|
19년 전 | 1620 | |
| 834 |
|
19년 전 | 1656 | |
| 833 |
|
19년 전 | 1559 | |
| 832 |
|
19년 전 | 2063 | |
| 831 |
|
19년 전 | 1612 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기