跳转至

安装

名词解释

1
2
3
4
5
6
IIM IBM Installation Manager 安装和配置 WAS 需要用到,跟运行时没有关系 
WAS IBM WebSphere Application Server
FP FixPack
IHS IBM HTTP Server
Dmgr Deployment Manager
NodeAgent 安装在每个受管理节点(managed node)上,Application Server 也安装在节点上。

安装步骤

# 介质存放目录
mkdir /opt/IBM/soft/iim -p
mkdir /opt/IBM/soft/was -p

# 介质位置
# tree /opt/IBM/soft
.
├── iim
   └── agent.installer.linux.gtk.x86_64_1.8.5000.20160506_1125.zip
└── was
    ├── WAS_ND_V8.5.5_1_OF_3.zip
    ├── WAS_ND_V8.5.5_2_OF_3.zip
    └── WAS_ND_V8.5.5_3_OF_3.zip

# 安装目录
mkdir /opt/IBM/InstallationManager -p
mkdir /opt/IBM/WebSphere/AppServer -p
mkdir /wasdump

# 创建运行用户
useradd wasadmin
chown -R wasadmin:wasadmin /opt/IBM
sudo su - wasadmin

# !! 节点间是通过主机名进行通许,必须支持
# 如通过配置 /etc/hosts
10.0.0.24 dmgr
10.0.0.13 wasnode01

安装 WAS

所有节点都需安装 WAS,包括 DMGR 节点和 managed node。

# 安装 IIM
/opt/IBM/soft/iim/userinstc -acceptLicense -installationDirectory /opt/IBM/InstallationManager -log ./log.xml -silent

# 查看版本信息
/opt/IBM/InstallationManager/eclipse/tools/imcl listAvailablePackages -repositories /opt/IBM/soft/was/repository.config -features -long

# 安装 WAS
/opt/IBM/InstallationManager/eclipse/tools/imcl install com.ibm.websphere.ND.v85_8.5.5000.20130514_1044 -repositories /opt/IBM/soft/was/repository.config -installationDirectory /opt/IBM/WebSphere/AppServer -acceptLicense

# 查看版本
# 缺依赖时需执行 yum install libnsl
/opt/IBM/WebSphere/AppServer/bin/versionInfo.sh

安装 DMGR

仅需在 DMGR 节点上执行

# 安装 DMGR
yum install psmisc
/opt/IBM/WebSphere/AppServer/bin/manageprofiles.sh \
  -create \
  -profileName Dmgr01 \
  -profilePath /opt/IBM/WebSphere/AppServer/profiles/Dmgr01 \
  -templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/management \
  -nodeName DmgrNode01 \
  -personalCertValidityPeriod 10 \
  -hostName dmgr

# 如安装失败,可执行以下命令清理
# /opt/IBM/WebSphere/AppServer/bin/manageprofiles.sh -delete -profileName Dmgr01
# rm -rf /opt/IBM/WebSphere/AppServer/profiles/Dmgr01

# 启动 DMGR(在管理节点上执行)
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/startManager.sh

安装 NodeAgent

仅需在 NodeAgent 节点上执行

# 创建 NodeAgents
/opt/IBM/WebSphere/AppServer/bin/manageprofiles.sh \
  -create \
  -profileName AppSrv01 \
  -profilePath /opt/IBM/WebSphere/AppServer/profiles/AppSrv01 \
  -templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/managed \
  -nodeName AppSrv01 \
  -personalCertValidityPeriod 10 \
  -hostName wasnode01

/opt/IBM/WebSphere/AppServer/bin/manageprofiles.sh \
  -create \
  -profileName AppSrv02 \
  -profilePath /opt/IBM/WebSphere/AppServer/profiles/AppSrv02 \
  -templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/managed \
  -nodeName AppSrv02 \
  -personalCertValidityPeriod 10 \
  -hostName wasnode01

# 如安装失败,可执行以下命令清理
# /opt/IBM/WebSphere/AppServer/bin/manageprofiles.sh -delete -profileName AppSrv01
# rm -rf /opt/IBM/WebSphere/AppServer/profiles/AppSrv01

# 向 DMGR 节点注册本节点
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/addNode.sh dmgr 8879

# addNode 就会自动 NodeAgent 或者手工启动(在受管节点上执行)
# /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/startNode.sh

测试验证

浏览器打开 http://{DMGR_IP}:9060/admin 输入任意用户名登录。

其他

# 日志目录
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs

# 查看应用默认端口
Middleware servers > server01 > Ports
9080

# 调整 JVM 内存大小
Middleware servers > server01 > Process definition > Java Virtual Machine
Initial heap size 2048MB
Maximum heap size 4096MB

# 调整 JVM 线程
Middleware servers > server01 > Thread pools > WebContainer
Minimum Size  100
Maximum Size  300

# 调试 JDBC 线程池
JDBC providers > Oracle JDBC Driver (XA)

Contents of  /opt/IBM/WebSphere/AppServer/installableApps
PerfServletApp.ear

参考文献

作者: aisuhua