In many scenarios, we may need to start multiple RABBITMQ instances on a single machine, and launching multiple instances is actually enabling different ports. RABBITMQ The default port is 5672,15672,25672, the following after the actual operation of the absolute original, pro-test effective, the cost of long time time, how not in vain ah.
Version: RabbitMQ 3.5.6.
To implement RABBITMQ multi-instance operation on a single machine , it is recommended to start an instance of another port, and then start An instance of 5672:
The configuration file that needs to be modified is:
#vim/etc/rabbitmq/rabbitmq.config
[
{Rabbit,
[
{tcp_listeners, [5673]},
{tcp_listeners,[{"127.0.0.1", 5673},{":: 1", 5673}]}
]
},
{rabbitmq_management,
[
{Listener, [{port, 15673},
{IP, "0.0.0.0"},
{SSL, false}
]}
]}
].
after the modification is complete, if you want to open multiple instances, refer to the following to modify the configuration file port, and then execute with the following command (note should be modified at the same time Rabbitmq_node_port port number):
rabbitmq_node_port=5673rabbitmq_nodename=rab/usr/rabbitmq/sbin/rabbitmq-server–detached &
The above step is to open a rabbitmq instance of the 5673 port , if another instance, then modify the configuration file, the above red 5673 change to a different port number, and then start, If you need to start the default port number, modify it to the following:
#vim/etc/rabbitmq/rabbitmq.config
[
{Rabbit,
[
{tcp_listeners, [5672]}
%%{tcp_listeners, [5672]},
%%{tcp_listeners,[{"127.0.0.1", 5672},{":: 1", 5672}]}
%%{tcp_listeners,[{"127.0.0.1", 5672},{":: 1", 5672}]}
]
}
%%{rabbitmq_management,
%%[
%%{listener, [{port, 15673},
Percent {IP, "0.0.0.0"},
Percent {SSL, false}
%%]}
%%]}
].
Save Exit,
Execute command: /usr/rabbitmq/sbin/rabbitmq-serverstart & You can start a service with the default port of 5672 .
The results are as follows:
Start Port 5673:
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/89/36/wKiom1gMRESQO-7CAABPAWmRc98848.jpg-wh_500x0-wm_3 -wmp_4-s_3089740402.jpg "style=" Float:none; "title=" Qq20161023130000.jpg "alt=" Wkiom1gmresqo-7caabpawmrc98848.jpg-wh_50 "/>
Start Port 5672:
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/89/33/wKioL1gMRETjTWDfAABD27y8w-A700.jpg-wh_500x0-wm_3 -wmp_4-s_3222020107.jpg "style=" Float:none; "title=" Qq20161023130018.jpg "alt=" Wkiol1gmretjtwdfaabd27y8w-a700.jpg-wh_50 "/>
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/89/36/wKiom1gMRESA4-stAAFfjDwkV7I666.jpg-wh_500x0-wm_3 -wmp_4-s_3494554045.jpg "style=" Float:none; "title=" Qq20161023130054.jpg "alt=" Wkiom1gmresa4-staaffjdwkv7i666.jpg-wh_50 "/>
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/89/33/wKioL1gMRESR48NnAABLSMDjk00163.jpg-wh_500x0-wm_3 -wmp_4-s_2076682583.jpg "style=" Float:none; "title=" Qq20161023130116.jpg "alt=" Wkiol1gmresr48nnaablsmdjk00163.jpg-wh_50 "/>
CentOS 7.0 on RABBITMQ 3.5.6 version Multi-instance start operation explained