nginx logrotate 日志切割
vim /etc/logrotate.d/nginx /home/wwwlogs/*nginx.log { daily rotate 5 missingok dateext compress notifempty sharedscripts postrotate [ -e /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid` endscript } /var/log/mysql/mysql.log /var/log/mysql/slow.log { daily rotate 30 #dateext compress missingok notifempty create 640 mysql mysql olddir /var/log/mysql_log_rotate sharedscripts postrotate # just if mysqld is really running if test -x /usr/local/mysql/bin/mysqladmin && \ /usr/local/mysql/bin/mysqladmin ping -uroot -proot -S /tmp/mysql.sock &>/dev/null then /usr/local/mysql/bin/mysqladmin