#############
安装:
yum -y install logrotate crontabs
配置:
shell>> cat /etc/logrotate.d/mongodb_28008
/home/work/mongodb/mongo_28008/log/mongodb.log{ missingok daily
copytruncate size 2048M dateext create 0600 work work rotate 10
notifempty
}
执行日志轮换:
logrotate -f /etc/logrotate.d/igoodful
##############
#############