WAS用命令創建節點


參考事例
利用命令的方式在服務器節點1查看當前已經創建的DM和Node,然后刪除DM和節點,再重新創建DM、Node;
如下圖所示
cd d:\IBM\WebSphere\AppServer\bin

查看當前的DM、Node
manageprofiles.bat -listProfiles
刪除profile
manageprofiles.bat -delete -profileName AppSrv01
manageprofiles.bat -delete -profileName Dmgr01

創建新profile前,需要刪除文件夾!!!


利用模板創建profile dmgr
manageprofiles.bat -create -templatePath d:\IBM\WebSphere\AppServer\profileTemplates\dmgr -profileName Dmgr01 -profilePath d:\IBM\WebSphere\AppServer\profiles\Dmgr01 -enableAdminSecurity true -adminUserName admin -adminPassword 111111


利用模板創建profile server
manageprofiles.bat -create -templatePath d:\IBM\WebSphere\AppServer\profileTemplates\default -profileName AppSrv01 -profilePath d:\IBM\WebSphere\AppServer\profiles\AppSrv01 -enableAdminSecurity true -adminUserName admin –adminPassword 111111

 

在服務器節點2和3上查看、刪除原有的Profiles,然后創建新的Profiles(這兩個節點只創建應用服務器);
查看當前的Node
manageprofiles.bat -listProfiles
刪除profile
manageprofiles.bat -delete -profileName AppSrv01
利用模板創建profile server
d:\IBM\WebSphere\AppServer\profiles\AppSrv01\bin
manageprofiles.bat -create -templatePath d:\IBM\WebSphere\AppServer\profileTemplates\default -profileName AppSrv01 -profilePath d:\IBM\WebSphere\AppServer\profiles\AppSrv01
同理進入管理控制台刪除默認的server

 

manageprofiles 此命令在 websphere Application Server Network Deployment v6.1之上才有,之前的版本采用的命令為wasprofile.sh,這個需要特別注意。。
在Unix的機器上(包括AIX、HPUX)安裝websphere64位的話,想要建立Profile是沒有圖形化界面的,需要使用manageprofiles命令,下面就詳細描述一下如何使用這個命令。
1、建立DM的profile,使用的模版在{install_root}/profileTemplates/dmgr下
句法為:
manageprofile.sh -create –templatePath {install_root}/profileTemplates/dmgr
調用參數為:
-create 建立一個profile. (必選)
-templatePath 指定使用模版的路徑. (必選) 建立DM的路徑為{install_root}/profileTemplates/dmgr
-profileName 指定profile的名字. (可選)
-profilePath 指定proflile需要建立的路徑. (可選)
-hostName 指定profile對應的主機名稱. (可選)
-nodeName 指定profile對應的node的名稱. 此名稱必須在同一cell中唯一. (可選)
-cellName 指定profile對應的cell的名稱. 每一個profile的cell名稱必須唯一. (可選)
-isDefault 講此profile指定為缺省的profile,在運行命令期間不需要使用profileName的參數. (可選)
-omitAction 附加條件. (可選)
-adminUserName 在指定administrative security選項后的管理員名稱. (可選)
-adminPassword 在指定administrative security選項后的管理員密碼. (可選)
-portsFile 指定profile的端口設定文件. 此參數和-startingPort或-defaultPorts參數沖突. (可選)
-startingPort 制度建立profile是的所有的端口的起始的端口號. 同-portsFile或者-defaultPorts參數沖突. (可選)
-defaultPorts 對新建立的profile使用缺省的端口號. 同-portsFile 或 -startingPort 參數沖突. (可選)
-validatePorts 進行端口號驗證,保證使用的端口號沒有已經被用或者被保留. (可選)
-enableAdminSecurity 新建立的profile使用用戶密碼方式認證,使用此參數后面跟 true. (可選)
-enableService 作為linux的service使用,使用此參數后面跟 true. (可選)
-serviceUserName 指定作為service使用時的用戶. (可選)
-webServerType 指定Web server的類型. (可選)
-webServerOS 指定Web server的操作系統的類型. (可選)
例子:
export WAS_HOME=d:\IBM
export PRO_HOME=d:\IBM\WebSphere\AppServer\profiles
以上指定websphere的安裝路徑和profile的路徑,或者輸入命令時替換
manageprofiles.sh -create \
-templatePath $WAS_HOME/profileTemplates/dmgr \
-profilePath $PRO_HOME/Dmgr01 \
-nodeName "nodename" \
-cellName "cell name" \
-enableAdminSecurity true \
-adminUserName wasadmin \
-adminPassword password \
-profileName Dmgr01 \
-hostName `hostname` \
2、建立custom的profile,使用的模版為{install_root}/profileTemplates/managed
句法為:
manageprofile.sh -create -templatePath {install_root}/profileTemplates/managed
調用參數同上:
要聯合到DM的例子
manageprofiles.sh -create \
-templatePath $WAS_HOME/profileTemplates/managed \
-profileName AppSrv01 \
-profilePath $PRO_HOME/AppSrv01 \
-nodeName test01 \
-hostName `hostname` \
-cellName test1 \
-dmgrHost 192.168.1.100 \
-dmgrPort 8879 \
-dmgrAdminPassword password \
-dmgrAdminUserName wasadmin

不用聯合到DM,而后用addNode.sh聯合的例子
manageprofiles.sh -create \
-templatePath $WAS_HOME/profileTemplates/managed \
-profilePath $PRO_HOME/AppSrv02 \
-nodeName test02 \
-cellName test2 \
-profileName AppSrv02 \
-hostName `hostname`
addNode.sh 192.168.1.100:8879 -username wasadmin -password password
3、建立appsrv的profile,使用的模版在install_root/profileTemplates/default
句法為:
manageprofile.sh -create -templatePath install_root/profileTemplates/default
調用參數同上:例子么也就那樣
4、對於集群來說,建立DM profile,然后建立多個custom的profile,addNode進去即可。或者把現有的app profile addNode到DM的概要文件中,然后通過克隆建立集群。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM