1. 程式人生 > >Was8.5靜默安裝完整步驟

Was8.5靜默安裝完整步驟

1、安裝包準備
Installation Manager安裝包:agent.installer.linux.gtk.x86_64_1.7.4000.20150304_1934.zip
WAS_ND安裝包:
WAS_ND_V8.5_1_OF_3.zip
WAS_ND_V8.5.5_2_OF_3.zip
WAS_ND_V8.5.5_3_OF_3.zip

2、目錄結構:
Installation Manager安裝包位置: /opt/was8.5/agent
WAS_ND安裝包位置: /opt/was8.5/wassource
在上面兩個路徑下執行各自的解壓命令

unzip -n agent.installer.linux.gtk.x86_64_1.7.4000.20150304_1934.zip 
unzip -n WAS_ND_V8.5_1_OF_3.zip

Installation Manager安裝位置: /opt/IMS/eclipse/
WAS_ND安裝位置: /opt/IBM/WebSphere/AppServer
注:WAS_ND三個安裝包解壓在同一個目錄下

3、Installation Manager靜默安裝

cd /opt/was8.5/agent
./installc -installationDirectory /opt/IMS/eclipse  -acceptLicense

備註:
-installationDirectory <安裝目錄>
installc 表示使用root使用者靜默安裝

4、WAS8.5 靜默安裝

4.1、得到小版本號

cd /opt/IMS/eclipse/tools
./imcl listAvailablePackages -repositories /opt/was8.5/wassource/repository.config 

4.2、修改repository.config檔案

 cd /opt/was8.5/wassource
 vi repository.config
 
-OPT silentInstallLicenseAcceptance="true"     
-OPT allowNonRootSilentInstall="true"         
-OPT disableOSPrereqChecking="true"         
-OPT installType="installNew"                 
-OPT feature="noFeature"                      
-OPT installLocation="/opt/IBM/WebSphere/AppServer"     
-OPT profileType="none"                               
-OPT PROF_enableAdminSecurity="false"   

配置內容從上到下依次為:接受License、允許非root使用者安裝、取消對系統的檢測、 全新安裝、 不安裝示例、安裝路徑、不生成概要、不設定管理員安全。
注:WebSphere通常都是需要設定管理員安全的,不過在這裡設定true親測並沒有生效,因此後續在Web控制檯上圖形化設定。

4.3、執行安裝was命令

cd /opt/IMS/eclipse/tools
./imcl install 前面得到的小版本號
-repositories /opt/was8.5/wassource/repository.config 
-installationDirectory /opt/IBM/WebSphere/AppServer 
-sharedResourcesDirectory /opt/IBM/IMShared 
-acceptLicense

注:這裡的安裝程式碼在命令列中是寫在一行的,這裡分行只是為了方便閱讀,每行前面的-不能省略。
-install 小版本號
-repositories 使用的儲存庫

4.4、建立管理概要

cd /opt/IBM/WebSphere/AppServer/bin 
./manageprofiles.sh -create 
-profileName Dmgr01 
-profilePath /opt/IBM/WebSphere/AppServer/profiles/Dmgr01 
-templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/dmgr/
-hostname 主伺服器的主機名

注:如果想搭建多主機的Was叢集,不設定hostname會導致若干問題。

4.5、建立應用概要

cd /opt/IBM/WebSphere/AppServer/bin 
./manageprofiles.sh -create 
-profileName AppSvr01  
-profilePath /opt/IBM/WebSphere/AppServer/profiles/AppSvr01/ 
-templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/default 
-hostName 主伺服器的主機名
-nodeName 自定義節點名
-serverName 自定義服務名

注:在主伺服器(管理伺服器)上新建的應用概要也顯示填上主伺服器的主機名。從伺服器(應用節點伺服器)不需要建立管理概要,但在建立應用概要的時候hostname也要顯示指定。

4.6、啟動Web管理控制檯

/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/startManager.sh

在主伺服器上執行。需要關閉防火牆:chkconfig iptables off
Web管理端地址:http://yourip:9060/ibm/console

4.7、新增應用概要到管理節點

/opt/IBM/WebSphere/AppServer/profiles/AppSvr01/bin/addNode.sh 主伺服器的主機名 8879 -username admin -password admin

注:埠號為WebSphereDeployment Manager對應的埠,預設8879。要加哪個節點就在哪個bin目錄下執行。在將從伺服器的新增應用概要新增到管理節點的時候,必須保證主伺服器的防火牆是關閉的。

4.8、啟動Node節點

/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/startNode.sh

要啟動哪個節點就在哪個bin目錄下執行。

注:節點的四種狀態
已同步:此節點上的配置檔案已與 Deployment Manager 同步
未同步:此節點上的配置檔案未與 Deployment Manager 同步(已過期)
未知:由於無法訪問此節點的 Node Agent, 所以無法確定配置檔案的狀態
不可用:由於此節點是非受管節點, 所以狀態列不適用於此節點

4.9、啟動Node節點下的Server

/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/startServer.sh server1

4.10、在從伺服器重複上述步驟
不同的是在從伺服器上無需建立管理概要。即兩臺Linux伺服器,主伺服器安裝Dmgr和Appsrv,從伺服器上只需安裝Appsrv。在組成叢集的過程中,幾臺伺服器的hostname不能相同。安裝完成後,在管理伺服器下的/opt/IBM/WebServer/AppServer/profiles目錄下可以看到DMGR01,APPSRV01兩個目錄。其中DMGR01是管理臺概要檔案。在應用節點伺服器下的/opt/IBM/WebServer/AppServer/profiles目錄下能看到APPSRV01一個目錄。

注:叢集的IP地址,是叢集中所有的節點對外呈現的一個共同的IP地址,常預設為管理伺服器的ip 。

4.11、修改hosts檔案
詳見部落格裡的另一篇文章
https://blog.csdn.net/weixin_38645718/article/details/83147248

5、WAS其他操作

5.1、如何重啟Was

首先停止server,再停止Node,最後停止dmgr 。 接著啟動dmgr ,再啟動Node,最後啟動server 。 啟動server後,服務狀態變為start。啟動node後,節點狀態變為同步。

注1:將叢集上的節點全部啟動起來之後,cluster的狀態就會由partial start 變為 start 。

注2:如果設定管理控制檯的密碼,在關閉server、node的時候需要輸入使用者名稱、密碼,在開啟的時候不需要輸入。

5.2、如何刪除概要檔案

1)在刪除前一定要確認將WAS服務停止,可以使用 ps -ef|grep was 命令來確認服務是否關閉。

2)確定profiles的名稱。在WAS_HOME\bin 目錄下輸入命令 ./manageprofiles.sh -listProfiles

3)刪除節點對應的概要檔案 ./manageprofiles.sh -delete -profileName AppSrv01

4)刪除檔案目錄

  cd WAS_HOME/profiles
  rm -Rf AppSrv01

刪除概要檔案參考:https://jingyan.baidu.com/article/63acb44afb782561fcc17ed9.html
https://blog.csdn.net/zdwzzu2006/article/details/16358731

====================================================
參考文獻:
WebSphere 8.5.5 靜默安裝 / 檢視Was版本:
https://blog.csdn.net/mfanoffice2012/article/details/81605126

WebSphere 8.5.5 圖形化安裝 / 如何在控制檯圖形化建立Was叢集(黃炎龍版更具體):
https://blog.csdn.net/lvshaorong/article/details/78932108

如何設定Was控制檯的登入名和密碼:
https://blog.csdn.net/huangyanlong/article/details/40979525?utm_source=blogxgwz1

檢視節點程序、服務程序狀態 / 殺死程序:
https://blog.csdn.net/baidu_34051990/article/details/52712238

hostname詳解:
https://www.cnblogs.com/kerrycode/p/3595724.html

推薦系列:
黃炎龍WebSphere系列:
https://blog.csdn.net/huangyanlong/article/details/39136803