可将 Jython 或 Jacl 脚本编制语言与 wsadmin 工具一起使用来配置联合存储库下新配置中的单个基于文件的内置存储库。
开始之前
关闭应用程序服务器并确保您具有首选管理员标识和密码。
关于此任务
联合存储库配置文件
wimconfig.xml 受
WebSphere® Application Server 6.1.x 支持且位于
app_server_root/profiles/profile_name/config/cells/cell_name/wim/config 目录中。
使用以下步骤来配置联合存储库的新配置中的单个基于文件的内置存储库。
过程
- 启动 wsadmin 脚本编制工具。
- 创建 fileRegistry.xml 文件(如果尚不存在的话),它是用户注册表自身。如果 fileRegistry.xml 文件存在,那么此步骤只是将用户添加至注册表。
使用 Jython:
AdminTask.addFileRegistryAccount('-userId isoet01s01 -password oets01')
Using Jacl:
$AdminTask addFileRegistryAccount {-userId isoet01s01 -password oets01}
For more information on the addFileRegistryAccount command, see the documentation about the FileRegistryCommands command
group for the AdminTask object.
- Update the security.xml file to enable
administrative security, set the activeUserRegistry to use federated
repositories, and update the primaryAdmin and its password.
Using Jython:
AdminTask applyWizardSettings('-secureApps false
-secureLocalResources false
-userRegistryType WIMUserRegistry
-customRegistryClass com.ibm.ws.wim.registry.WIMUserRegistry
-adminName isoet01s01 -adminPassword oets01')
使用 Jacl:
$AdminTask applyWizardSettings {-secureApps false
-secureLocalResources false
-userRegistryType WIMUserRegistry
-customRegistryClass com.ibm.ws.wim.registry.WIMUserRegistry
-adminName isoet01s01
-adminPassword oets01}
有关 applyWizardSettings 命令的更多信息,请参阅 AdminTask 对象的 WizardCommands 命令组的相关文档。
- 保存配置更改。 输入下列命令以保存新配置并关闭 wsadmin 工具:
使用 Jython:
AdminConfig.save()
使用 Jacl:
$AdminConfig save
- 重新启动应用程序服务器。