1. Download tool Cronolog Compression Pack (http://download.csdn.net/detail/sunling_sz/8144469)
2. Drag and drop files to the server, any directory can be.
3. Enter the installation directory to Cronolog
# CD cronolog-1.6.2
4. Run the installation
#./configure
# make
# make Install
5. Check the directory where the Cronolog is installed (verify that the installation was successful)
# which Cronolog
Typically shown as:/usr/local/sbin/cronolog
--------------------------------------------------------------------
To split Tomcat's catalina.out, you need to do the following:
Modify the catalina.sh file in the Tomcat bin directory.
1, will
If [-Z "$CATALINA _out"]; Then
catalina_out= "$CATALINA _base"/logs/catalina.out
Fi
Revision changed to
If [-Z "$CATALINA _out"]; Then
catalina_out= "$CATALINA _base"/logs/catalina.out.%y-%m-%d
Fi
2. Comment out touch "$CATALINA _base"/logs/catalina.out
3, will
Org.apache.catalina.startup.Bootstrap "[email protected]" start \
>> "$CATALINA _base"/logs/catalina.out 2>&1 &
Revision changed to
Org.apache.catalina.startup.Bootstrap "[email protected]" Start 2>&1 \
| /usr/local/sbin/cronolog "$CATALINA _out" >>/dev/null &
Save and restart Tomcat.
Partition catalina.out files under Linux, generate files by day