转自:https://blog.csdn.net/liubowin/article/details/48001947 1.修改bin/startup.bat文件 修改前:call "%EXECUTABLE%" start %CMD_LINE_ARGS% 修改后:call "%EXECUTABLE%" run %CMD_LINE_ARGS% 2.修改bin/catalina.bat文件 2.1 修改前: rem Execute Java with the applic
下载并解压缩 cronolog # tar zxvf cronolog-1.6.2.tar.gz 2.进入cronolog安装文件所在目录 # cd cronolog-1.6.2 3.运行安装 # ./configure # make # make install 4.查看cronolog安装后所在目录(验证安装是否成功) # which cronolog 正常情况下显示: /usr/local/sbin/cronolog 5.要想分割tomcat的catalina.out,需作如下工作:
下载并解压缩 cronolog # tar zxvf cronolog-1.6.2.tar.gz 2.进入cronolog安装文件所在目录 # cd cronolog-1.6.2 3.运行安装 # ./configure # make # make install 4.查看cronolog安装后所在目录(验证安装是否成功) # which cronolog 正常情况下显示: /usr/local/sbin/cronolog 5.要想分割tomcat的catalina.out,需作如下工作:
tomcat-rotate.sh: #!/bin/bash log_path="/home/tomcat7-api/logs/"expried_time=7 function delete_log() { local currentDate=`date +%s` for file in find $1 -name "*.log" -o -name "*.txt" do local name=$file local modifyDate=$(sta