I went through the documentation for migrating midrange MQ up to the latest level (9.1.1) for MQ on Ubuntu,and for installing fix packs.
It felt like it had not been properly tested, nor tested in a typical enterprise environment, so Ive written up some of the missing, or well hidden documentation.
Use this blog post with the IBM documentation. I am just trying to fill the holes.
If you are using a descendant of Debian such as Ubuntu, then you have .deb packages. If you are using Fedora, CentOS, or RedHat, then you have .rpm packages
You cannot use multi version ( eg 9.0.0, 9.0.1 or 9.1 at the same time) on Ubuntu as multi version is only supported with rpm, or with containers(Docker). See here.
Many pages in the knowledge centre say, or imply you can do “side by side” migration, and use multi version on mid range. You cannot do this if you are using .deb files.
MQ levels are listed as v.r.m.fp so you can have 18.104.22.168 which is MQ Version 9 release 1 modification 0 at fix pack1
- If v.r.m is the same, you are just installing a fix pack, and so you can upgrade.
- Otherwise you have to uninstall the old version and install the newer version.
To find out what you is installed you can use dpkg-query -l “ibmmq*” (Check the double quotes if doing cut and paste)
You can download the MQ code from here. It used to be Passport Advantage, or from developer.ibm.com.
I used v9.1.1 Continuous Delivery Release- Windows/ Linux/ Ubuntu.
I down loaded mqadv_dev910_ubuntu_x86-64.tar.gz.
Note: from the name you can tell
- it is 9.1.0
- for Ubuntu
- x86-64 bit.
I downloaded a fix pack: 9.1.0-IBM-MQ-UbuntuLinuxX64-FP0001.tar.gz
I also (by accident) downloaded a file with .rpm files in it – which were for Redhat – not Ubuntu. So check before you download.
I followed the documentation here.
It says logon as root. I could not (and would not) do that on my machine so I had to use sudo in front of commands. I believe you should be super-user only for those commands that need it, so switching to root for the duration of the install is a no-no outside of a sandbox. It you switch to root – be careful when deleting files!
- List what is currently installed, so you know what to (re)install. Use one of the following commands. dpkg-query provides more information.
- apt list –installed “ibmmq*”
- dpkg-query -l “ibmmq*”
- If you need to delete the old version use sudo apt remove “ibmmq-*”. Use quotes around ibmmq-* in case you are in a directory with file names beginning with ibmmq- .
- Download the file with the updated code.
- cd to the directory where the file with the *.gz is located.
- Check to see if you have an existing MQServer directory, if so rename it, because the tar will put the files in this directory and overwrite what is in the directory.
- If this is a v.r.m install, the tar unpack command will create a directory called MQServer.
- Unpack the file:
tar -zxvf ...tar.gz
- This creates a directory MQServer. I renamed this to be MQServer910 so it was clear what level this is for.
- Within this MQServer directory it has files like ibmmq-client_22.214.171.124_amd64.deb (the client code), ibmmq-msg-de_126.96.36.199_amd64.deb (a national Language file) , and other files such as mqlicense.sh
- Unpack the file:
- If this is a fix pack, no sub-directory is created, and the files are unpacked to the current working directory. To make it easier to manage, create a directory for the files, and tar unpack the files in to it.
- Create a directory cd MQServer9101
- cd MQServer9101
tar -zxvf ./...tar.gz
- the files are named like ibmmq-client-u9101_188.8.131.52_amd64.deb
- You can now delete the ….gz file.
You need to decide which of these components you need to install, such as AMS, server, and which languages.
- This page lists all of the components.
- This page lists the packages, components and dependencies.
- This page has the IBM instructions for installing MQ, a list of the packages and components.
You can display details of each file and the rm .dependencies, using the command
dpkg -I ./ibmmq-client_184.108.40.206_amd64.deb
Description: IBM MQ Client FileSet
IBM MQ for Developers for Linux for x86_64
This package provides the IBM MQ non-Java MQI client API,
which permits applications to communicate with a IBM MQ
Pre-Depends: ibmmq-runtime (=220.127.116.11)
Installing MQ on Ubuntu.
If you are installing a fix pack, you can have the both base and the fix pack installed at the same time.
Installing a new or different level of v.r.m.
If you are changing the level of v.r.m, you need to delete any older version. You can use the command sudo apt remove “ibmmq-*” to remove the older version.
You must install the license. Use cd to get into the MQServer directory.
You are unlikely to want to install all of the MQ code; do you really need all of the languages installed? Some files have a dependency on other files. Make a note of the components you need (or be lazy and install ibmmq-*).
You have a choice of 2 ways of installing the code.
- Use apt, specify the long names of the components to be installed – and manually install the pre-reqs. You specify all the components you need to install. The install reports if a pre-req is missing and does not do the install.
- Do some additional customising and use apt . You specify the short names of the components you want to install, and the pre-reqs are installed automatically.
You can use dpkg, but you have to take more care, and may need to fix up problems if you do not get the dependencies installed in the right order.s
Specify the long names of the components to be installed – and manually install the pre-reqs.
You can use specify the components individually.
Use the ls shell command to list what files there are to install. Specify the full name. You can use sudo apt install ./ibmmq-client and tab to do auto-complete. Note the ./ before each file.
sudo apt install ./ibmmq-client_18.104.22.168_amd64.deb ./ibmmq-runtime_22.214.171.124_amd64.deb
where you specify the components – in any order. Apt will identify dependencies, and report if any dependencies are missing. Either add the dependency to the list to be installed, or install the dependency, and retry the command.
Once you have installed the components, you can delete the files in the MQServer directory. If you do delete the files and you need to install an additional component at a later date, you will have to download the .gz file again and unzip it, so you may want to keep the MQServer directory around.
You can customise apt and get it to install the pre-req components. You use the short name rather than the long name.
You need to issue the following command for the directory with the .deb files in it.
chmod -R a+rx MQServer
You need to create a file such as MQ.list in the /etc/apt/sources.list.d directory.
Check to see if there is already a file for MQ in /etc/apt/sources.list.d. If so this will need to be updated or replaced.
I found it easier to create the file MQ.list then use sudo cp MQ.list /etc/apt/sources.list.d/
My file, looks like
# Local directory containing IBM MQ packages
# fix pack
deb [trusted=yes] file:/home/colinpaice/snap/firefox/common/Downloads/MQServer9101 ./
# base code
deb [trusted=yes] file:/home/colinpaice/snap/firefox/common/Downloads/MQServer910 ./
Your file may have just one, or more than one line, depending on the number of fix packs you have installed.
Use sudo apt update to refresh apt repository.
You can now use the sudo apt list “ibmmq*” command to show what can be installed.
When installing 9.1.0 fix pack 1, this command gave
ibmmq-runtime/unknown,now 126.96.36.199 amd64
Below are sections on
- Installing ( for the first time)
- Upgrading with a fixpack from v.r.x.a to v.r.x.b
Installing for the first time
You can specify the components you want, and let apt resolve the pre-reqs
sudo apt install ibmmq-client ibmmq-server
you can type ibmmq-cl tab for auto complete. You do not specify the …_188.8.131.52_amd64.deb.
To install the fix pack type
If the v.r.m between the installed and the new level are different.
to give you
sudo apt install ibmmq-client-u9101 ibmmq-server-u9101
To remove the fix pack entry use
sudo apt remove ibmmq-client-u9101 ibmmq-server-u9101
For the first install, I used
sudo apt install ibmmq-client ibmmq-server ibmmq-sdk ibmmq-gskit ibmmq-jre ibmmq-samples
It gave me
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
The following NEW packages will be installed
ibmmq-client ibmmq-gskit ibmmq-jre ibmmq-runtime ibmmq-samples ibmmq-sdk ibmmq-server
This resolves the dependency for you.
Because you updated the apt repository with the IBM_MQ.list file, you may want to keep the files in the MQServer directory.
Before you go, use dpkg-query -l “ibmmq*” to check you have installed all of the components you need, and they are at the right level.
You might need to issue
When you know you will not be going back to an earlier release, you can delete the files in the MQServerxx directory, and unwanted *.gz files. You may need to use chmod -R 777 MQServerxx because some files are read only, and prompt at delete time.
Check to see what is installed using dpkg-query -l “ibmmq*” (Check the double quotes if doing cut and paste)
Remove the old files from apt using sudo apt remove “ibmmq-…”
If you updated a file in /etc/apt/sources.list.d, remove the old entry, and use sudo apt update to update the apt cache.