前言
was(websphere application server),类似weblogic、tomcat,由IBM开发的一种企业级Java容器。
- 系统版本:redhat 8.2
- was版本:was 9.0.5.4
- 安装文件:
相关程序 | 安装包 | 备注 |
IM | gtk.x86_64_1.8.9004.20190423_2015.zip | InstallationManager |
was安装包 | was.repo.90501.nd.zip | |
IBM JDK | ibm-java-sdk-8.0-6.10-linux-x64-installmgr.zip | |
IHS Plugin | ||
IHS Plugin补丁文件 | ||
WAS补丁文件 | 9.0.5-WS-WAS-FP004.zip |
安装InstallationManager
- 解压im安装包
unzip gtk.x86_64_1.8.9004.20190423_2015.zip
- 解压后进入IM安装包目录,执行命令
./userinstc -installationDirectory /home/apps/was/InstallationManager -acceptLicense -log im_install.log
安装was
- 进入im安装后的目录(
/home/apps/was/InstallationManager/eclipse
),创建文件:install_response_file_was9054.xml
,内容如下,注意根据实际情况修改安装位置
<?xml version='1.0' encoding='UTF-8'?> <agent-input> <variables> <!-- 共享库安装位置 --> <variable name='sharedLocation' value='/home/apps/was/IBM/IMShared'/> </variables> <server> <!-- was安装文件所在位置 --> <repository location='/home/apps/was/was'/> <!-- was补丁包文件所在位置 --> <repository location='/home/apps/was/wasfix'/> <!-- jdk安装文件所在位置 --> <repository location='/home/apps/was/jdk'/> </server> <!-- was安装位置 --> <profile id='IBM WebSphere Application Server V9.0' installLocation='/home/apps/was/IBM/WebSphere/AppServer'> <data key='cic.selector.arch' value='x86_64'/> <data key='cic.selector.nl' value='zh,en'/> </profile> <install> <!-- IBM WebSphere Application Server Network Deployment 9.0.5.4 --> <offering profile='IBM WebSphere Application Server V9.0' id='com.ibm.websphere.ND.v90' version='9.0.5004.20200520_1523' features='core.feature,ejbdeploy,thinclient,embeddablecontainer'/> <!-- IBM SDK, Java Technology Edition, Version 8 8.0.6.10 --> <offering profile='IBM WebSphere Application Server V9.0' id='com.ibm.java.jdk.v8' version='8.0.6010.20200421_1200' features='com.ibm.sdk.8'/> </install> <preference name='com.ibm.cic.common.core.preferences.eclipseCache' value='${sharedLocation}'/> </agent-input>
- 解压安装包到目录
# was安装包 unzip was.repo.90501.nd.zip -d /home/apps/was/was # was补丁包 unzip 9.0.5-WS-WAS-FP004.zip -d /home/apps/was/wasfix/ # ibm jdk包 unzip ibm-java-sdk-8.0-6.10-linux-x64-installmgr.zip -d /home/apps/was/jdk
- 执行命令进行安装
./tools/imcl -acceptLicense input install_response_file_was9054.xml -log install_was9054.xml
基本使用
- 创建管理
cd /home/apps/was/IBM/WebSphere/AppServer/bin # -hostname: 主服务器的主机名 ./manageprofiles.sh -create -profileName Dmgr01 -profilePath /home/apps/was/IBM/WebSphere/AppServer/profiles/Dmgr01 -templatePath /home/apps/was/IBM/WebSphere/AppServer/profileTemplates/dmgr/ -hostname wasnode1
- 创建应用
cd /home/apps/was/IBM/WebSphere/AppServer/bin # -hostName: 主服务器的主机名 # -nodeName: 自定义节点名 # -serverName: 自定义服务名 ./manageprofiles.sh -create -profileName AppSvr01 -profilePath /home/apps/was/IBM/WebSphere/AppServer/profiles/AppSvr01 -templatePath /home/apps/was/IBM/WebSphere/AppServer/profileTemplates/default -hostName wasnode1 -nodeName wasnode2 -serverName svr01
- 启动控制台
cd /home/apps/was/IBM/WebSphere/AppServer/bin ./startManager.sh # 启动结束后,在浏览器访问: http://<ip>:9060/ibm/console,用户标识可以填root
- 添加应用到管理节点
# 进入应用配置的目录 cd /home/apps/was/IBM/WebSphere/AppServer/profiles/AppSvr01/bin # 需要先在/etc/hosts中添加wasnode1的记录 ./addNode.sh wasnode1 8879 -username admin -password admin
- 启动Node节点
cd /home/apps/was/IBM/WebSphere/AppServer/profiles/AppSvr01/bin ./startNode.sh
- 启动Node节点中的服务
cd /home/apps/was/IBM/WebSphere/AppServer/profiles/AppSvr01/bin ./startServer.sh svr01