아파치 로그 정리(압축) 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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 230 | 20년 전 | 2064 | ||
| 229 | 20년 전 | 3136 | ||
| 228 | 20년 전 | 3324 | ||
| 227 | 20년 전 | 2394 | ||
| 226 | 20년 전 | 5478 | ||
| 225 | 20년 전 | 2523 | ||
| 224 | 20년 전 | 2970 | ||
| 223 | 20년 전 | 4206 | ||
| 222 | 20년 전 | 2605 | ||
| 221 | 20년 전 | 2290 | ||
| 220 | 20년 전 | 3678 | ||
| 219 | 20년 전 | 2073 | ||
| 218 | 20년 전 | 3565 | ||
| 217 | 20년 전 | 2481 | ||
| 216 | 20년 전 | 2910 | ||
| 215 | 20년 전 | 2227 | ||
| 214 | 20년 전 | 3338 | ||
| 213 | 20년 전 | 2918 | ||
| 212 | 20년 전 | 3050 | ||
| 211 | 20년 전 | 2147 | ||
| 210 | 20년 전 | 1894 | ||
| 209 | 20년 전 | 2356 | ||
| 208 | 20년 전 | 1976 | ||
| 207 | 20년 전 | 1677 | ||
| 206 | 20년 전 | 1855 | ||
| 205 | 20년 전 | 3952 | ||
| 204 | 20년 전 | 1673 | ||
| 203 | 20년 전 | 2010 | ||
| 202 | 20년 전 | 2359 | ||
| 201 | 20년 전 | 1827 | ||
| 200 | 20년 전 | 2957 | ||
| 199 | 20년 전 | 2005 | ||
| 198 | 20년 전 | 2087 | ||
| 197 | 20년 전 | 3652 | ||
| 196 | 20년 전 | 2982 | ||
| 195 | 20년 전 | 2094 | ||
| 194 | 20년 전 | 10246 | ||
| 193 | 20년 전 | 2244 | ||
| 192 | 20년 전 | 1600 | ||
| 191 | 20년 전 | 2665 | ||
| 190 | 20년 전 | 2293 | ||
| 189 | 20년 전 | 1683 | ||
| 188 | 20년 전 | 1478 | ||
| 187 | 20년 전 | 1905 | ||
| 186 | 20년 전 | 1718 | ||
| 185 | 20년 전 | 1767 | ||
| 184 | 20년 전 | 2350 | ||
| 183 | 20년 전 | 1561 | ||
| 182 | 20년 전 | 1485 | ||
| 181 | 20년 전 | 1624 | ||
| 180 | 20년 전 | 2720 | ||
| 179 | 20년 전 | 1803 | ||
| 178 | 20년 전 | 1860 | ||
| 177 | 20년 전 | 1985 | ||
| 176 | 20년 전 | 1804 | ||
| 175 | 20년 전 | 1872 | ||
| 174 | 20년 전 | 1694 | ||
| 173 | 20년 전 | 2060 | ||
| 172 | 20년 전 | 1786 | ||
| 171 | 20년 전 | 2561 | ||
| 170 | 20년 전 | 2272 | ||
| 169 | 20년 전 | 2552 | ||
| 168 | 20년 전 | 1483 | ||
| 167 | 20년 전 | 1578 | ||
| 166 | 20년 전 | 2157 | ||
| 165 | 20년 전 | 1629 | ||
| 164 | 20년 전 | 3771 | ||
| 163 | 20년 전 | 2664 | ||
| 162 | 20년 전 | 2085 | ||
| 161 | 20년 전 | 2792 | ||
| 160 | 20년 전 | 1734 | ||
| 159 | 20년 전 | 1612 | ||
| 158 | 20년 전 | 2563 | ||
| 157 | 20년 전 | 1488 | ||
| 156 | 20년 전 | 1741 | ||
| 155 | 20년 전 | 3230 | ||
| 154 | 20년 전 | 1899 | ||
| 153 | 20년 전 | 1624 | ||
| 152 | 20년 전 | 4951 | ||
| 151 | 20년 전 | 4578 | ||
| 150 | 20년 전 | 3516 | ||
| 149 | 20년 전 | 3797 | ||
| 148 | 20년 전 | 7073 | ||
| 147 | 20년 전 | 3550 | ||
| 146 | 20년 전 | 2620 | ||
| 145 | 20년 전 | 2618 | ||
| 144 | 20년 전 | 7166 | ||
| 143 | 20년 전 | 4599 | ||
| 142 | 20년 전 | 1900 | ||
| 141 | 20년 전 | 3252 | ||
| 140 | 20년 전 | 1960 | ||
| 139 | 20년 전 | 1581 | ||
| 138 | 20년 전 | 2307 | ||
| 137 | 20년 전 | 1779 | ||
| 136 | 20년 전 | 1455 | ||
| 135 | 20년 전 | 1785 | ||
| 134 | 20년 전 | 2966 | ||
| 133 | 20년 전 | 2450 | ||
| 132 | 20년 전 | 1706 | ||
| 131 | 20년 전 | 1638 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기