1. ./update
  2. +--------------------------------------------------------------+
  3. | === 确定特定用户执行,否则退出  === |
  4. +--------------------------------------------------------------+
  5. Yes,we are the user of testtomcat
  6. +--------------------------------------------------------------+
  7. | === 确认是否需要升级,升级项目数目,否则退出  === |
  8. +--------------------------------------------------------------+
  9. When you run this script,it will upgrade the project ops networkresourcemanage
  10. Would you like do that?(yes/no)yes
  11. Let's go,update the project.
  12. +--------------------------------------------------------------+
  13. | === 由于升级需要,准备杀掉tomcat进程,请慎重!!!!!  === |
  14. +--------------------------------------------------------------+
  15. ######################################
  16. ##WARNING.I WANT TO KILL THE TOMCAT.##
  17. ######################################
  18. Would you like do that?(yes/no)yes
  19. Let's go,update the project.
  20. kill the tomcat service instance,please hold on 5 seconds.........
  21. progress:[##################################################]100%
  22. progress:[##################################################]100%
  23. +--------------------------------------------------------------+
  24. | === 项目升级进行中,请稍候. we are running now.  === |
  25. +--------------------------------------------------------------+
  26. 通过调用函数,把相应的参数导入即可
  27. 进行备份,删除,转移,解压等操作.
  28. /data/webapps/ops_apps/current
  29. /data/webapps/ops_apps/backup/ops
  30. /data/webapps/ops_apps/current
  31. ##########
  32. ops
  33. ##########
  34. /data/webapps/networkresourcemanage_apps/current
  35. /data/webapps/networkresourcemanage_apps/backup/networkresourcemanage
  36. /data/webapps/networkresourcemanage_apps/current
  37. ##########
  38. networkresourcemanage
  39. ##########
  40. +--------------------------------------------------------------+
  41. | === 复制替换修改配置文件  === |
  42. +--------------------------------------------------------------+
  43. +--------------------------------------------------------------+
  44. | === cas project  === |
  45. +--------------------------------------------------------------+
  46. "/home/testtomcat/bin/cas/datasource-appcontx.xml" -> "/data/webapps/cas_apps/current/WEB-INF/spring-configuration/datasource-appcontx.xml"
  47. +--------------------------------------------------------------+
  48. | === networkresourcemanage project  === |
  49. +--------------------------------------------------------------+
  50. "/home/testtomcat/bin/networkresourcemanage/sysconfig.xml" -> "/data/webapps/networkresourcemanage_apps/current/WEB-INF/classes/sysconfig.xml"
  51. "/home/testtomcat/bin/networkresourcemanage/system-datasource-config.xml" -> "/data/webapps/networkresourcemanage_apps/current/WEB-INF/classes/datasource/system-datasource-config.xml"
  52. "/home/testtomcat/bin/networkresourcemanage/datasource-appcontx.xml" -> "/data/webapps/networkresourcemanage_apps/current/WEB-INF/classes/com/iscreate/conf/spring/datasource-appcontx.xml"
  53. +--------------------------------------------------------------+
  54. | === ops project  === |
  55. +--------------------------------------------------------------+
  56. "/home/testtomcat/bin/ops/InterfaceURLConfig.properties" -> "/data/webapps/ops_apps/current/WEB-INF/classes/InterfaceURLConfig.properties"
  57. "/home/testtomcat/bin/ops/sysconfig.xml" -> "/data/webapps/ops_apps/current/WEB-INF/classes/sysconfig.xml"
  58. "/home/testtomcat/bin/ops/datasource-appcontx.xml" -> "/data/webapps/ops_apps/current/WEB-INF/classes/spring/datasource-appcontx.xml"
  59. "/home/testtomcat/bin/ops/jbpm.hibernate.cfg.xml" -> "/data/webapps/ops_apps/current/WEB-INF/classes/jbpm.hibernate.cfg.xml"
  60. "/home/testtomcat/bin/ops/hibernate.cfg.xml" -> "/data/webapps/ops_apps/current/WEB-INF/classes/hibernate.cfg.xml"
  61. +--------------------------------------------------------------+
  62. | === 启动tomcat进程实例,大功告成,哈哈哈哈哈哈.  === |
  63. +--------------------------------------------------------------+
  64. Using CATALINA_BASE:   /opt/tomcat/apache-tomcat-6.0.33_test
  65. Using CATALINA_HOME:   /opt/tomcat/apache-tomcat-6.0.33_test
  66. Using CATALINA_TMPDIR: /opt/tomcat/apache-tomcat-6.0.33_test/temp
  67. Using JRE_HOME:        /opt/java/jdk1.6.0_26
  68. Using CLASSPATH:       /opt/tomcat/apache-tomcat-6.0.33_test/bin/bootstrap.jar
  69. +--------------------------------------------------------------+
  70. | === 查看后台日志,了解事实的真相. === |
  71. +--------------------------------------------------------------+
  72. #view logs
  73. progress:[##################################################]100%
  74. progress:[##################################################]100%
  75. 2012-12-24 20:06:18 org.apache.catalina.startup.HostConfig deployDirectory
  76. 信息: Deploying web application directory docs
  77. 2012-12-24 20:06:18 org.apache.coyote.http11.Http11Protocol start
  78. 信息: Starting Coyote HTTP/1.1 on http-8080
  79. 2012-12-24 20:06:18 org.apache.jk.common.ChannelSocket init
  80. 信息: JK: ajp13 listening on /0.0.0.0:8009
  81. 2012-12-24 20:06:18 org.apache.jk.server.JkMain start
  82. 信息: Jk running ID=0 time=0/9  config=null
  83. 2012-12-24 20:06:18 org.apache.catalina.startup.Catalina start
  84. 信息: Server startup in 10875 ms