티스토리 뷰

Linux

secure 로그 설정

애플자라 2016. 3. 24. 08:43
반응형

[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)

 

------------------------------------------------------------------------------------------------------

[root@hostname logrotate.d]# vi /etc/logrotate.d/syslog

 

/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
    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
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함