资源描述
1. 布署方案参考
如上图所表示,中间件平台关键包含两大部分:
l 负载分发层
n 包含两台服务器,经过Heartbeat实现HA,提供浮动IP给用户端,确保了系统不存在单点故障问题
n 负载分发软件采取IBM HTTP Server实现
n 经过IBM HTTP Server配置虚拟主机,实现对不一样应用请求进行分发到不一样后台WAS中间件集群。
l WAS中间件集群
n 包含两台4CPU(每CPU 4Core)服务,每个服务器上经过水平扩展能够开启多个WAS服务器。
n 基于应用布署要求,为每个应用建立一个集群,逻辑上实现应用之间隔离。
n 每个集群能够依据应用负载,动态分配WAS服务器实例数。如HR应用访问量较大则分配4个WAS实例。
n 但最小要确保一个集群最少包含2个WAS实现,而且这两个实例分别在不一样物理服务器上,这么才能确保不出现单点故障。
n 布署管理器,布署在WAS Server1上。
2. WebSphere 7安装及配置
此安装配置说明仅供参考,还需要依据现场实现情况进行调整。
2.1. WAS安装
一、 四台服务器拓朴结构
四台机器IP地址,名称和安装内容
主机名
IP
安装软件(组件)
app1
WASND 7.0( WAS)(DM+APPSRV01)
app2
WASND7.0( WAS)( APPSRV01)
web1
HIS+PLUGINS
web2
HIS+PLUGINS
其中DM控制台管理用户admin,口令
两个web服务器管理用户也是admin,口令
二、 安装后验收
http://**.**.**.**:9060/ibm/console 可打开应用服务器主机控制管理台,管理用户admin,口令******
服务器->集群下建有应用集群
服务器->应用服务器下建有两个WEB服务
节点共有五个,分别是一个控制节点(一个dmgr节点),两个受控节点(两个app节点),两个非受控节点(两个web节点)
集群下各受控节点已同时,并开启服务;两个WEB服务已生成插件、传输插件并开启。
在DMGR控制管理台可直接控制两个WEB开启和停止。
三、 安装前系统检验
ü 群集安装时,确定全部机子日期要一致
ü 确定磁盘空间足够
两个应用服务器安装文件放在/was_install
两个WEB服务器安装文件放在/http_install
安装目录全部是安装于默认/opt目录下
两个应用服务器安装后生成目录 /opt/IBM/WebServer/AppServer
两个WEB服务器安装后生成目录/opt/IBM/HTTPServer
两个WEB服务器目录/opt/IBM/HTTPServer/plugins放有插件
ü 确定管理域之内全部机器主机名和ip地址相互能够ping通
在安装前,要确保四台机/etc/hosts文件里面增加四台机ip和主机名,修改以下
**.**.**.1 app1
**.**.**.2 app2
**.**.**.3 web1
**.**.**.4 web2
(对于首次安装系统后主机,因为没有在HOSTS文件中增加这类统计,会造成安装失败,现象是安装后生成profiles不完整,而且startManager.sh实施失败,开启不了管理服务。
另外,安装完WAS后,不能修改主机名,不然WAS服务开启不了,需要重新安装)
ü 确定主机名在生产环境中不会再改变
ü 四台主机做好设置,能够用xmanager进行图形化安装。如不能进行图形化安装,则需要修改was或his下responsefile.txt文件中各参数,工作量大而且易犯错。
ü 安装介质已经有, was7.0 nd for linux x86-64 bit
对于was7.0 ,对于操作系统和硬件空间要求以下:
The following list identifies the products that are supported when WebSphere Application Server runs on the Linux x86-64 operating system. It is not necessary to run these products on the same machine or operating system as WebSphere Application Server.:
Operating Systems supported with 64-bit WebSphere Application Server
· Red Hat Enterprise Linux AS, Version 4 with Update 6
· Red Hat Enterprise Linux ES, Version 4 with Update 6
· Red Hat Enterprise Linux, Version 5
Red Hat Enterprise Linux product site
· SUSE Linux Enterprise Server, Version 9 with SP4
· SUSE Linux Enterprise Server, Version 10 with Update 1
· SUSE Linux Enterprise Server, Version 11 (See Required Detail 6)
· SUSE Linux Enterprise Server product site
Hardware Requirements
· AMD Opteron and Intel EM64T (64 bit kernel support only)
· Disk space requirements
· Minimum 1 GB physical memory recommended
· CD-ROM drive
四、 把安装程序包放到主机/was_install目录下,解压,解包
命令gunzip *.gz
Tar xvf *.tar
五、 图形化安装过程(用XMANAGER3.0实施安装)
1、应用服务器主机36安装was过程以下各步:
进入linux环境,打开终端,打开文件系统,在\was_install\was_ins\目录下launchpad.sh ,双击运行
选择左面列表第一项,进行was安装,
进入下一个安装画面
选择接收协议
系统进行安装前检验,检验版本,软硬件环境,检验经过
Sample例程选择,安装(此例程可用来学习参考检验用),两个语言包也选择上,一并安装
默认安装到OPT目录下/opt/IBM/WebSphere/AppServer
app1主机是管理控制主机,选择安装CELL(会安装dmgr01和appsrv01,而且自动联结),
app2只安装一个Application Server(APPSRV01),这是两台应用服务器安装过程唯一区分
管理用户和口令分别设为admin,admin, Samples口令也设为sample
此步不选择,跳过
安装前检验实施权限,因为是用root用户实施安装,权限检验肯定经过
权限经过,安装过程总结以下
点next后,进行安装
安装完成
安装后成功,在app1主机下/opt/IBM/WebServer/AppServer/profiles目录下可看到DMGR01,APPSRV01两个目录。其中DMGR01是管理台概要文件,只在app1主机上有。
一样,在主机app2机上安装was后,在app2下/opt/IBM/WebServer/AppServer/profiles目录下可看到APPSRV01一个目录。
在app1主机下profiles\DMGR01\FIRSTSTEPS目录下,
运行firststeps.sh,可进行安装后检测
检测结果经过,请注意蓝色字体:
Server name is:dmgr
Profile name is:Dmgr01
Profile home is:/opt/IBM/WebSphere/AppServer/profiles/Dmgr01
Profile type is:dmgr
Cell name is:app1_Cell01
Node name is:app1_CellManager01
Current encoding is:UTF-8
Start running the following command:/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/startManager.sh -profileName Dmgr01
>ADMU0116I: Tool information is being logged in file
> /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/dmgr/startServer.log
>ADMU0128I: Starting tool with the Dmgr01 profile
>ADMU3100I: Reading configuration for server: dmgr
>ADMU3200I: Server launched. Waiting for initialization status.
>ADMU3000I: Server dmgr open for e-business; process id is 32586
Server port number is:9060
IVTL0010I: Connecting to the APP1 WebSphere Application Server on port: 9060
IVTL0015I: WebSphere Application Server APP1 is running on port: 9060 for profile Dmgr01
IVTL0035I: The Installation Verification Tool is scanning the /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/dmgr/SystemOut.log file for errors and warnings.
[11/2/09 23:27:40:343 CST] 00000000 WSKeyStore W CWPKI0041W: One or more key stores are using the default password.
[11/2/09 23:27:42:466 CST] 00000000 ThreadPoolMgr W WSVR0626W: The ThreadPool setting on the ObjectRequestBroker service is deprecated.
IVTL0040I: 2 errors/warnings are detected in the /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/dmgr/SystemOut.log file
IVTL0070I: The Installation Verification Tool verification succeeded.
IVTL0080I: The installation verification is complete.
上述显示说明安装正常,DMGR服务可正常开启。访问端口是9060
此时到IE,可打开控制台
http://**.**.**.**:9060/ibm/console
选择继续浏览此网站,
进入主控画面
输入admin,******
此时在服务器能够看到一个SERVER1,但没有开启代理服务前,前台是不能开启。
需到服务器下运行。
[root@APP1 bin]# cd Profiles/AppSrv01/bin
[root@APP1 bin]# ./startNode.sh
节点代理开启
ADMU0116I: Tool information is being logged in file
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/nodeagent/startServer.log
ADMU0128I: Starting tool with the AppSrv01 profile
ADMU3100I: Reading configuration for server: nodeagent
ADMU3200I: Server launched. Waiting for initialization status.
ADMU3000I: Server nodeagent open for e-business; process id is 330
此时再到前控制台,可正常开启server1了
(或在服务器下运行命令./startServer.sh Server1 ,一样能够开启服务)
至此,主机36安装并验证完成。
2、主机app1dmgr和appserver启停服务器下命令(如主机重启,需要到服务器下手工实施脚本)
cd /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin
./startManager.sh
开启dmgr01服务,此脚本成功实施后,则可打开前端控制台
再开启节点代理
cd /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin
./startNode.sh
开启节点代理后,则可在前端控制台去开启server1,也可在服务器端直接用脚本开启
./startServer.sh server1
(对应上述开启命令,关闭服务命令分别为)
./stopServer.sh server1
./stopManager.sh -username admin –password ******
3、再去安装app2机
过程同app1机,不一样处只是在概要文件创建里不选择cell,只选择一个application server就行了。
安装实施完成后,检验profiles下,已经有appsrv01
至其下bin实施以下脚本,关联节点NODE2到主机36DMGR服务节点
cd /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin
./addNode.sh **.**.**.** 8879
其中IP地址是主机36IP,后面8879是SOP端口。
输入app1上DMGR01管理用户admin,口令******
实施成功
[root@AAAAAPP2-****** bin]# ./addNode.sh **.**.**.36 8879
ADMU0116I: Tool information is being logged in file
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/addNode.log
ADMU0128I: Starting tool with the AppSrv01 profile
CWPKI0308I: Adding signer alias "CN=APP1, OU=Root Cer" to local
keystore "ClientDefaultTrustStore" with the following SHA digest:
B5:37:07:88:00:A4:78:10:95:B0:56:17:3C:8D:A9:A7:C0:BD:76:3F
Realm/Cell Name: <default>
Username: admin
Password:
CWPKI0308I: Adding signer alias "datapower" to local keystore
"ClientDefaultTrustStore" with the following SHA digest:
A9:BA:A4:B5:BC:26:2F:5D:2A:80:93:CA:BA:F4:31:05:F2:54:14:17
ADMU0001I: Begin federation of node AAAAAPP2-******Node01 with Deployment
Manager at **.**.**.36:8879.
ADMU0009I: Successfully connected to Deployment Manager Server:
**.**.**.36:8879
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: server1
ADMUI: Stopping all server processes for node AAAAAPP2-******Node01
ADMU0512I: Server server1 cannot be reached. It appears to be stopped.
ADMU0024I: Deleting the old backup directory.
ADMU0015I: Backing up the original cell repository.
ADMU0012I: Creating Node Agent configuration for node: AAAAAPP2-******Node01
ADMU0014I: Adding node AAAAAPP2-******Node01 configuration to cell:
APP1Cell01
ADMU0016I: Synchronizing configuration between node and cell.
ADMU0018I: Launching Node Agent process for node: AAAAAPP2-******Node01
ADMU0020I: Reading configuration for Node Agent process: nodeagent
ADMU0022I: Node Agent launched. Waiting for initialization status.
ADMU0030I: Node Agent initialization completed successfully. Process id is:
6848
ADMU0300I: The node AAAAAPP2-******Node01 was successfully added to the
APP1Cell01 cell.
ADMU0306I: Note:
ADMU0302I: Any cell-level documents from the standalone APP1Cell01
configuration have not been migrated to the new cell.
ADMU0307I: You might want to:
ADMU0303I: Update the configuration on the APP1Cell01 Deployment
Manager with values from the old cell-level documents.
ADMU0306I: Note:
ADMU0304I: Because -includeapps was not specified, applications installed on
the standalone node were not installed on the new cell.
ADMU0307I: You might want to:
ADMU0305I: Install applications onto the APP1Cell01 cell using
wsadmin $AdminApp or the Administrative Console.
ADMU0003I: Node AAAAAPP2-******Node01 has been successfully federated.
此时再到app1主机DMGR控制台能够看到节点app2主机SERVR1
能够开启app2机上SERVER1。(至app2机上profiles/appsvr01/bin下实施./startServer.sh server1也可)
六、 两应用服务器建集群。把app1和app2应用服务放在集群中
1、删除两个应服务器下单个SERVER。
停止两个服务后,删除,保留设置
把单个服务器删除
2、建集群,起名HR_cluster
注意:把配置HTTP会话内存到内存复制勾上。“下一步”,
分别对应两应用服务主机,各一个SERVER,分别名称为
app1
app2
集群建完后以下
3、到系统管理->节点 中同时各节点
4、开启集群
集群可正常开启
至此,两台应用服务器集群安装完成!
七、 安装WEB服务器
33机安装HTTP SERVER和PLUGINS插件
程序安装包在/http_install目录下,解压解包后,实施http_ins/ihs/目录下install.sh文件,用xmanager来实施该文件进行安装。
安装画面以下:
第一步设置端口,选择默认
Web1机http port 80
http administration port 8008
后面一步,在设置插件安装目录和应用服务器主机名称那里,
33对应插件安装目录是默认/opt/IBM/HTTPServer/plugins
对应应用服务主机名设为 app1
(注意:34那台机安装httpserver时,选择对应应用服务主机设为app2,其它过程全部相同)
注意在管理用户和口令那里设置为admin,******
注意:因为这两个web服务器要经过另外一台应用服务器dmgr来管理,所以这里安全管理用户和口令要设。不然dmgr上无法管理启停。
下面这一步,设置用户和组分别为nobody,nobody
(注意:这个用户和组在etc/group,passwd,shadow中要有)
33上WEB服务器安装完成
34上HTTPSERVER完装过程类似,只是先把对应应用服务器主机名设为app2
八、 两台WEB服务器开启过程
正常过程:
在两台WEB服务器下,HTTPServer/bin目录下,实施以下脚本,启停apache服务
./apachectl start
./adminctl start
提醒./adminctl start: admin http started
九、 回到app1DMGR主控制台,建立WEB服务节点和开启管理。
选择系统管理->节点,
增加非受管制两个WEB节点(前面两个app节点是受管制节点)
点添加,选择非受管节点
为WEB1机上节点命名并设置主机名称
非受管节点名称:webnode1
主机名:web1
第一个节点添加成功
再一样操作继续添加第二个非受管节点
非受管节点名称:webnode2
主机名:web2
然后回到服务器类型下,选择WEB服务器,选择两个非受管节点,分别去创建webserver1
下一步后,增加设置属性,管理用户和口令 .用户和口令是在WEB机上安装HTTP SERVER时设置admin,admin
完成第一个WEB节点上WEBSERVER创建
同上操作再去完成第二个web服务节点webserver1创建。
两个全部创建完成后。选择生成插件,
生成插件成功,提醒以下:
PLGC0005I: Plug-in configuration file = /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/APP1Cell01/nodes/webnode1/servers/webserver1/plugin-cfg.xml
PLGC0052I: Plug-in configuration file generation is complete for the Web server. APP1Cell01.webnode1.webserver1.
PLGC0005I: Plug-in configuration file = /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/APP1Cell01/nodes/webnode2/servers/webserver1/plugin-cfg.xml
PLGC0052I: Plug-in configuration file generation is complete for the Web server. APP1Cell01.webnode2.webserver1.
传输插件成功,提醒以下:
PLGC0062I: The plug-in configuration file is propagated from /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/APP1Cell01/nodes/webnode1/servers/webserver1/plugin-cfg.xml to /opt/IBM/HTTPServer/Plugins/config/webserver1/plugin-cfg.xml on the Web server computer.
PLGC0048I: The propagation of the plug-in configuration file is complete for the Web server. APP1Cell01.webnode1.webserver1.
PLGC0062I: The plug-in configuration file is propagated from /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/APP1Cell01/nodes/webnode2/servers/webserver1/plugin-cfg.xml to /opt/IBM/HTTPServer/Plugins/config/webserver1/plugin-cfg.xml on the Web server computer.
PLGC0048I: The propagation of the plug-in configuration file is complete for the Web server. APP1Cell01.webnode2.webserver1.
两个WEB服务已建立,并可经过DMGR 来控制启停。
2.2. 安装补丁安装工厂,并打补丁
1.进入目录/tmp/WAS7LINUX/Linux_suppl/ UpdateInstaller(依据实际路径调整),实施install命令,以下图所表示:
2.出现以下页面,点击“Next”:
3.出现以下页面,选择“I accept…”,点击“Next”:
4.在出现页面上点击“Next”(出现“Passed”表示补丁安装安装工厂安装程序经过对操作系统检验);
5.出现以下页面,确定安装目录为“/websphere/UpdateInstaller”,点击“Next”:
目录为“websphere/UpdateInstaller”
6.在出现页面上点击“Next”;
7.等候进度条行进至100%
8.出现以下页面,选择“Launch IBM Update Installer for WebSphere software on exit”(这一步会在结束补丁安装工厂安装后,自动开启补丁安装工厂),点击“Finish”;
9.拷贝补丁文件至目录/ websphere/UpdateInstaller/maintenance下:
cp /tmp/WAS7LINUX/pack/*.pak websphere/UpdateInstaller/maintenance/(路径依据实际情况修改)
10.在拷贝补丁文件同时,补丁安装向导可能会自动弹出(注:假如该页面没有自动弹出,请实施/ websphere/UpdateInstaller/update.sh),以下图所表示。请确定已经实施过上一步后,再点击“Next”:
11.出现以下页面,确定WAS安装目录为“/websphere/AppServer”,点击“Next”:
目录为“websphere/AppServer”
12.出现以下页面,确定选择了“Install maintenance package”,点击“Next”:
13.出现以下页面,确定该目录下确实存在补丁文件,即为第9)步已拷贝文件到该目录下,或,选择想要安装补丁文件所在目录,点击“Next”:
注意:
l 安装补丁时,需要确保目前没有WAS进程在运行,使用ps –ef |grep java命令查看。
目录为“websphere/UpdateInstaller/maintenance/”
14.出现以下页面,选中全部需要安装补丁文件,点击“Next”:
15.出现以下页面,点击“Next”:
16.等候进度条行进至100%
17.出现以下页面,点击“Finish”:
18.查看版本,确定补丁安装成功:
实施:/ websphere/AppServer/bin/versionInfo.sh
出现以下页面。注意最终10行以内内容。Version应为:7.0.0.13
2.3. 创建概要文件
1.创建概要文件
--用root 用户登录进入目录
cd /websphere/AppServer
--生成profiles目录并指定目录全部者
mkdir profiles
chown -R wsuser:usr /websphere/AppServer
--进入目录
cd /websphere/AppServer/bin
--创建概要文件
./manageprofiles.sh -create -profileName AppSrv01 -profilePath /websphere/AppServer/profiles/AppSrv01 -templatePath /websphere/AppServer/profileTemplates/default -hostName hnnyyx1srv2(-hostName 后面名字为安装was本机计划好名字,名字不要有下划线等其它字符)
--如创建错误,需要删除AppSrv01时,用Root用户使用以下命令,创建正确时,不需实施
cd /websphere/AppServer/bin
./manageprofiles.sh -delete -profileName AppSrv01
2.用root用户开启应用程序
cd / websphere/AppServer/ profiles /AppSrv01/bin/
./startServer.sh server1
3.进后台管理器设置安全性(目标:设置后,只能wasadmin用户能够管理was控制台)
(1)在IE里录入http://*.*.*.*:9061/admin进入后台管理界面
(2)在“安全性-全局安全性”界面中“可用域定义”选择“联合存放库”,点击“设置为目前”,然后点击“配置...”进入属性设置界面,操作步骤以下图:
4.点击“配置...”进入下图界面
2.选择联合存放库
1.全局安全性
3.点下‘设置为目前’
(3)、在下图界面中输入“关键管理用户名”为“wasadmin”,点击确定后进入密码验证界面,录入两遍相同密码:was123,以后点击“确定”
5.录入wasadmin后点“确定”,在密码验证界面,录入两遍密码:was123,点击“确定”,回到下图界面
(4)选中“启用管理安全性”并去除“应用程序安全性”及“JAVA2安全性”选项,再次选中“联合存放库”,点击“设置为目前”,然后点击“应用”,最终点击“保留”完成安全性设置。
6.选中“联合存放库”
7.勾选
9.不勾选
8.不勾选
11.点“应用”
10.点击“设置为目前”
全局安全性
12.点“保留”完成安全性设置
4.停止应用程序
--用wsuser用户
cd /websphere/AppServer/profiles /AppSrv01/bin/
./stopServer.sh server1 -username wasadmin -password was123
5.开启应用程序
--用wsuser 用户
cd /websphere/AppServer/profiles/AppSrv01/bin/
./startServer.sh server1 -username wasadmin -password was123
2.4. 创建和配置数据源
1.假如WebSphere Application Server实例未运行(查看实例是否运行,能够在操作系统上用命令ps –ef | grep java查看。假如没有从/websphere/IBM/WebSphere/AppServer目录下提议java进程,则未运行),则开启WebSphere应用服务器运行实例
展开阅读全文