CentOS7 安装 RabbitMQ
参考资料:
安装步骤:
1. 安装 erlang
rpm -Uvh https://download.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install erlang
2. 安装 RabbitMQ
# 下载 rpm
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el7.noarch.rpm\
# 安装 rpm
yum -y install rabbitmq-server-3.6.6-1.el7.noarch.rpm
3. 启动 RabbitMQ
# centos6, 启动服务
service rabbitmq-server start
# centos7,启动服务
systemctl start rabbitmq-server.service
# centos6,查看状态
service rabbitmq-server status
# centos7,查看状态
systemctl status rabbitmq-server.service
# centos6,停止服务
service rabbitmq-server stop
# centos7,停止服务
systemctl stop rabbitmq-server.service
4. 配置文件
切换到配置文件目录下:cd /etc/rabbitmq
复制官方配置文件:cp /usr/share/doc/rabbitmq-server-3.6.6/rabbitmq.config.example rabbitmq.config
把 rabbitmq.config 文件里的 {loopback_users, []} 打开,重启服务即可
5. 局域网开放端口 15672
centos6:https://xieboke.net/article/22/
centos7: firewall-cmd --zone=public --add-port=15672/tcp --permanent
6. 登录
地址:http://192.168.1.254:15672/#/
账号:guest
密码:guest