sunage001 发表于 2018-12-6 13:15:08

用tarball实现liferay自动安装部署13

  因为我们曾经在http://supercharles888.blog.运维网.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下载,然后解压,然后调整下目录,最终吧下载的目录,文件都删除。



页: [1]
查看完整版本: 用tarball实现liferay自动安装部署13