아파치 로그 정리(압축) 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년 전 | 4128 | ||
| 429 | 19년 전 | 3324 | ||
| 428 | 19년 전 | 4144 | ||
| 427 | 19년 전 | 3492 | ||
| 426 | 19년 전 | 3118 | ||
| 425 | 19년 전 | 3430 | ||
| 424 | 19년 전 | 2452 | ||
| 423 | 19년 전 | 2880 | ||
| 422 | 19년 전 | 2372 | ||
| 421 | 19년 전 | 3723 | ||
| 420 | 19년 전 | 4755 | ||
| 419 | 19년 전 | 3831 | ||
| 418 |
|
19년 전 | 1765 | |
| 417 | 19년 전 | 2764 | ||
| 416 | 19년 전 | 2409 | ||
| 415 | 19년 전 | 2613 | ||
| 414 | 19년 전 | 4430 | ||
| 413 |
|
19년 전 | 2623 | |
| 412 | 19년 전 | 3065 | ||
| 411 |
|
19년 전 | 3002 | |
| 410 |
|
19년 전 | 3710 | |
| 409 |
|
19년 전 | 3651 | |
| 408 |
|
19년 전 | 1872 | |
| 407 | 19년 전 | 2242 | ||
| 406 | 19년 전 | 2810 | ||
| 405 | 19년 전 | 2476 | ||
| 404 | 19년 전 | 4323 | ||
| 403 | 19년 전 | 3315 | ||
| 402 |
NeoGenesis
|
19년 전 | 4111 | |
| 401 | 19년 전 | 2621 | ||
| 400 |
|
19년 전 | 2526 | |
| 399 | 19년 전 | 2978 | ||
| 398 | 19년 전 | 2511 | ||
| 397 | 19년 전 | 2804 | ||
| 396 | 19년 전 | 2510 | ||
| 395 | 19년 전 | 3218 | ||
| 394 | 19년 전 | 1761 | ||
| 393 | 19년 전 | 3012 | ||
| 392 | 19년 전 | 2288 | ||
| 391 | 19년 전 | 2192 | ||
| 390 | 19년 전 | 2301 | ||
| 389 | 19년 전 | 2662 | ||
| 388 | 19년 전 | 2210 | ||
| 387 | 19년 전 | 4494 | ||
| 386 |
|
19년 전 | 2703 | |
| 385 |
|
19년 전 | 2511 | |
| 384 | 19년 전 | 3051 | ||
| 383 | 19년 전 | 3078 | ||
| 382 | 19년 전 | 3123 | ||
| 381 |
|
19년 전 | 2650 | |
| 380 |
|
19년 전 | 3034 | |
| 379 | 19년 전 | 2559 | ||
| 378 | 19년 전 | 2230 | ||
| 377 | 19년 전 | 2793 | ||
| 376 | 19년 전 | 2480 | ||
| 375 |
|
19년 전 | 2577 | |
| 374 | 19년 전 | 3836 | ||
| 373 | 19년 전 | 3289 | ||
| 372 | 19년 전 | 5011 | ||
| 371 |
세은아빠2
|
19년 전 | 2432 | |
| 370 | 19년 전 | 4512 | ||
| 369 | 19년 전 | 3121 | ||
| 368 | 19년 전 | 2920 | ||
| 367 | 19년 전 | 3746 | ||
| 366 | 19년 전 | 2672 | ||
| 365 | 19년 전 | 3759 | ||
| 364 | 19년 전 | 4034 | ||
| 363 | 19년 전 | 3470 | ||
| 362 | 19년 전 | 3501 | ||
| 361 | 20년 전 | 4126 | ||
| 360 |
hwatta
|
20년 전 | 2382 | |
| 359 | 20년 전 | 5125 | ||
| 358 | 20년 전 | 3675 | ||
| 357 | 20년 전 | 2620 | ||
| 356 |
sdesign1s
|
20년 전 | 2300 | |
| 355 | 20년 전 | 2778 | ||
| 354 | 20년 전 | 3041 | ||
| 353 | 20년 전 | 2808 | ||
| 352 |
|
20년 전 | 5788 | |
| 351 |
|
20년 전 | 2725 | |
| 350 |
|
20년 전 | 4314 | |
| 349 |
hwatta
|
20년 전 | 2206 | |
| 348 | 20년 전 | 7319 | ||
| 347 | 20년 전 | 2427 | ||
| 346 | 20년 전 | 3523 | ||
| 345 | 20년 전 | 4326 | ||
| 344 | 20년 전 | 2673 | ||
| 343 | 20년 전 | 3937 | ||
| 342 | 20년 전 | 3082 | ||
| 341 | 20년 전 | 4112 | ||
| 340 |
|
20년 전 | 5169 | |
| 339 |
|
20년 전 | 4253 | |
| 338 | 20년 전 | 5898 | ||
| 337 | 20년 전 | 2060 | ||
| 336 |
|
20년 전 | 3351 | |
| 335 |
|
20년 전 | 3570 | |
| 334 |
|
20년 전 | 2964 | |
| 333 |
hwatta
|
20년 전 | 2468 | |
| 332 | 20년 전 | 4671 | ||
| 331 | 20년 전 | 2295 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기