根据Rabbitmq官网安装介绍(http://www.rabbitmq.com/download.html),
一.安装Erlang(https://github.com/rabbitmq/erlang-rpm)
1.在/etc/yum.repos.d路径下新建文件rabbitmq_erlang.repo,内容入:
# In /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
2. yum install erlang 指令安装erlang。
二,安装rabbitmq-server。
1.在/etc/yum.repos.d路径下新建文件rabbitmq.repo,内容入:
[bintray-rabbitmq-server]
name=bintray-rabbitmq-rpm
baseurl=https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.7.x/el/7/
gpgcheck=0
repo_gpgcheck=0
enabled=1
2.下载rabbitmq-server-3.7.8-1.el7.noarch.rpm包,并放到/tmp/路径下。
3. yum install /tmp/rabbitmq-server-3.7.8-1.el7.noarch.rpm