아파치 로그 정리(압축) 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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8230 | 9년 전 | 146 | ||
| 8229 | 9년 전 | 126 | ||
| 8228 |
커네드커네드
|
9년 전 | 171 | |
| 8227 | 9년 전 | 214 | ||
| 8226 | 9년 전 | 229 | ||
| 8225 | 9년 전 | 207 | ||
| 8224 | 9년 전 | 213 | ||
| 8223 | 9년 전 | 183 | ||
| 8222 |
|
9년 전 | 254 | |
| 8221 | 9년 전 | 163 | ||
| 8220 | 9년 전 | 194 | ||
| 8219 | 9년 전 | 163 | ||
| 8218 | 9년 전 | 201 | ||
| 8217 |
star3840
|
9년 전 | 176 | |
| 8216 | 9년 전 | 246 | ||
| 8215 | 9년 전 | 189 | ||
| 8214 | 9년 전 | 297 | ||
| 8213 | 9년 전 | 255 | ||
| 8212 | 9년 전 | 166 | ||
| 8211 | 9년 전 | 339 | ||
| 8210 | 9년 전 | 339 | ||
| 8209 | 9년 전 | 417 | ||
| 8208 | 9년 전 | 303 | ||
| 8207 | 9년 전 | 309 | ||
| 8206 |
|
9년 전 | 259 | |
| 8205 | 9년 전 | 240 | ||
| 8204 | 9년 전 | 223 | ||
| 8203 | 9년 전 | 291 | ||
| 8202 | 9년 전 | 208 | ||
| 8201 | 9년 전 | 252 | ||
| 8200 | 9년 전 | 262 | ||
| 8199 | 9년 전 | 276 | ||
| 8198 | 9년 전 | 237 | ||
| 8197 | 9년 전 | 228 | ||
| 8196 | 9년 전 | 641 | ||
| 8195 | 9년 전 | 240 | ||
| 8194 | 9년 전 | 352 | ||
| 8193 | 9년 전 | 257 | ||
| 8192 | 9년 전 | 271 | ||
| 8191 | 9년 전 | 222 | ||
| 8190 | 9년 전 | 216 | ||
| 8189 | 9년 전 | 276 | ||
| 8188 | 9년 전 | 209 | ||
| 8187 | 9년 전 | 212 | ||
| 8186 | 9년 전 | 216 | ||
| 8185 | 9년 전 | 379 | ||
| 8184 | 9년 전 | 168 | ||
| 8183 | 9년 전 | 390 | ||
| 8182 | 9년 전 | 251 | ||
| 8181 | 9년 전 | 202 | ||
| 8180 | 9년 전 | 780 | ||
| 8179 | 9년 전 | 549 | ||
| 8178 | 9년 전 | 409 | ||
| 8177 |
kiplayer
|
9년 전 | 407 | |
| 8176 | 9년 전 | 441 | ||
| 8175 | 9년 전 | 330 | ||
| 8174 | 9년 전 | 322 | ||
| 8173 | 9년 전 | 413 | ||
| 8172 | 9년 전 | 290 | ||
| 8171 | 9년 전 | 254 | ||
| 8170 | 9년 전 | 373 | ||
| 8169 |
커네드커네드
|
9년 전 | 325 | |
| 8168 | 9년 전 | 406 | ||
| 8167 | 9년 전 | 398 | ||
| 8166 | 9년 전 | 300 | ||
| 8165 | 9년 전 | 244 | ||
| 8164 | 9년 전 | 374 | ||
| 8163 | 9년 전 | 369 | ||
| 8162 | 9년 전 | 369 | ||
| 8161 | 9년 전 | 387 | ||
| 8160 |
|
9년 전 | 590 | |
| 8159 | 9년 전 | 531 | ||
| 8158 | 9년 전 | 332 | ||
| 8157 | 9년 전 | 443 | ||
| 8156 | 9년 전 | 332 | ||
| 8155 | 9년 전 | 328 | ||
| 8154 |
00년생용띠
|
9년 전 | 660 | |
| 8153 | 9년 전 | 305 | ||
| 8152 |
|
9년 전 | 484 | |
| 8151 | 9년 전 | 484 | ||
| 8150 | 9년 전 | 587 | ||
| 8149 |
Jangfolk
|
9년 전 | 444 | |
| 8148 | 9년 전 | 261 | ||
| 8147 | 9년 전 | 447 | ||
| 8146 | 9년 전 | 532 | ||
| 8145 | 9년 전 | 486 | ||
| 8144 | 9년 전 | 451 | ||
| 8143 | 9년 전 | 284 | ||
| 8142 | 9년 전 | 495 | ||
| 8141 | 9년 전 | 447 | ||
| 8140 | 9년 전 | 1006 | ||
| 8139 | 9년 전 | 355 | ||
| 8138 |
전갈자리남자
|
9년 전 | 459 | |
| 8137 | 9년 전 | 499 | ||
| 8136 | 9년 전 | 823 | ||
| 8135 |
|
9년 전 | 864 | |
| 8134 |
PlayPixel
|
9년 전 | 603 | |
| 8133 |
|
9년 전 | 510 | |
| 8132 | 9년 전 | 549 | ||
| 8131 | 9년 전 | 905 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기