Changing the TCP/IP default port

By default, for TCP/IP, IBM® MQ assumes that the channel will be connected to port 1414. If required, you can change the default value.

About this task

You can change the port number by using one of the following three options:
  • By using the MQSERVER environment variable.
  • By changing the mqclient.ini file.
  • By adding IBM MQ to the services file.

Procedure

  • To change the port number by using the MQSERVER environment variable, add the port number in brackets as the last part of the ConnectionName, for example:
    • [AIX][Linux]On AIX® and Linux®:
      
      export  MQSERVER='ChannelName/TransportType/ConnectionName(PortNumber)'
      
    • [Windows]On Windows:
      
      SET  MQSERVER=ChannelName/TransportType/ConnectionName(PortNumber)
      
  • To change the port number by using the mq.ini file, add the port number to the protocol name, for example:
    
    TCP:
    port=2001
    
  • To change the port number by adding IBM MQ to the services file, complete the steps described in Using the TCP/IP listener on AIX and Linux.