首页 > Linux系统管理 > rabbitmq 安装
2019
05-08

rabbitmq 安装

在官网上下
https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.14/rabbitmq-server-3.7.14-1.el6.noarch.rpm
因为需要 erlang >= 20.3 yum安装的版本过低
就直接在官网上下个最新的包

wget http://erlang.org/download/otp_src_21.3.tar.gz
tar xvf otp_src_21.3.tar.gz
cd otp_src_21.3
./otp_build autoconf
./configure
make
make install

Erlang 默认安装路径为 /usr/local/lib/erlang
配置环境变量

vim /etc/profile
export ERLANG_HOME=/usr/local/lib/erlang
export PATH=$PATH:$ERLANG_HOME/bin

还需要 yum -y install socat
rpm -ivh rabbitmq-server-3.7.14-1.el6.noarch.rpm
我开始用yum安装了低版本的 erlang-erts-R14B 要先卸载
yum remove erlang-erts-R14B
也可以用yum的方式安装https://github.com/rabbitmq/erlang-rpm
To use the most recent version on CentOS 7:

# 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
To install the package:
 
yum install erlang
To use the most recent version on CentOS 6:
 
# In /etc/yum.repos.d/rabbitmq_erlang.repo
[rabbitmq_erlang]
name=rabbitmq_erlang
baseurl=https://packagecloud.io/rabbitmq/erlang/el/6/$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/6/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 clean all
yum makecache
yum install erlang

就安装好了

最后编辑:
作者:saunix
大型互联网公司linux系统运维攻城狮,专门担当消防员