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

猜你喜欢

转载自blog.csdn.net/weixin_38645718/article/details/83448181