您的位置:首页 > 运维架构 > Tomcat

用tarball实现liferay自动安装部署13-从Storage Server下载tomcat zip file

2012-09-02 03:26 531 查看
因为我们曾经在http://supercharles888.blog.51cto.com/609344/979796 文章中提到我们定制了liferay tomcat bundle文件并且上传到了本地的Storage Server上,所以这里就是下载并使用这个文件。

代码如下:

#download the liferay-tomcat-bundle server

echo "Begin downloading the liferay-tomcat-bundle ..... to $MODIFICATION_ROOT"

echo "${LOG_TIME_FORMAT} Begin downloading the liferay-tomcat-bundle .....">>$TODAYLOG

cd $MODIFICATION_ROOT

wget $LIFERAY_TOMCAT_BUNDLE_DOWNLOAD_ADDR >> $TODAYLOG

echo "End downloading the liferay-tomcat-bundle ...."

echo "${LOG_TIME_FORMAT} End downloading the liferay-tomcat-bundle...." >>$TODAYLOG

#unzip the liferay-tomcat-bundle server

echo "Begin unzipping the liferay-tomcat-bundle....from $MODIFICATION_ROOT"

echo "${LOG_TIME_FORMAT} Begin unzipping the liferay-tomcat-bundle..." >>$TODAYLOG

cd $MODIFICATION_ROOT

unzip -d . *.zip >> $TODAYLOG

echo "End unzipping the liferay-tomcat-bundle...."

echo "${LOG_TIME_FORMAT} End unzipping the liferay-tomcat-bundle..." >>$TODAYLOG

#added by charles to do the folder structure adjustment

#copy the liferay-portal-version{ce|ee}-ga1 from the unzipped tomcat bundle to $MODIFICATION_ROOT folder

echo "Begin copying the liferay-portal-version{ce|ee}-ga1 from the unzipped tomcat bundle to $MODIFICATION_ROOT folder"

cd  $MODIFICATION_ROOT

mv $LIFERAY_TOMCAT_BUNDLE_FOLDER_NAME/liferay-portal* .

echo "End copying the liferay-portal-version{ce|ee}-ga1 from the unzipped tomcat bundle to $MODIFICATION_ROOT folder"

#delete the liferay tomcat bundle zip file

echo "Begin deleting the tomcat bundle zip file and the empty liferay tomcat bundle folder"

echo "${LOG_TIME_FORMAT} Begin deleting the tomcat bundle zip file from $MODIFICATION_ROOT" >> $TODAYLOG

cd $MODIFICATION_ROOT

rm -r $LIFERAY_TOMCAT_BUNDLE_ZIPFILE_NAME >> $TODAYLOG

rm -r $LIFERAY_TOMCAT_BUNDLE_FOLDER_NAME >> $TODAYLOG

rm -r readme.txt

echo "End deleting the tomcat bundle zip file"

echo "${LOG_TIME_FORMAT} End deleting the tomcat bundle zip file">> $TODAYLOG


也没什么难度,也就是用wget下载,然后解压,然后调整下目录,最终吧下载的目录,文件都删除。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Liferay Portal tarball