Configure autostart
By default, the IBM MQ Console is automatically started when the mqweb server starts. In Version 9.0.1, the REST API is not automatically started. From Version 9.0.2, the REST API is automatically started when the mqweb server starts. From Version 9.0.4, we can configure whether the IBM MQ Console and the REST API start automatically by using the setmqweb command. In IBM MQ Version 9.0.3, and earlier, we can configure whether the IBM MQ Console and the REST API start automatically by editing the mqwebuser.xml file.
Before you begin
You must be a privileged user to complete this procedure.From Version 9.0.4,we can view the current configuration of the REST API autostart by using the following command:dspmqweb properties -aThe mqRestAutostart field shows whether the REST API is automatically started, and the mqConsoleAutostart field shows whether the IBM MQ Console is automatically started. For more information, see dspmqweb.Attention:
Before issuing either the setmqweb or dspmqweb commands on z/OSĀ®, you must set the WLP_USER_DIR environment variable, so that the variable points to your mqweb server configuration.
To do this, issue the following command:export WLP_USER_DIR=WLP_user_directorywhere WLP_user_directory is the name of the directory that is passed to crtmqweb.sh. For example:export WLP_USER_DIR=/var/mqm/web/installation1For more information, see Create the Liberty server definition.
Procedure
Use one of the following methods to configure whether the IBM MQ Console and the REST API start automatically:
- From Version 9.0.4, use the setmqweb properties command:
- Configure whether the IBM MQ Console automatically starts, by using the following command:
setmqweb properties -k mqconsoleAutostart -v start
where start is the value True if you want the IBM MQ Console to automatically start, or False otherwise.
- Configure whether the REST API requires a manual start, by using the following command:
setmqweb properties -k mqRestAutostart -v start
where start is the value True if you want the REST API to automatically start, or False otherwise.
- For Version 9.0.3 and earlier, edit the mqwebuser.xml file:
- Open the mqwebuser.xml file.The mqwebuser.xml file can be found in one of the following directories:
- On UNIX, Linux , and Windows: MQ_DATA_DIRECTORY/web/installations/installationName/servers/mqweb
- On z/OS: WLP_user_directory/servers/mqweb
where WLP_user_directory is the directory that was specified when the crtmqweb.sh script ran to create the mqweb server definition.
- Configure autostart:
- Configure whether the IBM MQ Console requires a manual start by adding or updating the following line in the mqwebuser.xml file, within the <server> tags:
<variable name="mqConsoleAutostart" value="start" />
where start is the value True if you want the IBM MQ Console to automatically start, or False otherwise.
- Configure whether the REST API requires a manual start by adding or updating the following line in the mqwebuser.xml file, within the <server> tags:
<variable name="mqRestAutostart" value="start" />
where start is the value True if you want the REST API to automatically start, or False otherwise.