现在的位置: 首页 > 综合 > 正文

WAS 创建Profile 端口设定方法

2014年08月10日 ⁄ 综合 ⁄ 共 14764字 ⁄ 字号 评论关闭
wasprofile 命令
wasprofile 命令行工具在 V6 中创建所有 Application Server 运行时环境。该命令创建概要文件,即为 独立应用程序服务器定义运行时环境的文件集合。
也可以使用概要文件创建工具图形用户界面来创建和管理概要文件。
 
--------------------------------------------------------------------------------
相关信息
使用命令行工具
描述 V6 概要文件的术语的简介
wasprofile 命令在称为概要文件的文件集中为 WebSphere Application Server 进程创建运行时环境。该概要文件定义运行时环境并包括运行时环境中服务器进程可以更改的所有文件。
概要文件创建工具及其图形用户界面概要文件创建向导是在 V6 中创建运行时环境的唯一方法。
概要文件创建向导是多平台 InstallShield(ISMP)应用程序。您可以使用向导输入本主题中描述的大多数参数。然而,一些参数需要您使用 wasprofile 命令。例如,您必须使用 wasprofile 命令删除概要文件,因为概要文件创建向导不提供删除功能。
然而,概要文件创建向导还执行 wasprofile 命令不执行的任务。例如,向导可以为它创建的每个概要文件创建 Windows 服务。它还可以根据以前的 V6 端口指定指定非冲突的端口。
wasprofile 脚本的位置
命令文件位于 app_server_root/bin 目录。
命令文件是一个脚本,它名为:
  wasprofile.sh
 wasprofile.bat
概要文件创建向导是命令行工具的图形用户界面。调用概要文件创建向导的命令的文件名随操作系统平台改变。请参阅使用图形用户界面来创建概要文件 ,以了解更多信息。
记录
wasprofile 命令为它创建的每个概要文件创建日志。日志位于 app_server_root/logs/wasprofile 目录中。这些文件以此模式命名:profile_name_create.log。
命令还为它删除的每个概要文件创建日志。日志位于 app_server_root/logs/wasprofile 目录中。这些文件以此模式命名:profile_name_delete.log。
并行概要文件创建
重要: 对于一组核心产品文件,此时不支持并行概要文件创建。尝试并行创建概要文件的结果是生成一个警告,说明已经在创建概要文件。
 
在多个行上输入 lengthy 命令
wasprofile 命令的长度不能超过正常 shell 窗口的一行 256 个字符的限制。如果命令比限制长,那么在多个行上发出命令并用反斜杠结束行,按 Enter 键,并在下一行继续命令。
例如,在 Solaris 系统上,在多个行上需要输入以下命令:
./wasprofile.sh /
-create -profileName bladetcb6profile /
-profilePath /usr/IBM/WebSphere/AppServer/profiles/bladetcb6profile /
-templatePath /usr/WebSphere/AppServer/profileTemplates/default /
-nodeName bladetcb6node /
-cellName bladetcb6Cell /
-hostName bladetcb6.rtp.raleigh.ibm.com
从最后一行省略行连续字符以表明操作系统的命令结束。
 
wasprofile.sh 命令语法
获取该命令的帮助。
# ./wasprofile.sh -help
# ./wasprofile.sh -augment -help
                
# ./wasprofile.sh -create -help
# ./wasprofile.sh -create -templatePath fully_qualified_path/dmgr -help
# ./wasprofile.sh -create -templatePath fully_qualified_path/default -help
# ./wasprofile.sh -create -templatePath fully_qualified_path/managed -help
                
# ./wasprofile.sh -delete -help
                
# ./wasprofile.sh -getName -help
# ./wasprofile.sh -getPath -help
                
# ./wasprofile.sh -unaugment -help
                
# ./wasprofile.sh -validateRegistry -help
# ./wasprofile.sh -validateAndUpdateRegistry -help
列出现有的概要文件:
# ./wasprofile.sh -listProfiles
                 [-debug]
                
删除概要文件:
# ./wasprofile.sh -delete
                  -profileName profile_name
创建新的概要文件:
# ./wasprofile.sh -create
              -profileName profile_name               -profilePath fully_qualified_profile_path
              -templatePath template_path
              -nodeName node_name
              -cellName cell_name
              -hostName host_name
             [-isDefault]
             [-startingPort starting_port | -portsFile file_path]
             [-debug]
            
从现有概要文件的路径获取其名称:
# ./wasprofile.sh -getName
                 -profilePath profile_path
                [-debug]
               
从现有概要文件的名称获取其路径:
# ./wasprofile.sh -getPath
                 -profileName profile_name                 [-debug]
               
检查概要文件注册表的完整性:
# ./wasprofile.sh -validateRegistry
                [-debug]
               
检查概要文件注册表的完整性,除去未找到的概要文件:
# ./wasprofile.sh -validateAndUpdateRegistry
                 [-backup file_name]
                 [-debug]
               
使用扩充模板文件更新现有的概要文件:
# ./wasprofile.sh -augment
              -profileName profile_name               -templatePath fully_qualified_template_path
除去概要文件的最新扩充:
# ./wasprofile.sh -unaugment
              -profileName profile_name
 
wasprofile.bat 命令语法
获取该命令的帮助。
# ./wasprofile.bat -help
# ./wasprofile.bat -augment -help
                
# ./wasprofile.bat -create -help
# ./wasprofile.bat -create -templatePath fully_qualified_path/dmgr -help
# ./wasprofile.bat -create -templatePath fully_qualified_path/default -help
# ./wasprofile.bat -create -templatePath fully_qualified_path/managed -help
                
# ./wasprofile.bat -delete -help
                
# ./wasprofile.bat -getName -help
# ./wasprofile.bat -getPath -help
# ./wasprofile.bat -unaugment -help
                
# ./wasprofile.bat -validateRegistry -help
# ./wasprofile.bat -validateAndUpdateRegistry -help
列出现有的概要文件:
# ./wasprofile.bat -listProfiles
             [-debug]
            
删除概要文件:
# ./wasprofile.bat -delete
              -profileName profile_name | -profilePath profile_path
             [-debug]
            
创建新的概要文件:
# ./wasprofile.bat -create
              -profileName profile_name               -profilePath fully_qualified_profile_path
              -templatePath template_path
              -nodeName node_name
             [-cellName cell_name]
              -hostName host_name
             [-isDefault]
             [-startingPort starting_port | -portsFile file_path]
             [-winserviceCheck true | false]
             [-winserviceAccountType specified_user | localsystem]
             [-winserviceUserName your_user_name]
             [-winservicePassword your_password]
             [-winserviceStartupType manual | automatic | disabled]
             [-debug]
            
当不使用 -startingPort 参数时,概要文件创建工具使用 serverindex.xml 文件中指定的缺省端口设置。
从现有概要文件的路径获取其名称:
# ./wasprofile.bat -getName
               -profilePath fully_qualified_profile_path
              [-debug]
            
从现有概要文件的名称获取其路径:
# ./wasprofile.bat -getPath
               -profileName profile_name               [-debug]
            
检查概要文件注册表的完整性:
# ./wasprofile.bat -validateRegistry
             [-debug]
            
检查概要文件注册表的完整性,除去任何未找到的概要文件:
# ./wasprofile.bat -validateAndUpdateRegistry
             [-backup file_name]
             [-debug]
            
使用扩充模板文件更新现有的概要文件:
# ./wasprofile.bat -augment
               -profileName profile_name                -templatePath fully_qualified_template_path
除去概要文件的最新扩充:
# ./wasprofile.bat -unaugment
               -profileName profile_name
要获取创建概要文件的特定示例,请参阅示例:使用命令来创建概要文件一节。
参数
支持的参数包括:
-augment
使用 augment 参数以通过扩充模板对现有概要文件进行更改。augment 参数导致 wasprofile 使用 templatePath 参数中的模板更新或扩充在 profileName 参数中标识的概要文件。您可以使用哪些扩充模板取决于您的环境中安装的 IBM 产品及其版本。
注:随 WebSphere Application Server 附带的模板只能用于创建概要文件,不能用于扩充现有的概要文件。此外,不要手动修改 install_dir/ profileTemplates 目录中的文件。例如,如果要在创建概要文件期间修改端口,那么使用“概要文件创建”向导,或对 wasprofile 命令使用 -startingPort 或 -portsFile 参数,而不要修改概要文件模板目录中的文件。
当调用扩充操作时,wasprofile 命令尝试访问指定的模板路径中的 actionRegistry.xml 文件。然后对指定的概要文件应用在操作注册表文件中的 Config Actions 节中定义的操作。
请对 -templatePath 指定标准文件路径。对 -templatePath 参数指定相对文件路径会导致不能充分扩充指定的概要文件。
另请参阅 unaugment 参数。
-cellname cell_name
指定概要文件的单元名。请对每个概要文件使用唯一单元名。
这是 WebSphere Application Server 的可选参数。
如果您省略该参数,那么将指定缺省单元名。
-create
创建概要文件。
指定 wasprofile -create -templatePath fully_qualified_file_path_to_template -help 以获取关于创建概要文件的特定信息。可用的模板包括:
dmgr - Deployment Manager
缺省值 - 独立应用程序服务器
受管 - 定制节点
-debug
打开 wasprofile 命令使用的 Ant 实用程序的调试功能。
-delete
删除概要文件。删除概要文件不会删除概要文件目录。例如,假定您在 /usr/WebSphere/AppServer/profiles/managedProfile 目录中创建一个概要文件。在您删除概要文件之后,该目录仍然存在。
删除概要文件之前,请缩小已执行的任何扩充。
您可以删除或保留该目录。然而,profile_dir/logs 目录包含关于卸载概要文件的信息。例如,您可以保留 _nodeuninst.log 文件以确定在卸载过程中发生的任何问题的原因。
delete 参数不会自动执行缩小。必须在删除概要文件之前手动执行缩小。
-getName
获取以给定的 -profilePath 参数注册的概要文件的名称。
-getPath
获取给定名称的概要文件的文件系统位置。需要 -profileName 参数。
-help
显示命令语法。
-hostName host_name
指定您创建概要文件的主机名。这应该与您在初始产品安装过程中指定的主机名相匹配。
-isDefault
指定由一起使用的 -profileName 参数标识的概要文件在注册后将成为缺省概要文件。当发出针对缺省概要文件的命令时,那么不必使用命令的 -profileName 属性。
-listProfiles
列出所有定义的概要文件。
-nodeName node_name
指定用新概要文件创建的节点的节点名。在或机器上使用唯一值。每个共享同一个产品二进制文件集的概要文件必须具有唯一节点名。
-portsFile file_path
指定文件路径的可选参数,该文件定义新概要文件的端口设置。省略时,wasprofile 工具查找 app_server_root/profileTemplates/profile_type /actions/portsUpdate/bin/portdef.props 文件。
不要在使用 -startingPort 参数时使用此参数。
-profileName profile_name
指定概要文件的名称。创建概要文件时使用唯一值。每个共享同一个产品二进制文件集的概要文件必须具有唯一名称。
-profilePath profile_path
指定到概要文件的标准路径。
 如果标准路径包含空格,那么将该值包括在引号中。
-startingPort startingPort
指定用于生成概要文件的所有端口的起始端口号。如果未指定,wasprofile 命令使用 serverindex.xml 文件中指定的缺省端口。
请不要将此参数与 _portsFile 参数配合使用。
-templatePath template_path
指定安装根目录中模板文件的目录路径。
profileTemplates 目录包含对应于不同概要文件类型的各种目录,并且这些目录随所安装产品的类型而异。
这些概要文件目录是您在使用 -templatePath 选项时指示的路径。
可指定不在安装根目录中的概要文件模板(如果碰巧有的话)。
如果您指定相对路径,那么指定的模板位置缺省为 app_server_root/profileTemplates 目录。
例如,以下几个成对的指定各自指向相同的模板路径:
 
-templatePath /usr/WebSphere/AppServer/profileTemplates/default
  
-templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/default
 
-templatePath C:/Program Files/IBM/WebSphere/AppServer/profileTemplates/default
-unaugment
扩充是将已更改的模板应用到现有概要文件的能力。当您缩小已扩充的现有概要文件时,将根据先前指定的概要文件模板撤销更改。如果执行了一系列 wasprofile 扩充,那么缩小操作将首先撤销最后的扩充操作。
当调用缩小操作时,wasprofile 尝试访问在扩充命令中指定的模板路径中的 deleteRegistry.xml 文件。然后对指定的概要文件应用在删除注册表文件中的 Config Actions 节中定义的操作。
另请参阅 augment 参数。
-validateAndUpdateRegistry
检查概要文件注册表中列出的所有概要文件,以查看文件系统中是否存在这些概要文件。从注册表除去任何缺少的概要文件。返回从注册表删除的缺少的概要文件列表。
-validateRegistry
检查概要文件注册表中列出的所有概要文件,以查看文件系统中是否存在这些概要文件。返回缺少的概要文件的列表。
-winserviceAccountType type_of_owner_account 
为概要文件创建的 Windows 服务的所有者帐户的类型可以是指定的用户名或值 localsystem。localsystem 值在创建概要文件的用户的本地帐户下运行 Windows 服务。
-winserviceCheck value 
该值可以为 true 或 false。指定 true 为概要文件内创建的服务器进程创建 Windows 服务。指定 false 以便不创建 Windows 服务。
-winservicePassword your_password 
为将拥有 Windows 服务的指定用户或本地帐户指定密码。
-winserviceStartupType startup_type 
可能的 startup_type 值为:
manual
automatic
disabled
请参阅WASService 命令 获取有关 Windows 服务的更多信息。
-winserviceUserName user_ID 
指定用户标识以便 Windows 可以验证您是否能作为创建 Windows 服务的标识。您的用户标识必须属于管理员组,而且具有下列高级用户权限:
作为操作系统的一部分
作为服务登录
用例方案
用例是工具使用的一般任务的描述。
方案:删除概要文件
为了可读性,以下命令位于多个行上。在一行输入命令来删除名为 shasti 的概要文件:
wasprofile.sh -delete
                     -profileName shasti
方案:使用预定义的端口号
当您使用不具有 -startingPort 参数的 wasprofile 工具时,该工具使用 app_server_root/profileTemplates/profile_type /actions/portsUpdate/bin/portdef.props 文件来设置初始端口。
示例
复制文件、编辑端口设置然后按以下示例所示使用 -portsFile 参数使用副本:
wasprofile.bat
   -create
   -profileName Wow_Profile
   -profilePath
       profile_root
   -templatePath
       app_server_root/profileTemplates/default
   -nodeName Wow_node
   -cellName Wow_cell
   -hostName lorriemb
   -portsFile C:/temp/ports/portdef.props
假设 portdef.props 文件具有以下值:
WC_defaulthost=39080
WC_adminhost=39060
WC_defaulthost_secure=39443
WC_adminhost_secure=39043
BOOTSTRAP_ADDRESS=32809
SOAP_CONNECTOR_ADDRESS=38880
SAS_SSL_SERVERAUTH_LISTENER_ADDRESS=39401
CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS=39403
CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS=39402
ORB_LISTENER_ADDRESS=39100
DCS_UNICAST_ADDRESS=39353
SIB_ENDPOINT_ADDRESS=37276
SIB_ENDPOINT_SECURE_ADDRESS=37286
SIB_MQ_ENDPOINT_ADDRESS=35558
SIB_MQ_ENDPOINT_SECURE_ADDRESS=35578
结果 serverindex.xml 文件看似以下示例:
<?xml version="1.0" encoding="UTF-8"?>
<serverindex:ServerIndex xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
...
   <specialEndpoints xmi:id="NamedEndPoint_..."
                                         endPointName="BOOTSTRAP_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="lorriemb" port="32809"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..."
                                   endPointName="SOAP_CONNECTOR_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="lorriemb" port="38880"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..."
                   endPointName="SAS_SSL_SERVERAUTH_LISTENER_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="lorriemb" port="39401"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..."
                  endPointName="CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="lorriemb" port="39403"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..."
                 endPointName="CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="lorriemb" port="39402"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..."
                                      endPointName="WC_adminhost">
      <endPoint xmi:id="EndPoint_..." host="*" port="39060"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..."
                                    endPointName="WC_defaulthost">
      <endPoint xmi:id="EndPoint_..." host="*" port="39080"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..."
                                  endPointName="DCS_UNICAST_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="lorriemb" port="39353"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..."
                                endPointName="WC_adminhost_secure">
      <endPoint xmi:id="EndPoint_..." host="*" port="39043"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..."
                                endPointName="WC_defaulthost_secure">
      <endPoint xmi:id="EndPoint_..." host="*" port="39443"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..."
                               endPointName="SIB_ENDPOINT_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="*" port="37276"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..."
                         endPointName="SIB_ENDPOINT_SECURE_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="*" port="37286"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..."
                              endPointName="SIB_MQ_ENDPOINT_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="*" port="35558"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..."
                       endPointName="SIB_MQ_ENDPOINT_SECURE_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="*" port="35578"/>
    </specialEndpoints>
    <specialEndpoints xmi:id="NamedEndPoint_..."
                                endPointName="ORB_LISTENER_ADDRESS">
      <endPoint xmi:id="EndPoint_..." host="lorriemb" port="39100"/>
    </specialEndpoints>
  </serverEntries>
</serverindex:ServerIndex>
wasprofile 命令在 profile_root/logs 目录中创建当前 portdefs.props 文件的副本。
不要在使用 startingPort 参数时使用 portsFile 参数。这两个参数相互排斥。
方案:从起始点增加缺省端口号
使用 -startingPort 参数,wasprofile 可以根据您在命令行给定的起始端口值指定端口号。继而,该工具从起始端口号值指定端口号。
端口指定的顺序是任意的。预测指定是不可能的。
例如,用 -startingPort 20002 创建的端口将与以下示例类似那样出现:
为 Application Server 概要文件指定端口
WC_defaulthost=20002
WC_adminhost=20003
WC_defaulthost_secure=20004
WC_adminhost_secure=20005
BOOTSTRAP_ADDRESS=20006
SOAP_CONNECTOR_ADDRESS=20007
SAS_SSL_SERVERAUTH_LISTENER_ADDRESS=20008
CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS=20009
CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS=20010
ORB_LISTENER_ADDRESS=20011
DCS_UNICAST_ADDRESS=20012
SIB_ENDPOINT_ADDRESS=20013
SIB_ENDPOINT_SECURE_ADDRESS=20014
SIB_MQ_ENDPOINT_ADDRESS=20015
SIB_MQ_ENDPOINT_SECURE_ADDRESS=20016
示例
以下是使用 wasprofile 命令从初始值 20002 创建端口的示例,附带前面的示例中显示的内容:
wasprofile.bat -create
               -profileName shasti
               -profilePath profile_root
               -templatePath template_path
               -nodeName W2K03
               -cellName W2K03_Cell01
               -hostName planetnt
               -startingPort 20002
                           
示例:使用命令来创建概要文件
以下示例显示如何使用 wasprofile 命令来创建概要文件。
请在一行上发出以下任何示例中的命令。每个示例都以多行显示命令来增加可读性。
创建独立应用程序服务器概要文件
请使用以下命令创建名为 Default01 的应用程序服务器概要文件:
 
app_server_root/bin wasprofile -create
    -profileName Default01
    -profilePath profile_root
    -templatePath app_server_root/profileTemplates/default
    -nodeName Default01Node
    -cellName Default01Cell
    -hostName myhost.mycity.mycompany.com
    -isDefault false
    -winserviceCheck true
    -winserviceAccountType user
    -winserviceUserName my_user_id
    -winservicePassword my_password
    -winserviceStartupType manual
    -startingPort 21000
 
app_server_root/bin/manageprofiles.sh -create
   -profileName Default01
   -profilePath profile_root
   -templatePath app_server_root/profileTemplates/default
   -nodeName Default01Node
   -cellName Default01Cell
   -hostName myhost.mycity.mycompany.com
   -isDefault
   -startingPort 21000

抱歉!评论已关闭.