1.安装环境依赖
yum install build-essential openssl openssl-devel unixODBC unixODBC-devel make gcc gcc-c++ kernel-devel m4 ncurses-devel tk tc xz
2.安装erlang
1.按照官网:先安装依赖
官网:https://packagecloud.io/rabbitmq/erlang/packages/el/7/erlang-22.3.4.19-1.el7.x86_64.rpm?distro_version_id=140
curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash
2.安装erlang
sudo yum install erlang-22.3.4.19-1.el7.x86_64
3.安装socat
sudo yum install socat-1.7.3.2-2.el7.x86_64
4.安装rabbitMq
1.解压
rpm -Uvh rabbitmq-server-3.8.14-1.el7.noarch.rpm
2.安装
yum install -y rabbitmq-server
5.启动或关闭rabbitMq
# 启动rabbitmq
systemctl start rabbitmq-server
# 查看rabbitmq状态
systemctl status rabbitmq-server
# 设置rabbitmq服务开机自启动
systemctl enable rabbitmq-server
# 关闭rabbitmq服务
systemctl stop rabbitmq-server
# 重启rabbitmq服务
systemctl restart rabbitmq-server
6. 打开RabbitMQWeb管理界面插件
rabbitmq-plugins enable rabbitmq_management
插件开启后打开浏览器输入http://IP:15762进行访问
7.添加新用户
1.添加新用户
rabbitmqctl add_user admin 123456
2.设置tag
rabbitmqctl set_user_tags admin administrator
3.配置新用户权限
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
即可用新用户进行登录