美文网首页
logrotate 的配置、centos的触发过程

logrotate 的配置、centos的触发过程

作者: Kinvo | 来源:发表于2018-12-06 17:14 被阅读9次

配置介绍:  https://jin-yang.github.io/post/logrotate-usage.html

                   https://www.cnblogs.com/kevingrace/p/6307298.html  (更详细)

centos的触发过程:

所以只需要把配置放到 /etc/logrotate.d/ 下就可以触发。

centos的syslog的配置:

[root@hive-1 ~]# cat /etc/logrotate.d/syslog 

/var/log/cron /var/log/maillog 

/var/log/messages 

/var/log/secure 

/var/log/spooler 

missingok  

sharedscripts 

postrotate 

  /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true 

endscript 

}         

相关文章

网友评论

      本文标题:logrotate 的配置、centos的触发过程

      本文链接:https://www.haomeiwen.com/subject/sigocqtx.html