【发布时间】:2020-01-09 07:43:36
【问题描述】:
我正在使用 Ansible 在 CentOS 7 上自动部署 HCL Connections 6.5。它已经包括 IBM IM、WAS(Dmgr + Node)、DB2 和 Connections 本身。 HTTP Server (IHS) 已安装,但现在我需要对其进行配置。我需要使用 WCT 配置 WebSphere 插件。
出于教育目的,我过去在另一个使用 GUI 模式的测试服务器上这样做过:
cd /opt/IBM/WebSphere/Toolbox/WCT
./wct.sh
现在我们得到一个向导,其中包含几个步骤,询问插件位置、网络服务器定义名称、HTTP 服务器的端口等等。
自动化向导
我找到了wctcmd.sh
作为 CLI 等效于 wtc.sh 来自动配置网络服务器。所以我做了以下响应文件
configType=remote
enableAdminServerSupport=true
enableUserAndPass=true
enableWinService=false
ihsAdminCreateUserAndGroup=true
ihsAdminPassword=password
ihsAdminPort=8008
ihsAdminUnixUserGroup=ihsadmin
ihsAdminUnixUserID=ihsadmin
mapWebServerToApplications=true
wasMachineHostname=cnx65.internal
webServerConfigFile1=/opt/IBM/HTTPServer/conf/httpd.conf
webServerDefinition=webserver1
webServerHostName=cnx65.internal
webServerOS=operating_system_value
webServerPortNumber=80
webServerSelected=ihs
然后像这样运行wctcmd.sh:
cd /opt/IBM/WebSphere/Toolbox/WCT
./wctcmd.sh -tool pct -createDefinition -defLocPathname /opt/IBM/WebSphere/Plugins -response resp-file
表示该工具已成功执行。但是当我打开网络服务器配置/opt/IBM/HTTPServer/conf/httpd.conf 时,它添加了以下两行:
LoadModule was_ap22_module ${WAS_PLUGIN_DRIVER}
WebSpherePluginConfig /opt/IBM/WebSphere/Plugins/config/webserver1/plugin-cfg.xml
此变量未定义并在启动网络服务器时引发错误:
# /opt/IBM/HTTPServer/bin/apachectl start
httpd: Syntax error on line 915 of /opt/IBM/HTTPServer/conf/httpd.conf: Cannot load ${WAS_PLUGIN_DRIVER} into server: ${WAS_PLUGIN_DRIVER}: cannot open shared object file: No such file or directory
我假设${WAS_PLUGIN_DRIVER} 的存在表明wctcmd.sh 出现问题,因为我查看了另一台手动安装了Connections 6(带有GUI)的测试服务器,而手动安装的服务器在那里没有变量:
LoadModule was_ap22_module /opt/IBM/WebSphere/Plugins/bin/64bits/mod_was_ap22_http.so
WebSpherePluginConfig /opt/IBM/WebSphere/Plugins/config/webserver1/plugin-cfg.xml
一位在 WebSphere/Connections 方面拥有超过 10 年经验的顾问证实,当一切正常时,LoadModule was_ap22_module /opt/IBM/WebSphere/Plugins/bin/64bits/mod_was_ap22_http.so 是正确的,因此应该没有变量。
问题
- 为什么该工具将
${WAS_PLUGIN_DRIVER}变量放在我的 http 配置中而不解析它们? - 发生这种情况我做错了什么?
【问题讨论】:
-
这和 ansible 有什么关系?
-
删除了该标签,这样它就不会混淆用户的提要
-
我首先考虑到我的 Ansible 剧本添加了它,我想在其中运行此命令。但为简单起见,我只发布了没有 Ansible 部分的命令,因为它与问题无关。但是你是对的,这会让 Ansible 标记过时。
标签: websphere websphere-8 ibm-connections