(1条消息) centos7下 rabbitmq erlang 的下载地址,的安装,源码安装,rpm安装

erlang 与 rabbitmq 正确的版本匹配 https://www.rabbitmq.com/which-erlang.html

erlang下载地址 :1  http://erlang.org/download/

2  https://www.erlang.org/downloads/21.3

3  https://www.erlang-solutions.com/resources/download.html

https://packagecloud.io/rabbitmq/erlang/packages/el/7/erlang-21.3.8.14-1.el7.x86_64.rpm

rabbitmq下载地址:https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.8.0

推荐rpm安装erlang ,rabbitmq (安装简单)

1 创建目录:mkdir /usr/local/erlang    mkdir /usr/local/rabbitmq (将下载的rpm包分别放在文件夹里面 - 我用 xftp6 将文件从本机电脑 放入 虚拟机)

erlang:https://packagecloud.io/rabbitmq/erlang/packages/el/7/erlang-21.3.8.14-1.el7.x86_64.rpm

找到:rabbitmq-server-3.8.0-1.el7.noarch.rpm

rabbitmq:https://packagecloud.io/rabbitmq/erlang/packages/el/7/erlang-21.3.8.14-1.el7.x86_64.rpm

2 安装erlang需要的支持 :

yum install -y gcc

yum install -y perl

yum install -y ncurses-devel

yum install -y openssl openssl-devel

yum -y install unixODBC-devel  (如果还有漏安装的,按照报错提示补上)

安装erlang :cd /usr/local/erlang

rpm -ivh erlang-21.3.8.14-1.el7.x86_64.rpm

安装rabbitmq:cd /usr/local/rabbitmq

yum install socat

rpm -ivh rabbitmq-server-3.8.0-1.el7.noarch.rpm

配置rabbitmq:find / -name rabbit.app

vi rabbit.app      然后这里改为:

systemctl start rabbitmq-server

rabbitmq-plugins enable rabbitmq_management

chkconfig rabbitmq-server on

重启虚拟机验证 rabbitmq 是否开机自启

例:tar安装 rabbitmq-server-generic-unix-3.8.0.tar.xz

erlang:

一、yum方式安装

1、安装依赖项

yum install -y epel-release

2、添加存储库条目

  1. wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
  2. rpm -Uvh erlang-solutions-1.0-1.noarch.rpm

3、安装

yum install -y erlang

4、验证是否安装成功

erl -version

出现“Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.5”证明安装成功

二、rpm方式安装

1、安装依赖项

yum install -y epel-release

2、下载rpm包

wget https://packages.erlang-solutions.com/erlang/rpm/centos/7/x86_64/esl-erlang_22.1-1~centos~7_amd64.rpm

3、安装

yum install esl-erlang_22.1-1~centos~7_amd64.rpm

4、验证

erl -version

出现“Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.5”证明安装成功

三、源码安装 (make 安装后,需要卸载重装的话,直接在(/opt/erlang)目录执行 make uninstall,或者直接删除/opt/erlang目录,再执行一次下面的操作)

yum install -y gcc
  1. cd /usr/local/bin
  2. wget http://erlang.org/download/otp_src_22.1.tar.gz
  1. tar -zxvf otp_src_22.1.tar.gz
  2. cd otp_src_22.1
yum install -y perl
yum install -y ncurses-devel
yum install -y openssl openssl-devel
yum -y install unixODBC-devel
./configure --prefix=/opt/erlang --without-javac
make && make install

配置环境变量并且使环境变量生效

  1. echo 'export PATH=$PATH:/opt/erlang/bin' >> /etc/profile
  2. source /etc/profile

验证是否安装成功

erl -version

出现“Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 10.5”信息则证明安装成功了。

rabbimq:

注:erlang 的依赖一定要确保安装成功,不然rabbitmq启动不了,会出现很多问题。

例:rabbitmq-server-generic-unix-3.8.0.tar.xz

xz -d rabbitmq-server-generic-unix-3.8.0.tar.xz
  tar -xvf rabbitmq-server-generic-unix-3.8.0.tar -C /opt

cd /opt
  mv rabbitmq_server-3.8.0 rabbitmq

vim /etc/profile
  最后一行添加以下变量:
  export PATH=$PATH:/opt/rabbitmq/sbin

source /etc/profile

守护进程启动

rabbitmq-server -detached

rabbitmqctl status

取消 guest 用户 localhost 登录限制
  vim /opt/rabbitmq/ebin/rabbit.app

往下找到 {loopback_users , [<<"guest">>] }改为{loopback_users , [] }

启用 web 管控台插件
  rabbitmq-plugins enable rabbitmq_management

注:cd /etc/init.d 可以执行 rabbitmq-server start / stop /status

(0)

相关推荐