was自动部署sheel脚本

求一份was自动部署脚本,最好有详细注释,本人小白。显示全部

求一份was自动部署脚本,最好有详细注释,本人小白。

收起
参与5

查看其它 1 个回答XING20160415的回答

XING20160415XING20160415系统运维工程师HODA

下面只是为了简化安装工作的shell脚本,为了前期环境准备,简单的写了一下。

!/bin/bash

INSTALMGR_HOME=/opt/IBM/InstallationManager/eclipse/
WAS_HOME=/opt/IBM/WebSphere/AppServer
IMSHARED_HOME=/opt/IBM/IMShared
WAS_BIN=/opt/IBM/WebSphere/AppServer/bin
WAS_USER=wasadmin
WAS_PASSWD=wasadmin

Install InstalMgr

unzip ./InstalMgr1.6.2_LNX_X86_64_WAS_8.5.5.zip -d InstalMgr
./InstalMgr/installc -installationDirectory $INSTALMGR_HOME -acceptLicense

Query Package version

/opt/IBM/InstallationManager/eclipse/tools/imcl listAvailablePackages -repositories /tmp/websphere8.5.5/was8.5.5/repository.config

Install WebSphere 8.5.5

unzip ./WAS_ND_V8.5.5_1_OF_3.zip -d was8.5.5
unzip ./WAS_ND_V8.5.5_2_OF_3.zip -d was8.5.5
unzip ./WAS_ND_V8.5.5_3_OF_3.zip -d was8.5.5
$INSTALMGR_HOME/tools/imcl install com.ibm.websphere.ND.v85_8.5.5000.20130514_1044 -repositories ./was8.5.5/repository.config -installationDirectory $WAS_HOME -sharedResourcesDirectory $IMSHARED_HOME -acceptLicense
rm -rf ./was8.5.5

Upgrade to 8.5.5.10

unzip ./8.5.5-WS-WAS-FP0000010-part1.zip -d fp10
unzip ./8.5.5-WS-WAS-FP0000010-part2.zip -d fp10
$INSTALMGR_HOME/tools/imcl install com.ibm.websphere.ND.v85_8.5.5010.20160721_0036 -repositories ./fp10/repository.config -installationDirectory $WAS_HOME -acceptLicense
rm -rf ./fp10

Install IBM JAVA 1.7

unzip ./WS_SDK_JAVA_TEV7.0_1OF3_WAS_8.5.5.zip -d java
unzip ./WS_SDK_JAVA_TEV7.0_2OF3_WAS_8.5.5.zip -d java
unzip ./WS_SDK_JAVA_TEV7.0_3OF3_WAS_8.5.5.zip -d java
$INSTALMGR_HOME/tools/imcl install com.ibm.websphere.IBMJAVA.v70_7.0.4001.20130510_2103 -repositories ./java/repository.config -installationDirectory $WAS_HOME -acceptLicense
rm -rf ./java

Set New Profile Default

$WAS_BIN/managesdk.sh -setNewProfileDefault -sdkName 1.7_64

Create User

useradd wasadmin
echo "wasadmin"|passwd --stdin wasadmin
chown -R wasadmin:wasadmin /opt/IBM

Add IP to /etc/hosts

IP=$(LC_ALL=C ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' |cut -d: -f2 | awk '{ print $1}' )
sed -i '1i'$IP'' /etc/hosts
sed -i '/^'$IP'.*$/s//& '$HOSTNAME'/g' /etc/hosts

==============================================================

!/bin/bash

WAS_HOME=/opt/IBM/WebSphere/AppServer
WAS_USER=wasadmin
WAS_PASSWD=wasadmin
WAS_BIN=/opt/IBM/WebSphere/AppServer/bin

Create New Profile

$WAS_BIN/manageprofiles.sh -create -profileName AppSrv01 -profilePath $WAS_HOME/profiles/AppSrv01 -templatePath $WAS_HOME/profileTemplates/default -enableAdminSecurity true -adminUserName $WAS_USER -adminPassword $WAS_PASSWD
chown -R wasadmin:wasadmin /opt/IBM

系统集成 · 2017-07-18
浏览2401

回答者

XING20160415
系统运维工程师HODA
擅长领域: 应用服务器双活服务器

回答状态

  • 发布时间:2017-07-18
  • 关注会员:3 人
  • 回答浏览:2401
  • X社区推广