https://www.cnblogs.com/t-road/p/6837221.html
修改tomcat的启动文件catalina.sh:
原先的结构是:
touch "$CATALINA_OUT"
if [ "$1" = "-security" ] ; then
......
org.apache.catalina.startup.Bootstrap "$@" start
>> "$CATALINA_OUT" 2>&1 "&"
else
......
org.apache.catalina.startup.Bootstrap "$@" start
>> "$CATALINA_OUT" 2>&1 "&"
fi
修改后的机构如下
if [ "$1" = "-security" ] ; then ...... org.apache.catalina.startup.Bootstrap "$@" start 2>&1 | /usr/local/cronolog/sbin/cronolog "$CATALINA_BASE"/logs/catalina.%Y-%m-%d.out >> /dev/null & else ...... org.apache.catalina.startup.Bootstrap "$@" start 2>&1 | /usr/local/cronolog/sbin/cronolog "$CATALINA_BASE"/logs/catalina.%Y-%m-%d.out >> /dev/null
这个里面的
usr/local/cronolog要是自己配置的地址
./configure --prefix=/usr/local/cronolog //按自己需要指定安装路径,或不指定