manageprofiles 命令可以在 <was_home>/bin 目录下找到。
语法
manageprofiles 命令使用下列语法:
~ 对于 Windows,使用 manageprofiles.bat –模式 –参数
~ 对于 UNIX,使用 manageprofiles.sh –模式 –参数
可以使用表 1 中的下列模式。
模式 | 用途 |
-create: | 创建一个新的概要。 |
-augment | 使用给定的概要模板,扩充某个特定的概要。 |
-delete | 删除一个概要。 |
-unaugment: | 取消对概要的扩充。 |
-deleteAll | 删除所有已注册的概要。 |
-listProfile | 列出概要注册中心中的概要。 |
-getName | 返回指定路径下的概要的名称。 |
-getPath | 返回指定概要名称的路径。 |
-validateRegistry | 验证概要注册中心,并返回一个无效概要的列表。 |
-validateAndUpdateRegistry | 验证概要注册中心,列出被清除的无效概要。 |
-getDefaultName | 返回缺省概要的名称。 |
-setDefaultName | 设置缺省概要。 |
-backupProfile | 将指定的概要备份到一个 zip 文件。 |
-restoreProfile | 从 zip 文件中恢复指定的概要。 |
-response | 在一个响应文件中管理概要。 |
-help | 显示帮助。 |
下面的两个示例显示 manageprofiles -<mode> - help 和 manageprofiles -listProfiles 模式的结果:
输入 manageprofiles -<mode> -help,以显示每种模式的详细帮助。请参阅示例 1,查看 manageprofiles -create -help 命令的示例。
示例 1 获取 manageprofiles 命令的帮助信息
C:Program FilesIBMWebSphereAppServerbin>manageprofiles –create –help
The following command line arguments are required for this mode. Command-line arguments are case sensitive.
- create: Creates a new profile. Specify -help -create -templatePath <path> to get template-specific help information.
- templatePath: The fully qualified path name of the profile template that is located on the file system. The following example selects a template:
- templatePath <app_server_home>/profileTemplates/<Template_name>
- profileName: The name of the profile.
profilePath: The intended location of the profile in the file system. The following command line arguments are optional, and have no default values. Command-line arguments are case sensitive.
- isDefault: Make this profile the default target of commands that do not use their profile parameter.
输入 manageprofiles –listProfiles,查看注册中心的概要列表。下面是 –listProfiles 的一个输出结果示例:
示例 2 查看注册中心的概要列表
C:Program FilesIBMWebSphereAppServerbin>manageprofiles -listProfiles [Dmgr01, AppSrv01, Custom01, Custom02, Dmgr02]
|
您可以使用 manageprofiles 命令而不是 Profile Management 工具创建概要。
Profile 模板:概要是根据随产品提供的模板创建的。这些模板位于 <was_home>/profileTemplates。每个模板都由一组提供概要初始设置的文件和概要创建后将采取的操作列表组成。目前还没有为您提供修改这些模板以及创建新模板的方法。当您使用 manageprofiles 创建概要时,您需要指定下列模板中的一个:
例如,示例3 显示了如果要在主机 kcgg1d7.itso.ibm.com 的 sacell1 单元中,在节点 sanodel 下创建一个名为 saserver1 的应用程序服务器,应在命令行中使用的命令。
示例 3 用 manageprofiles 命令创建一个概要
cd $WAS_HOMEbin
{asuming WAS_HOME was set to some value, for example to “C:Program FilesIBMWebSphereAppServer”}
manageprofiles -create -profileName saserver1 -profilePath C:myWAS61ProfilesappSrvrProfilessaserver1 -templatePath $WAS_HOMEprofileTemplatesdefault -nodeName sanode1 -cellName sacell1 -hostName kcgg1d7.itso.ibm.com
可以在静默模式下使用响应文件创建概要。使用的命令为:
<profile_management_tool> -options <response_file> -silent
在这个示例中,<profile_management_tool> 是启动 Profile Management 工具时需要的命令。用来启动向导的命令与平台有关,该命令位于 <was_home>/bin/ProfileManagement 下。在表 2 中选择您的平台所用的命令。
平台(32 位) | Profile Management 工具命令 |
Linux/HP-UX/Solaris/AIX | pmt.sh |
Windows | pmt.bat |
示例响应文件存储在 <was_home>/bin/profileCreator 目录中。
|
要删除一个概要,您必须按下列方法操作:
1. 如果您要移除一个已经与某个单元联合的自定义概要或应用程序服务器概要:
2. 如果您要移除一个未与某个单元联合的应用程序服务器概要:
3. 如果您要移除某个部署管理器概要:
要删除一个概要,请使用 manageprofiles -delete 命令。其格式是:
manageprofiles -delete -profileName <profile>
当该命令完成后,概要将从概要注册中心中移除,除了日志文件之外的运行时组件也将从 <profile_home> 目录中移除。
如果在删除概要时出现了错误,请检查下列日志: <was_home>/logs/manageprofile/<profile_name>_delete.log
例如,在示例 4 中,您可以看到用 manageprofiles 命令删除名为 Node06 的概要。
示例 4 用 manageprofiles 删除一个概要
C:WebSphereNDprofilesDmgr01bin>manageprofiles –delete –profileName Node06
INSTCONFUCCESS: Success: The profile no longer exists.
正如您在示例4 中看到的,一切似乎进展顺利。但作为保证注册中心已被正确更新的一个额外的步骤,您可以列出概要,以确保概要已从注册中心去除,并对注册中心进行验证。请参阅示例5。
示例 5 验证删除概要的结果
C:WebSphereNDprofilesDmgr01bin>manageprofiles –listProfiles [Dmgr01,Appsrv01,Appsrv02,SamplesServer,WebServer2Node,DmgrSecure]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
以下是自己的实验操作记录:
F:IBMWebSphereAppServerbin>manageprofiles.bat -listProfiles
[Dmgr01, AppSrv01, AppSrv02]
F:IBMWebSphereAppServerbin>manageprofiles.bat -delete -profileName Dmgr01
INSTCONFSUCCESS: 成功:概要文件不再存在。
F:IBMWebSphereAppServerbin>manageprofiles.bat -delete -profileName Appsrv01
INSTCONFFAILED: 无法删除概要文件。要获取更多的信息,请查阅 F:IBMWebSphereAppS
erverlogsmanageprofilesAppsrv01_delete.log
如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!
赞0
添加新评论0 条评论