아파치 로그 정리(압축) 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년 전 | 73 | ||
| 8229 | 9년 전 | 73 | ||
| 8228 |
커네드커네드
|
9년 전 | 114 | |
| 8227 | 9년 전 | 124 | ||
| 8226 | 9년 전 | 163 | ||
| 8225 | 9년 전 | 150 | ||
| 8224 | 9년 전 | 147 | ||
| 8223 | 9년 전 | 114 | ||
| 8222 |
|
9년 전 | 187 | |
| 8221 | 9년 전 | 91 | ||
| 8220 | 9년 전 | 102 | ||
| 8219 | 9년 전 | 100 | ||
| 8218 | 9년 전 | 139 | ||
| 8217 |
star3840
|
9년 전 | 114 | |
| 8216 | 9년 전 | 162 | ||
| 8215 | 9년 전 | 114 | ||
| 8214 | 9년 전 | 228 | ||
| 8213 | 9년 전 | 161 | ||
| 8212 | 9년 전 | 82 | ||
| 8211 | 9년 전 | 244 | ||
| 8210 | 9년 전 | 245 | ||
| 8209 | 9년 전 | 337 | ||
| 8208 | 9년 전 | 217 | ||
| 8207 | 9년 전 | 228 | ||
| 8206 |
|
9년 전 | 189 | |
| 8205 | 9년 전 | 173 | ||
| 8204 | 9년 전 | 132 | ||
| 8203 | 9년 전 | 233 | ||
| 8202 | 9년 전 | 144 | ||
| 8201 | 9년 전 | 182 | ||
| 8200 | 9년 전 | 164 | ||
| 8199 | 9년 전 | 213 | ||
| 8198 | 9년 전 | 178 | ||
| 8197 | 9년 전 | 167 | ||
| 8196 | 9년 전 | 556 | ||
| 8195 | 9년 전 | 157 | ||
| 8194 | 9년 전 | 283 | ||
| 8193 | 9년 전 | 155 | ||
| 8192 | 9년 전 | 190 | ||
| 8191 | 9년 전 | 143 | ||
| 8190 | 9년 전 | 127 | ||
| 8189 | 9년 전 | 192 | ||
| 8188 | 9년 전 | 129 | ||
| 8187 | 9년 전 | 141 | ||
| 8186 | 9년 전 | 141 | ||
| 8185 | 9년 전 | 312 | ||
| 8184 | 9년 전 | 108 | ||
| 8183 | 9년 전 | 324 | ||
| 8182 | 9년 전 | 166 | ||
| 8181 | 9년 전 | 134 | ||
| 8180 | 9년 전 | 693 | ||
| 8179 | 9년 전 | 488 | ||
| 8178 | 9년 전 | 310 | ||
| 8177 |
kiplayer
|
9년 전 | 320 | |
| 8176 | 9년 전 | 355 | ||
| 8175 | 9년 전 | 220 | ||
| 8174 | 9년 전 | 244 | ||
| 8173 | 9년 전 | 344 | ||
| 8172 | 9년 전 | 195 | ||
| 8171 | 9년 전 | 184 | ||
| 8170 | 9년 전 | 298 | ||
| 8169 |
커네드커네드
|
9년 전 | 260 | |
| 8168 | 9년 전 | 322 | ||
| 8167 | 9년 전 | 322 | ||
| 8166 | 9년 전 | 237 | ||
| 8165 | 9년 전 | 166 | ||
| 8164 | 9년 전 | 304 | ||
| 8163 | 9년 전 | 288 | ||
| 8162 | 9년 전 | 300 | ||
| 8161 | 9년 전 | 297 | ||
| 8160 |
|
9년 전 | 490 | |
| 8159 | 9년 전 | 428 | ||
| 8158 | 9년 전 | 253 | ||
| 8157 | 9년 전 | 378 | ||
| 8156 | 9년 전 | 279 | ||
| 8155 | 9년 전 | 251 | ||
| 8154 |
00년생용띠
|
9년 전 | 599 | |
| 8153 | 9년 전 | 232 | ||
| 8152 |
|
9년 전 | 409 | |
| 8151 | 9년 전 | 408 | ||
| 8150 | 9년 전 | 499 | ||
| 8149 |
Jangfolk
|
9년 전 | 349 | |
| 8148 | 9년 전 | 170 | ||
| 8147 | 9년 전 | 373 | ||
| 8146 | 9년 전 | 436 | ||
| 8145 | 9년 전 | 379 | ||
| 8144 | 9년 전 | 348 | ||
| 8143 | 9년 전 | 194 | ||
| 8142 | 9년 전 | 426 | ||
| 8141 | 9년 전 | 383 | ||
| 8140 | 9년 전 | 929 | ||
| 8139 | 9년 전 | 261 | ||
| 8138 |
전갈자리남자
|
9년 전 | 388 | |
| 8137 | 9년 전 | 396 | ||
| 8136 | 9년 전 | 745 | ||
| 8135 |
|
9년 전 | 794 | |
| 8134 |
PlayPixel
|
9년 전 | 516 | |
| 8133 |
|
9년 전 | 436 | |
| 8132 | 9년 전 | 449 | ||
| 8131 | 9년 전 | 812 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기