- ./update
- +--------------------------------------------------------------+
- | === 确定特定用户执行,否则退出 === |
- +--------------------------------------------------------------+
- Yes,we are the user of testtomcat
- +--------------------------------------------------------------+
- | === 确认是否需要升级,升级项目数目,否则退出 === |
- +--------------------------------------------------------------+
- When you run this script,it will upgrade the project ops networkresourcemanage
- Would you like do that?(yes/no)yes
- Let's go,update the project.
- +--------------------------------------------------------------+
- | === 由于升级需要,准备杀掉tomcat进程,请慎重!!!!! === |
- +--------------------------------------------------------------+
- ######################################
- ##WARNING.I WANT TO KILL THE TOMCAT.##
- ######################################
- Would you like do that?(yes/no)yes
- Let's go,update the project.
- kill the tomcat service instance,please hold on 5 seconds.........
- progress:[##################################################]100%
- progress:[##################################################]100%
- +--------------------------------------------------------------+
- | === 项目升级进行中,请稍候. we are running now. === |
- +--------------------------------------------------------------+
- 通过调用函数,把相应的参数导入即可
- 进行备份,删除,转移,解压等操作.
- /data/webapps/ops_apps/current
- /data/webapps/ops_apps/backup/ops
- /data/webapps/ops_apps/current
- ##########
- ops
- ##########
- /data/webapps/networkresourcemanage_apps/current
- /data/webapps/networkresourcemanage_apps/backup/networkresourcemanage
- /data/webapps/networkresourcemanage_apps/current
- ##########
- networkresourcemanage
- ##########
- +--------------------------------------------------------------+
- | === 复制替换修改配置文件 === |
- +--------------------------------------------------------------+
- +--------------------------------------------------------------+
- | === cas project === |
- +--------------------------------------------------------------+
- "/home/testtomcat/bin/cas/datasource-appcontx.xml" -> "/data/webapps/cas_apps/current/WEB-INF/spring-configuration/datasource-appcontx.xml"
- +--------------------------------------------------------------+
- | === networkresourcemanage project === |
- +--------------------------------------------------------------+
- "/home/testtomcat/bin/networkresourcemanage/sysconfig.xml" -> "/data/webapps/networkresourcemanage_apps/current/WEB-INF/classes/sysconfig.xml"
- "/home/testtomcat/bin/networkresourcemanage/system-datasource-config.xml" -> "/data/webapps/networkresourcemanage_apps/current/WEB-INF/classes/datasource/system-datasource-config.xml"
- "/home/testtomcat/bin/networkresourcemanage/datasource-appcontx.xml" -> "/data/webapps/networkresourcemanage_apps/current/WEB-INF/classes/com/iscreate/conf/spring/datasource-appcontx.xml"
- +--------------------------------------------------------------+
- | === ops project === |
- +--------------------------------------------------------------+
- "/home/testtomcat/bin/ops/InterfaceURLConfig.properties" -> "/data/webapps/ops_apps/current/WEB-INF/classes/InterfaceURLConfig.properties"
- "/home/testtomcat/bin/ops/sysconfig.xml" -> "/data/webapps/ops_apps/current/WEB-INF/classes/sysconfig.xml"
- "/home/testtomcat/bin/ops/datasource-appcontx.xml" -> "/data/webapps/ops_apps/current/WEB-INF/classes/spring/datasource-appcontx.xml"
- "/home/testtomcat/bin/ops/jbpm.hibernate.cfg.xml" -> "/data/webapps/ops_apps/current/WEB-INF/classes/jbpm.hibernate.cfg.xml"
- "/home/testtomcat/bin/ops/hibernate.cfg.xml" -> "/data/webapps/ops_apps/current/WEB-INF/classes/hibernate.cfg.xml"
- +--------------------------------------------------------------+
- | === 启动tomcat进程实例,大功告成,哈哈哈哈哈哈. === |
- +--------------------------------------------------------------+
- Using CATALINA_BASE: /opt/tomcat/apache-tomcat-6.0.33_test
- Using CATALINA_HOME: /opt/tomcat/apache-tomcat-6.0.33_test
- Using CATALINA_TMPDIR: /opt/tomcat/apache-tomcat-6.0.33_test/temp
- Using JRE_HOME: /opt/java/jdk1.6.0_26
- Using CLASSPATH: /opt/tomcat/apache-tomcat-6.0.33_test/bin/bootstrap.jar
- +--------------------------------------------------------------+
- | === 查看后台日志,了解事实的真相. === |
- +--------------------------------------------------------------+
- #view logs
- progress:[##################################################]100%
- progress:[##################################################]100%
- 2012-12-24 20:06:18 org.apache.catalina.startup.HostConfig deployDirectory
- 信息: Deploying web application directory docs
- 2012-12-24 20:06:18 org.apache.coyote.http11.Http11Protocol start
- 信息: Starting Coyote HTTP/1.1 on http-8080
- 2012-12-24 20:06:18 org.apache.jk.common.ChannelSocket init
- 信息: JK: ajp13 listening on /0.0.0.0:8009
- 2012-12-24 20:06:18 org.apache.jk.server.JkMain start
- 信息: Jk running ID=0 time=0/9 config=null
- 2012-12-24 20:06:18 org.apache.catalina.startup.Catalina start
- 信息: Server startup in 10875 ms
转载于:https://blog.51cto.com/teemomo/1103788