动静分离实现 应用服务器websphere,web服务ihs

系统版本:

# uname -a
AIX p615app 3 5 00575D2D4C00


websphere安装:

过去我们安装WAS6 的时候,基本上都采用界面化安装的方法,这种方法简单方便。但是有时候,我们在安装的时候服务器没有图形界面,或者远程安装而无法连接图形界面时,我们可以采用命令行安装的方式,即静默安装。下面就介绍一下如何进行命令行安装(静默安装---silent installation

一、WAS程序安装

1、上传文件:

1:首先从139/home/edsmp/was6目录下的war.tar文件,通过ftp下载到150机器。

2uname -a命令,查看系统版本。

3cd/usr 目录下,运行 tar -xvf was.tar 

4:解压后在WAS文件夹下有个responsefile.nd.txt文件,这个文件是WAS静默安装的配置文件,编辑该文件,并修改如下内容:

-OPT silentInstallLicenseAcceptance="true"     接受License

-OPT allowNonRootSilentInstall="true"         是否允许非root用户安装

-OPT disableOSPrereqChecking="true"         取消对系统的检测

-OPT installType="installNew"                      是否全新安装

-OPT feature="noFeature"                            不安装示例

-OPT installLocation="/opt/IBM/WebSphere/AppServer"     安装路径

-OPT profileType="none"                               不生成概要

-OPT PROF_enableAdminSecurity="false"       不设置管理员安全

5:

进入 /home/zhangna/was61_base/WAS 目录,执行

./install -options responsefile.nd.txt -silent

6

如果没有安装成功,如何检查。

由于静默安装没有提示,我们不知道有没有安装成功,尤其是刚执行安装命令后,程序什么提示都没有,就很快结束。这通常都是没有安装成功。这里提供一个检查问题的方法。在用户文件夹下有个waslogs文件夹,这是执行静默安装时自动生成的日志文件,记录了没有安装成功的事件,可以通过日志来判断系统或配置文件哪方面出现了问题。我这里采用root用户安装的,因此在/root文件夹下有waslogs文件夹。

安装日志:/usr/IBM/WebSphere/AppServer/logs/install/log.txt

7:

通过创建profiles来验证是否安装成功

 

 /usr/IBM/WebSphere/AppServer/bin/manageprofiles.sh -create -profileName AppServer01 -profilePath /usr/IBM/WebSphere/AppServer/profiles/AppServer01/ -templatePath /usr/IBM/WebSphere/AppServer/profileTemplates/default

安装信息:/usr/IBM/WebSphere/AppServer/profiles/AppServer01/logs/AboutThisProfile.txt

8:

启动profiles 并检查监听是否运行:

进入新创建的概要AppServer01/bin文件夹执行下面命令

# sh startServer.sh server1

日志信息:/usr/IBM/WebSphere/AppServer/profiles/AppServer01/logs/server1/startServer.log

# netstat -an |grep  906


9:

补丁工厂的安装

获取升级工具up.tar,升级包:fix.tar,ihs升级文件ihs.tar

1:上传补丁工厂程序并解压,解压后进入UpdateInstaller文件夹,并编辑responsefile.updiinstaller.txt文件,修改文件中如下内容:

 

-OPT silentInstallLicenseAcceptance="true"  --安装License

 

-OPT allowNonRootSilentInstall="true"  --允许非root用户安装

 

-OPT disableOSPrereqChecking="true"  --禁止系统检测

 

-OPT installLocation="/opt/IBM/WebSphere/UpdateInstaller" –指定安装路径,如果是AIX系统路径为

 

-OPT installLocation="/usr/IBM/WebSphere/UpdateInstaller"

 

-OPT skipStartMenu=true  --仅限于linuxwindows系统


2:

编辑好上面文件后,执行如下命令进行安装:

 

# ./install -options responsefile.updiinstaller.txt -silent

 

命令执行完成后会在/usr/IBM/WebSphere生成新文件夹UpdateInstaller

 

 

 

 

3

 

至此,补丁工厂安装完成。下面就可以通过补丁工厂程序进行补丁升级

补丁升级

1

 

上传补丁并解压。

 

注意:如果有多个补丁时,补丁的顺序是由低到高。


2

 

进入/usr/IBM/WebSphere/UpdateInstaller/responsefiles文件夹,编辑install.txt文件。修改如下内容:

 

-OPT checkFilePermissions="true"   --检测文件系统权限

 

-W maintenance.package="/was6/6.1.0-WS-WAS-LinuxX64-FP0000039.pak" –指明补丁包路径

 

-OPT rootUserHasRunSlibcleanCommandSuccessfully="true" AIX系统设定,其他系统不用

 

-W product.location="/opt/IBM/WebSphere/AppServer" –指明要升级的was的路径

 

-W update.type="install"  --必须指明

 

 

 

 

 

3

 

文件保存后,执行升级命令:

 

#  ./update.sh -options responsefiles/install.txt -silent

 

 

4

 

升级完成后,观察补丁升级是否成功:

 

# /opt/IBM/WebSphere/AppServer/bin/versionInfo.sh

 

 

 

END

 

升级日志目录:/usr/IBM/WebSphere/AppServer/logs/update/6.1.0-WS-WAS-AixPPC64-FP0000027.install

至此,补丁和websphere安装完毕


WAS创建Dmgr和AppSrv
#创建一个管理节点

./manageprofiles.sh -create \
-templatePath /usr/IBM/WebSphere/AppServer/profileTemplates/cell/dmgr \
-nodeProfilePath /usr/IBM/WebSphere/AppServer/profiles/Dmgr01 \
-profileName Dmgr01 \
-cellName testCell01 \
-nodeName testCell01Manager01 \
-appServerNodeName testCell01Node01 \
-enableAdminSecurity true \
-adminUserName wasadmin \
-adminPassword password \
-validatePorts

INSTCONFSUCCESS: Success: Profile Dmgr01 now exists. Please consult /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/AboutThisProfile.txt for more information about this profile.


#创建一个受管节点

./manageprofiles.sh -create \
-profileName AppSrv02 \
-profilePath /opt/IBM/WebSphere/AppServer/profiles/AppSrv02 \
-templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/managed \
-nodeName testCell01Node02 \
-isDefault \
-enableAdminSecurity true \
-validatePorts

INSTCONFSUCCESS: Success: Profile Dmgr01 now exists. Please consult /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/AboutThisProfile.txt for more information about this profile



#静默卸载
.uninstall -silent

#删除安装目录

cd /usr/IBM
rm -rf *

#删除残余文件
rm -rf vpd.properties

删除节点
su - rpt
./manageprofiles.sh -listProfiles
[AppSrv01, server1]
#server
cd /rpt/IBM/WebSphere/AppServer/bin
./stopServer.sh server1
./manageprofiles.sh -delete -profileName server1
./manageprofiles.sh -delete -profileName AppSrv01
cd /rpt/IBM/WebSphere/AppServer/profiles
ls -lrt
删除server1 rm -rf server1
二、创建管理节点
./manageprofiles.sh -create -templatePath /rpt/IBM/WebSphere/AppServer/profileTemplates/dmgr -profileName Dmgr01 -profilePath /rpt/IBM/WebSphere/AppServer/profiles/Dmgr01 -enableAdminSecurity true -adminUserName admin -adminPassword admin -hostName 'dyrpt'
三、创建node
./manageprofiles.sh -create -templatePath /rpt/IBM/WebSphere/AppServer/profileTemplates/managed -profileName AppSrv01 -profilePath /rpt/IBM/WebSphere/AppServer/profiles/AppSrv01
四、启动管理节点
cd /rpt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin
./startManager.sh
五、添加受管节点 
/rpt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/addNode.sh dyrpt 8879
启动nodestartnode.sh


查看控制台端口号:

项目中需要进行双机中资源的接管工作,其中需要暂停一下WAS,但是在重启后发现无法通过浏览器登陆控制台,但是门户可以正常访问使用。经过各种排查,管理员感觉是对WAS端口号记忆模糊,想查询一下端口号,虽然经过文档查询发现默认端口号已修改,但是笔者还是想弄明白如何在系统中确定WAS的端口信息。

 经查询,在路径:
/usr/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/testAPPCell01/nodes/testAPPCellManager01 下有一个serverindex.xml文件(上述路径中的testAPPCell01与testAPPCellManager01请根据具体环境自行修改),里面有各种端口的定义,可供查询,如需修改,也可以操作该端口或者是在控制台中修改。

 

 

添加受管节点

sh addNode.sh p615 8881


150生成插件:

PLGC0005I: Plug-in configuration file = /usr/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/testCell01/nodes/IHS_RNode/servers/ihs/plugin-cfg.xml

PLGC0052I: Plug-in configuration file generation is complete for the Web server testCell01.IHS_RNode.ihs.

PLGC0005I: Plug-in configuration file = /usr/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/testCell01/nodes/IHS_RNode/servers/ihs/plugin-cfg.xml

PLGC0052I: Plug-in configuration file generation is complete for the Web server testCell01.IHS_RNode.ihs.

 

 

 

传播插件:

PLGC0062I: The plug-in configuration file is propagated from /usr/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/testCell01/nodes/IHS_RNode/servers/ihs/plugin-cfg.xml to /usr/IBM/HTTPServer/Plugins/config/ihs/plugin-cfg.xml on the Web server computer.

PLGC0048I: The propagation of the plug-in configuration file is complete for the Web server testCell01.IHS_RNode.ihs.

 




以下为转载的,配置成功基本参考了下面的文章,虽然系统不同,但是大致原理一致:










































参考操作,从第三步开始,因为本身的ihs已经安装完毕


138启动和关闭apache

Cd /usr/IBM/HTTPServer/bin/

./adminctl stop

./adminctl start

./apachectl stop

./apachectl start

另外在表 TDCTPCFG 里配置的文件发布路径,必须跟 /usr/IBM/HTTPServer/conf/httpd.conf 里配置的DocumentRoot一致

 

 

 (20014)Error string not specified yet: Error retrieving pid file logs/httpd.pid

 

错误:

其实这个错误就是因为Apache目录下的 logs 子目录下的 httpd.pid 文件内容是空的。这个文件是记录进程ID的文件。因为这个文件是空的,就无法启动,实在是超雷人。你随便写点数字进去,再启动Apache,就可以成功了。

 

 

 

 

 

体验平台res目录访问不到,403错误,需要修改文件夹和文件权限,命令:

chmod 755 






  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值