步驟:1、創建管理概要
./manageprofiles.sh
-create
-profileName Dmgr01
-profilePath /usr/IBM/WebSphere/AppServer/profiles/Dmgr01
-templatePath /usr/IBM/WebSphere/AppServer/profileTemplates/dmgr/
如果概要文件需要在不同的機器上運行,設置 -hostName為IP地址,默認為主機名
也可以自定義 -nodeName -cellName值
2、創建應用概要
./manageprofiles.sh
-create
-profileName AppSrv01
-profilePath /usr/IBM/WebSphere/AppServer/profiles/AppSrv01
-templatePath /usr/IBM/WebSphere/AppServer/profileTemplates/default/
以下是完整的參數,一般不需要這麼多,都是用默認的
cd /washome/IBM/WebSphere/AppServer/bin #
命令:./manageprofiles.sh
-create
-serverName servericbc
-profileName AppSrvicbc
-profilePath /washome/IBM/WebSphere/AppServer/profiles/AppSrvicbc
-templatePath /washome/IBM/WebSphere/AppServer/profileTemplates/default
-nodeName icbcNode
-cellName icbcCell
-hostName linux-i1so
-enableAdminSecurity true
-adminUserName admin
-adminPassword admin
3、啟動管理控制
./usr/IBM/WebSphere/AppServer/profiles/Dmgr03/bin/startManager.sh
查看SOAP端口
grep SOAP /usr/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/AboutThisProfile.txt
管理 SOAP 連接器端口:8879
增加應用概要
./usr/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/addNode.sh 127.0.0.1 8879
(添加的時候,nodeagent自動啟動)
解除應用概要
./usr/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/removeNode.sh -quiet
啟動代理節點
./usr/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/startNode.sh
查看進程:ps -ef | grep AppSrv01
可以看到啟動的進程:dmgr、nodeagent
啟動應用AppSrv01
/usr/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/startServer.sh server1
查看進程:ps -ef | grep AppSrv01
可以看到啟動的進程:dmgr、nodeagent、AppSrv01 server1
4、登錄控制台配置websphere
登錄:http://ip:9060/admin,(端口信息在Dmgr01/logs/AboutThisProfile.txt中Admin port)
在「應用程序」–>應用程序類型–>Websphere企業應用程序部署程序包,然後啟動程序
5、登錄系統,訪問應用程序
登錄:http://localhost:9080/MyProject(端口信息在Dmgr01/logs/AboutThisProfile.txt中Http port)
這時可能會出現一個問題:server啟動成功了,應用程序也啟動成功了,瀏覽器登錄就是不能打開,報錯404
???
錯誤現象:
11/16/13 16:52:22:612 CST] 00000021 util W com.ibm.ws.webcontainer.util.VirtualHostContextRootMapper map SRVE0316W: Request matches the context root [//*] under the virtual host alias of [*:9061].
[11/16/13 16:52:22:614 CST] 00000021 util W com.ibm.ws.webcontainer.util.VirtualHostContextRootMapper map SRVE0317W: You may need to add a new virtual host alias of *:<your port> to the same virtual host that [*:9061] is under.
[11/16/13 16:52:22:616 CST] 00000021 webcontainer E com.ibm.ws.webcontainer.internal.WebContainer handleRequest SRVE0255E: A WebGroup/Virtual Host to handle //jsp/portal/initLogin.action has not been defined.
————
解決辦法:
一個應用不僅發佈到某個server,還發佈在某個虛擬主機上。很明顯現在你更改了Server的WC_defaulthost端口,但是相應的虛擬主機里沒有添加這個端口。進入你發佈到的虛擬主j機,一般是default_host,添加更改的那個端口,然後重啟服務。
具體操作:
在 Administrative Console 中通過 Environment > Virtual Hosts > default_host > Host Aliases 來為默認主機添加附加端口的支持。單擊 New 以添加一個新的別名。用 * 作為主機名(* 代表任意主機名),用 9081 作為端口值。
以下文章點擊率最高
Loading…