此内容没有您所选择的语言版本。

5.4. Migrating from a JAR Installation to an RPM Installation


When an agent is initially installed from the JAR file available with the JBoss ON server downloads (Chapter 4, Installing and Upgrading an Agent on a Managed Platform from the JAR File), it is possible to switch the agent to an RPM installation. There are two potential paths. Either the old agent can be scrapped and a new agent installed (which loses all of the original agent configuration and data) or the agent data can be migrated from the original JAR installation to the new RPM installation.

5.4.1. Converting an Agent (Losing Configuration Data)

This method loses all of the original data for the agent, including the persistent store, data directory, and logs. However, by re-using the original security token, the agent can re-register with the server and retrieve its previous inventory and resource histories and configuration, so none of the management information for the platform is lost.
  1. Retrieve the security token for the agent.
    1. Click the Administration tab and select the Agents link under the Topology section on the left.
    2. Select the agent from the list, and click its name to open its details page.
    3. Copy the security token.
  2. Shut down the agent.
  3. Remove the JAR installation directory.
  4. Install the agent RPM.
  5. Edit the agent-configuration.xml file and add a line for the original security token for the agent.
    vim /etc/jboss-on/agent/agent-configuration.xml
    						
    <entry key="rhq.agent.security-token" value="abcd1234" />
    Copy to Clipboard Toggle word wrap
  6. Run through the agent configuration installer.
    [jsmith@server ~]$ sudo service jon-agent config
    Copy to Clipboard Toggle word wrap
  7. Start the agent.
    [jsmith@server ~]$ sudo service jon-agent start
    Copy to Clipboard Toggle word wrap
It is possible to preserve the JVM and persisted data for the agent, which maintains all of the original configuration data. However, this requires accessing the Java store through a Java preferences browser in the original agent and copying it into the Java store for the new agent, without affecting any other data in the store. There is always a risk when editing Java stores.
  1. Shut down the original agent.
  2. Install the agent RPM.
  3. Copy over the previous configuration directories for the agent. This includes the data directory (which contains operational information like the changesets for drift detection or truststores used for SSL) and the log directory. For example:
    [root@server ~]# cp -r agentRoot/rhq-agent/data/ /var/lib/jboss-on/agent/data/
    [root@server ~]# cp -r agentRoot/rhq-agent/logs/ /var/log/jboss-on/agent/
    Copy to Clipboard Toggle word wrap
  4. Using a Java preferences editor, export the Java preferences specific to the agent from the original preferences store in ~/.java/.userPrefs/rhq-agent/default (by default).

    Note

    Be sure to retrieve the security token. The token allows the agent to re-register with the server successfully.
  5. Using a Java preferences editor, import the Java preferences for the agent into the new preferences store in /var/lib/jboss-on/agent/prefs/default (by default).
  6. Run through the agent configuration installer.
    [jsmith@server ~]$ sudo service jon-agent config
    Copy to Clipboard Toggle word wrap
  7. Start the agent.
    [jsmith@server ~]$ sudo service jon-agent start
    Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat