使用logrotate做的nginx日志切割
2017-12-30 19:45
761 查看
##使用/etc/crontab定时任务来执行日志切割脚本
59 23 * * * root (/usr/bin/logrotate -f /etc/logrotate.d/nginx)
##将下面的脚本做成配置文件放到/etc/logrotate.d下面,起名为nginx (当然可以随意起名)
/usr/local/nginx/logs/*.log {
nocompress
daily
copytruncate
rotate 7
missingok
notifempty
dateext
}
59 23 * * * root (/usr/bin/logrotate -f /etc/logrotate.d/nginx)
##将下面的脚本做成配置文件放到/etc/logrotate.d下面,起名为nginx (当然可以随意起名)
/usr/local/nginx/logs/*.log {
nocompress
daily
copytruncate
rotate 7
missingok
notifempty
dateext
}
相关文章推荐
- 切割日志(mysql,nginx,php tomcat)使用logrotate
- 使用logrotate工具切割MySQL日志与慢日志分析发送到邮箱
- logrotate日志管家来切割日志(tomcat,nginx,httpd的日志)
- Nginx的进程模型、反向代理配置、rewrite的使用、负载均衡配置、https配置、日志切割
- logrotate切割nginx日志
- Nginx日志切割_sedEmail简单使用
- Linux使用logrotate来切割日志文件
- 使用logrotate分割nginx日志 当前nginx日志为空
- nginx使用logrotate对日志进行分割
- debian使用 Logrotate 来切割日志
- 使用logrotate管理nginx日志文件
- 日志文件切割服务logrotate配置及crontab定时任务的使用
- [日志分割回滚] 使用linux自带的logrotate对nginx日志进行分割
- logrotate 切割 nginx php mysql 日志
- 使用logrotate做nginx日志分割
- [日志分割回滚] 使用linux自带的logrotate对nginx日志进行分割(脚本)
- 使用logrotate管理nginx日志文件
- nginx日志切割并使用flume-ng收集日志
- 使用logrotate管理nginx日志文件
- [日志分割回滚] 使用linux自带的logrotate对nginx日志进行分割(脚本)