CentOS7安裝RabbitMQ3.7

CentOS7安裝RabbitMQ3.7

安裝Erlang

rabbit mq依賴於erlang,因此須要先安裝erlang,而且rabbit mq不一樣版本對erlang的版本要求也不同。
這裏使用rabbit mq提供的erlang的包進行安裝erlang
git

添加鏡像
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 ~]$ erlurl

安裝rabbit mq

下載rpm
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.14/rabbitmq-server-3.7.14-1.el7.noarch.rpmrest

導入密鑰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-serverrabbitmq

安裝管理界面

啓用rabbitmq_management
rabbitmq-plugins enable rabbitmq_management
重啓rabbit mq
/sbin/service rabbitmq-server restart
查看http服務開啓,端口15672
rabbitmqctl status | grep listeners進程

建立用戶及受權

查看已經存在的用戶
rabbitmqctl list_users

新建用戶
rabbitmqctl add_user admin admin

受權
rabbitmqctl set_user_tags admin administrator

相關文章
相關標籤/搜索