JAVAEE WAR文件部署到Ubuntu tomcat

0.网上有很多部署方案,FTP,PUTTY,SSH,共享等;

1.我用共享的方式

    a.安装samba共享:http://my.oschina.net/yale8848/blog/168635 讲过;

    b.XP里打包war批处理:

        

@echo off
rem ###########
rem ## acording the bat name to create war file
rem ## %~n0 is the bat name
rem ## project name== bat name
rem ###########


set batName=%~n0
set driverPath=g:
set projectRoot=MyEclipseWorkSpace
set projectPath=%driverPath%\%projectRoot%\%batName%
set warName=%batName%.war
set remotePath=\\10.180.3.180\Share


cd %projectPath%
%driverPath%
cd WebRoot

echo ##start create war

jar -cvf %warName% *

echo ##move war to remote server
mv %warName% %remotePath%

echo ##create war over
pause

         c.ubuntu bash shell脚本:

#!/bin/sh

if [ $# = 0 ]
then
    echo "##########"
    echo "###input one parameter of war file name"
    echo "##########"
    exit 1
fi
src_path="/home/aaa/xp_share/$1.war"
des_path="/usr/tomcat/apache-tomcat-6.0.37/webapps"
mv -f $src_path $des_path
echo "move over"

你可能感兴趣的:(tomcat,javaee,ubuntu,WAR部署)