rabbit mq依賴於erlang,因此須要先安裝erlang,而且rabbit mq不一樣版本對erlang的版本要求也不同。
這裏使用rabbit mq提供的erlang的包進行安裝erlanggit
添加鏡像
vim /etc/yum.repos.d/rabbitmq_erlang.repogithub
[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=300vim
[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=300ide
安裝yum install erlang
驗證是否安裝成功[xiaoshengyu@localhost ~]$ erl
url
下載rpmwget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.14/rabbitmq-server-3.7.14-1.el7.noarch.rpm
rest
導入密鑰code
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進行手動安裝便可server
設置守護進程,系統啓動時執行systemctl enable rabbitmq-server
啓動systemctl start rabbitmq-server
中止systemctl stop rabbitmq-server
rabbitmq
啓用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