1.卸载存在的rabbitmq
停止rabbitmq服务:
systemctl stop rabbitmq-server
查看rabbitmq安装的相关列表:
yum list | grep rabbitmq
卸载rabbitmq已安装的相关内容:
yum -y remove rabbitmq-server.noarch
查看erlang安装的相关列表:
yum list | grep erlang
卸载erlang已安装的相关内容:
yum -y remove erlang-* yum remove erlang.x86_64
删除有关的所有文件:
rm -rf /usr/lib64/erlang rm -rf /var/lib/rabbitmq rm -rf /usr/local/erlang rm -rf /usr/local/rabbitmq
2.安装
创建rabbitmq文件夹
erlang: wget https://github.com/rabbitmq/erlang-rpm/releases/download/v23.3.4.11/erlang-23.3.4.11-1.el7.x86_64.rpm
rabbitmq: wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.9.16/rabbitmq-server-3.9.16-1.el7.noarch.rpm
解压erlang:
rpm -Uvh erlang-23.3.........rpm
安装erlang:
yum install -y erlang
安装插件:
yum -install -y socat
解压rabbitmq:
yum install rabbitmq-server-3.....rpm
安装rabbitmq:
yum install rabbitmq-server -y
启动rabbitmq:
systemctl start rabbitmq-server ------ #status stop
开机启动:
systemctl enable rabbitmq-server
地址:
http://宿主机IP:15672 防火墙放开5672 15672端口
添加用户:
rabbitmqctl add_user admin admin
设置用户分配操作权限
rabbitmqctl set_user_tags admin administrator
为用户添加资源权限
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"