아파치 로그 정리(압축) 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년 전 | 4115 | ||
| 429 | 19년 전 | 3310 | ||
| 428 | 19년 전 | 4135 | ||
| 427 | 19년 전 | 3481 | ||
| 426 | 19년 전 | 3108 | ||
| 425 | 19년 전 | 3412 | ||
| 424 | 19년 전 | 2441 | ||
| 423 | 19년 전 | 2869 | ||
| 422 | 19년 전 | 2356 | ||
| 421 | 19년 전 | 3710 | ||
| 420 | 19년 전 | 4744 | ||
| 419 | 19년 전 | 3808 | ||
| 418 |
|
19년 전 | 1753 | |
| 417 | 19년 전 | 2754 | ||
| 416 | 19년 전 | 2395 | ||
| 415 | 19년 전 | 2610 | ||
| 414 | 19년 전 | 4417 | ||
| 413 |
|
19년 전 | 2608 | |
| 412 | 19년 전 | 3053 | ||
| 411 |
|
19년 전 | 2997 | |
| 410 |
|
19년 전 | 3693 | |
| 409 |
|
19년 전 | 3643 | |
| 408 |
|
19년 전 | 1861 | |
| 407 | 19년 전 | 2237 | ||
| 406 | 19년 전 | 2790 | ||
| 405 | 19년 전 | 2458 | ||
| 404 | 19년 전 | 4313 | ||
| 403 | 19년 전 | 3306 | ||
| 402 |
NeoGenesis
|
19년 전 | 4097 | |
| 401 | 19년 전 | 2611 | ||
| 400 |
|
19년 전 | 2504 | |
| 399 | 19년 전 | 2962 | ||
| 398 | 19년 전 | 2490 | ||
| 397 | 19년 전 | 2788 | ||
| 396 | 19년 전 | 2490 | ||
| 395 | 19년 전 | 3193 | ||
| 394 | 19년 전 | 1733 | ||
| 393 | 19년 전 | 2997 | ||
| 392 | 19년 전 | 2270 | ||
| 391 | 19년 전 | 2182 | ||
| 390 | 19년 전 | 2291 | ||
| 389 | 19년 전 | 2648 | ||
| 388 | 19년 전 | 2190 | ||
| 387 | 19년 전 | 4488 | ||
| 386 |
|
19년 전 | 2695 | |
| 385 |
|
19년 전 | 2494 | |
| 384 | 19년 전 | 3031 | ||
| 383 | 19년 전 | 3062 | ||
| 382 | 19년 전 | 3114 | ||
| 381 |
|
19년 전 | 2639 | |
| 380 |
|
19년 전 | 3027 | |
| 379 | 19년 전 | 2551 | ||
| 378 | 19년 전 | 2216 | ||
| 377 | 19년 전 | 2784 | ||
| 376 | 19년 전 | 2473 | ||
| 375 |
|
19년 전 | 2567 | |
| 374 | 19년 전 | 3823 | ||
| 373 | 19년 전 | 3277 | ||
| 372 | 19년 전 | 4997 | ||
| 371 |
세은아빠2
|
19년 전 | 2420 | |
| 370 | 19년 전 | 4504 | ||
| 369 | 19년 전 | 3109 | ||
| 368 | 19년 전 | 2910 | ||
| 367 | 19년 전 | 3734 | ||
| 366 | 19년 전 | 2661 | ||
| 365 | 19년 전 | 3750 | ||
| 364 | 19년 전 | 4023 | ||
| 363 | 19년 전 | 3451 | ||
| 362 | 19년 전 | 3489 | ||
| 361 | 19년 전 | 4111 | ||
| 360 |
hwatta
|
19년 전 | 2369 | |
| 359 | 19년 전 | 5112 | ||
| 358 | 19년 전 | 3660 | ||
| 357 | 19년 전 | 2608 | ||
| 356 |
sdesign1s
|
20년 전 | 2285 | |
| 355 | 20년 전 | 2761 | ||
| 354 | 20년 전 | 3031 | ||
| 353 | 20년 전 | 2800 | ||
| 352 |
|
20년 전 | 5778 | |
| 351 |
|
20년 전 | 2710 | |
| 350 |
|
20년 전 | 4302 | |
| 349 |
hwatta
|
20년 전 | 2187 | |
| 348 | 20년 전 | 7312 | ||
| 347 | 20년 전 | 2418 | ||
| 346 | 20년 전 | 3509 | ||
| 345 | 20년 전 | 4316 | ||
| 344 | 20년 전 | 2659 | ||
| 343 | 20년 전 | 3926 | ||
| 342 | 20년 전 | 3073 | ||
| 341 | 20년 전 | 4098 | ||
| 340 |
|
20년 전 | 5148 | |
| 339 |
|
20년 전 | 4241 | |
| 338 | 20년 전 | 5883 | ||
| 337 | 20년 전 | 2051 | ||
| 336 |
|
20년 전 | 3330 | |
| 335 |
|
20년 전 | 3546 | |
| 334 |
|
20년 전 | 2938 | |
| 333 |
hwatta
|
20년 전 | 2444 | |
| 332 | 20년 전 | 4658 | ||
| 331 | 20년 전 | 2283 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기