vi /etc/yum.repos.d/rabbitmq_erlang.repo
将下面内容添加到 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 -y erlang
注意:下面命令可能提示不存在,不过没有关系,我们可以直接去安装 RabbitMQ。
erl -version
rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
cd /otp/ mkdir RabbitMQ wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.2/rabbitmq-server-3.8.2-1.el7.noarch.rpm
yum install rabbitmq-server-3.8.2-1.el7.noarch.rpm