标签:operator mat bin automatic des com var lin ble
If catalina.out becomes 2GB in size, tomcat crashes and fails to start without any error message. To avoid this scenario you should rotate catalina.out frequently. This article describes how to setup auto rotation of catalina.out on a linux/unix machine.
1. Create this file
/etc/logrotate.d/tomcat
2. Copy the following contents into the above file
/var/log/tomcat/catalina.out { copytruncate daily rotate 7 compress missingok size 5M }
About the above configuration:
You don’t need to do anything else.
Run the following command to run the cron job manually
/usr/sbin/logrotate /etc/logrotate.conf
To see all logrotate options on your system, see the manual:
man logrotat
https://dzone.com/articles/how-rotate-tomcat-catalinaout
How to Rotate Tomcat catalina.out
标签:operator mat bin automatic des com var lin ble
原文地址:http://www.cnblogs.com/diyunpeng/p/6361757.html