环境
操作系统:centos6.8
jdk7、tomcat7
包儿下载地址:http://note.youdao.com/noteshare?id=f87be741e01638ae0b984b71d51f5011&sub=1B5435CE828348B39B19FBC544C722EF
解压
tar -zxf cronolog-1.6.2.tar.gz
cd cronolog-1.6.2
编译安装
./configure.png./configure && make && make install
make && make install.png
输入命令
image.pngwhich cronolog
编辑tomcat catalina.sh文件
vim /opt/tomcat-8080/bin/catalina.sh
修改前185行:
image.png修改后185行:
image.pngif [ -z "$CATALINA_OUT" ] ; then
CATALINA_OUT="$CATALINA_BASE"/logs/catalina.%Y-%m-%d.out
fi
———————————————————————————————————————————————————
修改前384-385|392-393
image.png修改后380-395
image.pngorg.apache.catalina.startup.Bootstrap "$@" start 2>&1 \
| /usr/local/sbin/cronolog "$CATALINA_BASE/logs/catalina-%Y-%m-%d.out" &
重启tomcat服务
/opt/tomcat-8080/bin/shutdown.sh
/opt/tomcat-8080/bin/startup.sh
网友评论