===============================
2015-10-15 Linux 打包
================================
1. # cd /data/tomcat-website 进入tomcat的bin目录
2. # ./shutdown.sh 关闭tomcat
3.# ls 如果感觉使用2的命令没有停掉tomcat,使用该命令来查看一下线程是否还在
4.# cp website.war /backup/website.war201510151920 copy项目到测试环境
5. # cd /data/tomcat-website/webapps 如果经过3发现线程还在,使用该命令杀死 9871是线程号
6.# cd ../logs/ 进入tomcat日志目录
7. ./startup.sh 启动tomcat
8.
# tail -f catalina.out
查看tomcat运行情况 相当于myeclipse控制台 查看日志
以下是操作原型
[root@dev7-pc webapps]# clear
[root@dev7-pc webapps]# cd /data/tomcat-website
[root@dev7-pc tomcat-website]# cd ./bin/
[root@dev7-pc bin]# ./shutdown.sh
/data/tomcat-website/bin/catalina.sh: line 86: -Xdebug: command not found
Using CATALINA_BASE: /data/tomcat-website
Using CATALINA_HOME: /data/tomcat-website
Using CATALINA_TMPDIR: /data/tomcat-website/temp
Using JRE_HOME: /usr/java/jdk1.6.0_45
Using CLASSPATH: /data/tomcat-website/bin/bootstrap.jar
[root@dev7-pc bin]# cd ../webapps/
[root@dev7-pc webapps]# ls
static static.war website website.war
[root@dev7-pc webapps]# cp website.war /backup/web
webgate.war20150728 webgate.war20150826 webgate.war20150924 website.war20150720
webgate.war20150730 webgate.war2015082602 webgate.war20150925 website.war20150723
webgate.war20150801 webgate.war20150901 webgate.war20150928 website.war20150726
webgate.war20150804 webgate.war20150907 webgate.war20150929 website.war20150727
webgate.war20150805 webgate.war20150909 webgate.war20151015 website.war20150804
webgate.war2015080501 webgate.war20150910 website.war20150609 website.war20151008
webgate.war20150806 webgate.war20150911 website.war20150629 website.war201510141430
webgate.war20150810 webgate.war20150917 website.war20150630 website.war.ipay
webgate.war20150814 webgate.war20150918 website.war20150701
webgate.war20150820 webgate.war20150919 website.war20150703
webgate.war2015082001 webgate.war20150923 website.war20150705
[root@dev7-pc webapps]# cp website.war /backup/website.war20151015
[root@dev7-pc webapps]# ls
static static.war website website.war
[root@dev7-pc webapps]# rm -rf website*
[root@dev7-pc webapps]# ls
static static.war
[root@dev7-pc webapps]# rz
rz waiting to receive.
Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring website.war...
100% 63529 KB 10588 KB/sec 00:00:06 0 Errors
[root@dev7-pc webapps]# ls
static static.war website.war
[root@dev7-pc webapps]# unzip website.war -d website
Archive: website.war
loading
[root@dev7-pc webapps]# ls
static static.war website website.war
[root@dev7-pc webapps]# cd ../bin/
[root@dev7-pc bin]# ls
bootstrap.jar cpappend.bat sdkclient_info.log startup.bat velocity.log
catalina.bat daemon.sh sdkclient_warn.log startup.sh version.bat
catalina.sh digest.bat setclasspath.bat tomcat-juli.jar version.sh
catalina-tasks.xml digest.sh setclasspath.sh tomcat-native.tar.gz
commons-daemon.jar sdkclient_debug.log shutdown.bat tool-wrapper.bat
commons-daemon-native.tar.gz sdkclient_error.log shutdown.sh tool-wrapper.sh
[root@dev7-pc bin]# ./startup.sh
/data/tomcat-website/bin/catalina.sh: line 86: -Xdebug: command not found
Using CATALINA_BASE: /data/tomcat-website
Using CATALINA_HOME: /data/tomcat-website
Using CATALINA_TMPDIR: /data/tomcat-website/temp
Using JRE_HOME: /usr/java/jdk1.6.0_45
Using CLASSPATH: /data/tomcat-website/bin/bootstrap.jar
[root@dev7-pc bin]# cd ../logs/
[root@dev7-pc logs]# tail -f catalina.out