Overview
This article describes how to relocate the Tomcat logs directory to a custom path and create a symbolic link to maintain compatibility.
In this example, a new directory is created at /u01/newlogs and linked to the standard Tomcat logs location.
| Note: Run all commands as root. |
For Versions Before 5.0
Run the following commands to stop the Tomcat service, move the logs to the new location, create a symbolic link, set the correct permissions, and restart the service:
service tomcat stop
mkdir /u01/newlogs
mv /usr/share/tomcat/default/logs/* /u01/newlogs
rm -rf /usr/share/tomcat/default/logs
ln -sf /u01/newlogs /usr/share/tomcat/default/logs
chmod 755 /usr/share/tomcat/default/logs
chown -R tomcat:tomcat /usr/share/tomcat/default/logs
service tomcat start
Comments
0 comments
Please sign in to leave a comment.