[root@hostname etc]# vi /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
#compress
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}
# system-specific logs may be also be configured here.
현재 매주 로그를 저장하며, 4주간 보관 주기(secure.1 ~ 4)
------------------------------------------------------------------------------------------------------
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
위의 로그들은 적용 대상
'Linux' 카테고리의 다른 글
| network IP설정확인 (0) | 2016.04.26 |
|---|---|
| netstat (0) | 2016.03.24 |
| [Linux]서버중지 (0) | 2015.10.19 |
| [Linux]messages, dmesg, acpid 상태확인 (0) | 2015.10.15 |
| [Linux]리눅스 부팅시간 확인방법 (0) | 2015.10.02 |