CentOS7安装RabbitMQ,并设置远程访问

时间:2024-04-02 18:02:48

1、安装erlang环境

wget http://www.rabbitmq.com/releases/erlang/erlang-19.0.4-1.el7.centos.x86_64.rpm
CentOS7安装RabbitMQ,并设置远程访问

rpm -ivh erlang-19.0.4-1.el7.centos.x86_64.rpm
CentOS7安装RabbitMQ,并设置远程访问

2、安装rabbitmq

 wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el7.noarch.rpm

CentOS7安装RabbitMQ,并设置远程访问

yum install rabbitmq-server-3.6.6-1.el7.noarch.rpm 

CentOS7安装RabbitMQ,并设置远程访问

3、启动rabbitmq服务,并查看运行状态

service rabbitmq-server start
 service rabbitmq-server status

CentOS7安装RabbitMQ,并设置远程访问

4、开启防火墙15672端口

 firewall-cmd --zone=public --add-port=15672/tcp --permanent

firewall-cmd --reload 

CentOS7安装RabbitMQ,并设置远程访问

5、修改rabbitmq.conf,使外部可以访问

cp /usr/share/doc/rabbitmq-server-3.6.6/rabbitmq.config.example /etc/rabbitmq/rabbitmq.config

进入rabbit文件夹下:cd /etc/rabbitmq

修改rabbitmq.config文件,使外部可以访问;vim rabbitmq.config

CentOS7安装RabbitMQ,并设置远程访问

CentOS7安装RabbitMQ,并设置远程访问

service rabbitmq-server restart

注:后期部分图片资源来自https://blog.csdn.net/zhaogangyyxf/article/details/79614464