아파치 로그 정리(압축) 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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 430 | 19년 전 | 4099 | ||
| 429 | 19년 전 | 3301 | ||
| 428 | 19년 전 | 4132 | ||
| 427 | 19년 전 | 3472 | ||
| 426 | 19년 전 | 3104 | ||
| 425 | 19년 전 | 3407 | ||
| 424 | 19년 전 | 2438 | ||
| 423 | 19년 전 | 2862 | ||
| 422 | 19년 전 | 2351 | ||
| 421 | 19년 전 | 3708 | ||
| 420 | 19년 전 | 4740 | ||
| 419 | 19년 전 | 3801 | ||
| 418 |
|
19년 전 | 1748 | |
| 417 | 19년 전 | 2747 | ||
| 416 | 19년 전 | 2390 | ||
| 415 | 19년 전 | 2606 | ||
| 414 | 19년 전 | 4410 | ||
| 413 |
|
19년 전 | 2599 | |
| 412 | 19년 전 | 3047 | ||
| 411 |
|
19년 전 | 2996 | |
| 410 |
|
19년 전 | 3685 | |
| 409 |
|
19년 전 | 3634 | |
| 408 |
|
19년 전 | 1857 | |
| 407 | 19년 전 | 2230 | ||
| 406 | 19년 전 | 2782 | ||
| 405 | 19년 전 | 2448 | ||
| 404 | 19년 전 | 4303 | ||
| 403 | 19년 전 | 3304 | ||
| 402 |
NeoGenesis
|
19년 전 | 4089 | |
| 401 | 19년 전 | 2606 | ||
| 400 |
|
19년 전 | 2494 | |
| 399 | 19년 전 | 2957 | ||
| 398 | 19년 전 | 2485 | ||
| 397 | 19년 전 | 2779 | ||
| 396 | 19년 전 | 2476 | ||
| 395 | 19년 전 | 3179 | ||
| 394 | 19년 전 | 1720 | ||
| 393 | 19년 전 | 2994 | ||
| 392 | 19년 전 | 2252 | ||
| 391 | 19년 전 | 2176 | ||
| 390 | 19년 전 | 2286 | ||
| 389 | 19년 전 | 2645 | ||
| 388 | 19년 전 | 2180 | ||
| 387 | 19년 전 | 4484 | ||
| 386 |
|
19년 전 | 2692 | |
| 385 |
|
19년 전 | 2481 | |
| 384 | 19년 전 | 3015 | ||
| 383 | 19년 전 | 3054 | ||
| 382 | 19년 전 | 3107 | ||
| 381 |
|
19년 전 | 2631 | |
| 380 |
|
19년 전 | 3019 | |
| 379 | 19년 전 | 2549 | ||
| 378 | 19년 전 | 2206 | ||
| 377 | 19년 전 | 2778 | ||
| 376 | 19년 전 | 2469 | ||
| 375 |
|
19년 전 | 2562 | |
| 374 | 19년 전 | 3819 | ||
| 373 | 19년 전 | 3268 | ||
| 372 | 19년 전 | 4986 | ||
| 371 |
세은아빠2
|
19년 전 | 2415 | |
| 370 | 19년 전 | 4500 | ||
| 369 | 19년 전 | 3109 | ||
| 368 | 19년 전 | 2907 | ||
| 367 | 19년 전 | 3725 | ||
| 366 | 19년 전 | 2655 | ||
| 365 | 19년 전 | 3736 | ||
| 364 | 19년 전 | 4010 | ||
| 363 | 19년 전 | 3439 | ||
| 362 | 19년 전 | 3480 | ||
| 361 | 19년 전 | 4107 | ||
| 360 |
hwatta
|
19년 전 | 2362 | |
| 359 | 19년 전 | 5101 | ||
| 358 | 19년 전 | 3656 | ||
| 357 | 19년 전 | 2598 | ||
| 356 |
sdesign1s
|
19년 전 | 2276 | |
| 355 | 20년 전 | 2756 | ||
| 354 | 20년 전 | 3029 | ||
| 353 | 20년 전 | 2790 | ||
| 352 |
|
20년 전 | 5773 | |
| 351 |
|
20년 전 | 2702 | |
| 350 |
|
20년 전 | 4293 | |
| 349 |
hwatta
|
20년 전 | 2182 | |
| 348 | 20년 전 | 7307 | ||
| 347 | 20년 전 | 2413 | ||
| 346 | 20년 전 | 3505 | ||
| 345 | 20년 전 | 4307 | ||
| 344 | 20년 전 | 2648 | ||
| 343 | 20년 전 | 3920 | ||
| 342 | 20년 전 | 3067 | ||
| 341 | 20년 전 | 4090 | ||
| 340 |
|
20년 전 | 5141 | |
| 339 |
|
20년 전 | 4234 | |
| 338 | 20년 전 | 5869 | ||
| 337 | 20년 전 | 2045 | ||
| 336 |
|
20년 전 | 3321 | |
| 335 |
|
20년 전 | 3538 | |
| 334 |
|
20년 전 | 2927 | |
| 333 |
hwatta
|
20년 전 | 2435 | |
| 332 | 20년 전 | 4655 | ||
| 331 | 20년 전 | 2272 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기