rabbit mq依赖于erlang,所以需要先安装erlang,并且rabbit mq不同版本对erlang的版本要求也不一样。
这里使用rabbit mq提供的erlang的包进行安装erlang
添加镜像
vim /etc/yum.repos.d/rabbitmq_erlang.repo
[rabbitmq_erlang]
name=rabbitmq_erlang
baseurl=https://packagecloud.io/rabbitmq/erlang/el/7/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
[rabbitmq_erlang-source]
name=rabbitmq_erlang-source
baseurl=https://packagecloud.io/rabbitmq/erlang/el/7/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
安装yum install erlang
验证是否安装成功[xiaoshengyu@localhost ~]$ erl
下载rpmwget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.14/rabbitmq-server-3.7.14-1.el7.noarch.rpm
导入密钥
rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
安装yum install rabbitmq-server-3.7.14-1.el7.noarch.rpm
备注:如果这里安装失败,根据提示使用wget将依赖包socat下载到本地,然后使用rpm -ivh进行手动安装即可
设置守护进程,系统启动时执行systemctl enable rabbitmq-server
启动systemctl start rabbitmq-server
停止systemctl stop rabbitmq-server
启用rabbitmq_managementrabbitmq-plugins enable rabbitmq_management
重启rabbit mq/sbin/service rabbitmq-server restart
查看http服务开启,端口15672rabbitmqctl status | grep listeners
查看已经存在的用户rabbitmqctl list_users
新建用户rabbitmqctl add_user admin admin
授权rabbitmqctl set_user_tags admin administrator
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。