아파치 로그 정리(압축) 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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 230 | 20년 전 | 2069 | ||
| 229 | 20년 전 | 3144 | ||
| 228 | 20년 전 | 3327 | ||
| 227 | 20년 전 | 2401 | ||
| 226 | 20년 전 | 5482 | ||
| 225 | 20년 전 | 2527 | ||
| 224 | 20년 전 | 2971 | ||
| 223 | 20년 전 | 4208 | ||
| 222 | 20년 전 | 2608 | ||
| 221 | 20년 전 | 2291 | ||
| 220 | 20년 전 | 3680 | ||
| 219 | 20년 전 | 2078 | ||
| 218 | 20년 전 | 3567 | ||
| 217 | 20년 전 | 2485 | ||
| 216 | 20년 전 | 2918 | ||
| 215 | 20년 전 | 2228 | ||
| 214 | 20년 전 | 3338 | ||
| 213 | 20년 전 | 2921 | ||
| 212 | 20년 전 | 3054 | ||
| 211 | 20년 전 | 2149 | ||
| 210 | 20년 전 | 1901 | ||
| 209 | 20년 전 | 2361 | ||
| 208 | 20년 전 | 1983 | ||
| 207 | 20년 전 | 1679 | ||
| 206 | 20년 전 | 1857 | ||
| 205 | 20년 전 | 3953 | ||
| 204 | 20년 전 | 1679 | ||
| 203 | 20년 전 | 2014 | ||
| 202 | 20년 전 | 2360 | ||
| 201 | 20년 전 | 1829 | ||
| 200 | 20년 전 | 2960 | ||
| 199 | 20년 전 | 2005 | ||
| 198 | 20년 전 | 2090 | ||
| 197 | 20년 전 | 3655 | ||
| 196 | 20년 전 | 2988 | ||
| 195 | 20년 전 | 2098 | ||
| 194 | 20년 전 | 10252 | ||
| 193 | 20년 전 | 2248 | ||
| 192 | 20년 전 | 1608 | ||
| 191 | 20년 전 | 2671 | ||
| 190 | 20년 전 | 2297 | ||
| 189 | 20년 전 | 1689 | ||
| 188 | 20년 전 | 1486 | ||
| 187 | 20년 전 | 1911 | ||
| 186 | 20년 전 | 1731 | ||
| 185 | 20년 전 | 1772 | ||
| 184 | 20년 전 | 2363 | ||
| 183 | 20년 전 | 1567 | ||
| 182 | 20년 전 | 1488 | ||
| 181 | 20년 전 | 1627 | ||
| 180 | 20년 전 | 2726 | ||
| 179 | 20년 전 | 1810 | ||
| 178 | 20년 전 | 1863 | ||
| 177 | 20년 전 | 1987 | ||
| 176 | 20년 전 | 1809 | ||
| 175 | 20년 전 | 1873 | ||
| 174 | 20년 전 | 1694 | ||
| 173 | 20년 전 | 2061 | ||
| 172 | 20년 전 | 1788 | ||
| 171 | 20년 전 | 2569 | ||
| 170 | 20년 전 | 2276 | ||
| 169 | 20년 전 | 2556 | ||
| 168 | 20년 전 | 1491 | ||
| 167 | 20년 전 | 1581 | ||
| 166 | 20년 전 | 2160 | ||
| 165 | 20년 전 | 1634 | ||
| 164 | 20년 전 | 3772 | ||
| 163 | 20년 전 | 2670 | ||
| 162 | 20년 전 | 2092 | ||
| 161 | 20년 전 | 2798 | ||
| 160 | 20년 전 | 1736 | ||
| 159 | 20년 전 | 1618 | ||
| 158 | 20년 전 | 2570 | ||
| 157 | 20년 전 | 1491 | ||
| 156 | 20년 전 | 1745 | ||
| 155 | 20년 전 | 3235 | ||
| 154 | 20년 전 | 1903 | ||
| 153 | 20년 전 | 1627 | ||
| 152 | 20년 전 | 4958 | ||
| 151 | 20년 전 | 4580 | ||
| 150 | 20년 전 | 3517 | ||
| 149 | 20년 전 | 3803 | ||
| 148 | 20년 전 | 7079 | ||
| 147 | 20년 전 | 3553 | ||
| 146 | 20년 전 | 2629 | ||
| 145 | 20년 전 | 2624 | ||
| 144 | 20년 전 | 7169 | ||
| 143 | 20년 전 | 4606 | ||
| 142 | 20년 전 | 1901 | ||
| 141 | 20년 전 | 3253 | ||
| 140 | 20년 전 | 1965 | ||
| 139 | 20년 전 | 1588 | ||
| 138 | 20년 전 | 2313 | ||
| 137 | 20년 전 | 1785 | ||
| 136 | 20년 전 | 1461 | ||
| 135 | 20년 전 | 1788 | ||
| 134 | 20년 전 | 2971 | ||
| 133 | 20년 전 | 2453 | ||
| 132 | 20년 전 | 1708 | ||
| 131 | 20년 전 | 1646 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기