2.11. Upgrading a broker instance from 7.11.x to 7.12.x
The following subsections describe how to upgrade a 7.11.x broker instance to 7.12.x for different operating systems.
Starting with AMQ Broker 7.1.0, you can access AMQ Management Console only from the local host by default. To learn about configuring remote access to the console, see Configuring local and remote access to AMQ Management Console.
2.11.1. Upgrading from 7.11.x to 7.12.x on Linux 复制链接链接已复制到粘贴板!
Prerequisites
- At a minimum, AMQ Broker 7.12.x requires Java version 11 to run. Ensure that each AMQ Broker host is running Java version 11 or higher. For more information on supported configurations, see Red Hat AMQ 7 Supported Configurations[Red Hat AMQ Broker 7 Supported Configurations].
Procedure
- Download the desired archive from the Red Hat Customer Portal. Follow the instructions provided in Downloading the AMQ Broker archive.
Change the owner of the archive that you downloaded to the same user that owns the AMQ Broker installation to be upgraded. The following example shows a user called
amq-broker.sudo chown amq-broker:amq-broker amq-broker-7.x.x-bin.zipMove the archive to the directory created during the original installation of AMQ Broker. The following example uses
/opt/redhat.sudo mv amq-broker-7.x.x-bin.zip /opt/redhatAs the directory owner, extract the contents of the compressed archive. In the following example, the user
amq-brokerextracts the archive using theunzipcommand.su - amq-broker cd /opt/redhat unzip amq-broker-7.x.x-bin.zip注意The contents of the latest archive are extracted to a directory called
apache-artemis-2.33.0.redhat-00013in your current directory.If the broker is running, stop it.
<broker_instance_dir>/bin/artemis stop(Optional) Note the current version of the broker. After the broker stops, you see a line similar to the one below at the end of the
<broker_instance_dir>/log/artemis.logfile.INFO [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.28.0.redhat-00019 [0.0.0.0, nodeID=554cce00-63d9-11e8-9808-54ee759954c4]Back up the instance directory of the broker by copying it to the home directory of the current user.
cp -r <broker_instance_dir> ~/Change to directory to which you extracted the contents of the compressed archive.
cd /opt/redhat/apache-artemis-2.33.0.redhat-00013/binRun the
artemis upgradecommand to upgrade your existing broker. The following example upgrades a broker instance in the/var/opt/amq-broker/mybrokerdirectory../artemis upgrade /var/opt/amq-broker/mybrokerThe
artemis upgradecommand completes the following steps to upgrade the broker.-
Makes a backup of each file it modifies in an
old-config-bkp.<n>subdirectory of the broker instance directory for the broker that you are upgrading. -
Sets the
ARTEMIS_HOMEproperty in the<broker_instance_dir>/etc/artemis.profilefile to the new directory created when you extracted the archive.
-
Makes a backup of each file it modifies in an
Start the upgraded broker.
<broker_instance_dir>/bin/artemis run(Optional) Confirm that the broker is running and that the version has changed. After starting the broker, open the
<broker_instance_dir>/log/artemis.logfile. Find lines similar to the ones below. Note the new version number that appears in the log after the broker starts.2023-02-08 20:53:50,128 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server version 2.33.0.redhat-00013 2023-02-08 20:53:51,077 INFO [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.33.0.redhat-00013 [0.0.0.0, nodeID=be02a2b2-3e42-11ec-9b8a-4c796e887ecb]
Additional Resources
- For more information about creating an instance of the broker, see Creating a broker instance.
-
You can now store a broker instance’s configuration files and data in any custom directory, including locations outside of the broker instance’s directory. In the
<broker_instance_dir>/etc/artemis.profilefile, update theARTEMIS_INSTANCE_ETC_URIproperty by specifying the location of the custom directory after creating the broker instance. In previous versions of AMQ Broker, these configuration files and data could only be stored in theetc/anddata/directories within the broker instance’s directory.
2.11.2. Upgrading from 7.11.x to 7.12.x on Windows 复制链接链接已复制到粘贴板!
Prerequisites
- At a minimum, AMQ Broker 7.12.x requires Java version 11 to run. Ensure that each AMQ Broker host is running Java version 11 or higher. For more information on supported configurations, see Red Hat AMQ Broker 7 Supported Configurations.
Procedure
- Follow the instructions provided in Downloading the AMQ Broker archive to download the AMQ Broker archive.
- Use a file manager to move the archive to the folder you created during the last installation of AMQ Broker.
Extract the contents of the archive. Right-click the .zip file and select Extract All.
注意The contents of the latest archive are extracted to a folder called
apache-artemis-2.33.0.redhat-00013in the current folder.If the broker is running, stop it.
<broker_instance_dir>\bin\artemis-service.exe stop(Optional) Note the current version of the broker. After the broker stops, you see a line similar to the one below at the end of the
<broker_instance_dir>\log\artemis.logfile.INFO [org.apache.activemq.artemis.core.server] AMQ221002: Apache ActiveMQ Artemis Message Broker version 2.28.0.redhat-00019[4782d50d-47a2-11e7-a160-9801a793ea45] stopped, uptime 28 minutesBack up the broker using a file manager.
-
Right-click the
<broker_instance_dir>folder and select Copy. - Right-click in the same window and select Paste.
-
Right-click the
Change to directory to which you extracted the contents of the compressed archive. For example:
cd \redhat\amq-broker\apache-artemis-2.33.0.redhat-00013\binRun the
artemis upgradecommand to upgrade your existing broker. The following example upgrades the broker instance in theC:\redhat\amq-broker\mybrokerdirectory.artemis upgrade C:\redhat\amq-broker\mybrokerThe
artemis upgradecommand completes the following steps to upgrade the broker.-
Makes a backup of each file it modifies in an
old-config-bkp.<n>subdirectory of the broker instance directory for the broker that you are upgrading. -
Sets the
ARTEMIS_HOMEproperty in the<broker_instance_dir>\etc\artemis.cmd.profilefile to the new directory created when you extracted the archive.
-
Makes a backup of each file it modifies in an
Start the upgraded broker.
<broker_instance_dir>\bin\artemis-service.exe start(Optional) Confirm that the broker is running and that the version has changed. After starting the broker, open the
<broker_instance_dir>\log\artemis.logfile. Find two lines similar to the ones below. Note the new version number that appears in the log when the broker is live.2023-02-08 20:53:50,128 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server version 2.33.0.redhat-00013 2023-02-08 20:53:51,077 INFO [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.33.0.redhat-00013 [0.0.0.0, nodeID=be02a2b2-3e42-11ec-9b8a-4c796e887ecb]
Additional Resources
- For more information about creating an instance of the broker, see Creating a broker instance.
-
You can now store a broker instance’s configuration files and data in any custom directory, including locations outside of the broker instance’s directory. In the
<broker_instance_dir>\etc\artemis.profilefile, update theARTEMIS_INSTANCE_ETC_URIproperty by specifying the location of the custom directory after creating the broker instance. Previously, these configuration files and data could only be stored in the\etcand\datadirectories within the broker instance’s directory.