Centos7.x安装RabbitMQ 3.7.3并设置远程访问
官方安装教程:https://www.rabbitmq.com/install-rpm.html
rpm包下载地址:https://bintray.com/rabbitmq/rpm/erlang
wget https://bintray.com/rabbitmq/rpm/download_file?file_path=erlang%2F20%2Fel%2F7%2Fx86_64%2Ferlang-20.2.3-1.el7.centos.x86_64.rpm
rpm -Uvh download_file\?file_path\=erlang%2F20%2Fel%2F7%2Fx86_64%2Ferlang-20.2.3-1.el7.centos.x86_64.rpm
# 检查版本
yum list installed erlang
rpm包下载地址:https://www.rabbitmq.com/install-rpm.html
yum install socat -y
wget https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.7.3/rabbitmq-server-3.7.3-1.el7.noarch.rpm
rpm -Uvh rabbitmq-server-3.7.3-1.el7.noarch.rpm
# 添加开机启动RabbitMQ服务
chkconfig rabbitmq-server on
# 启动服务
service rabbitmq-server start
# 停止服务
service rabbitmq-server stop
# 查看当前所有用户
rabbitmqctl list_users
# 由于RabbitMQ默认的账号用户名和密码都是guest。为了安全起见, 先删掉默认用户
rabbitmqctl delete_user guest
# 必须先启动才能执行
# 添加新用户
rabbitmqctl add_user 用户名 密码
# 设置权限
rabbitmqctl set_user_tags 用户名 administrator
rabbitmqctl set_permissions -p / 用户名 ".*" ".*" ".*"
# 开启web端ui
rabbitmq-plugins enable rabbitmq_management
配置文件存在/etc/rabbitmq
目录下,没有可新建
如果进不去,可能是防火墙问题,关闭防火墙或开启端口即可systemctl stop firewalld