linux CentOS 7 安装 RabbitMQ Erlang 21.0

时间:2022-11-02 06:08:50

1. 安装erlang

安装依赖环境

yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel unixODBC-devel

下载最新 Erlang 21.0

wget http://erlang.org/download/otp_src_21.0.tar.gz

解压

tar -xvzf otp_src_21.0.tar.gz

配置
./configure --prefix=/usr/local/erlang --with-ssl -enable-threads -enable-smmp-support -enable-kernel-poll --enable-hipe --without-javac

make

make install

配置/etc/profile

ERLANG_HOME=/usr/local/erlang
PATH=$PATH:$JAVA_HOME/bin:$ERLANG_HOME/bin

linux CentOS 7 安装 RabbitMQ  Erlang 21.0

使其生效

source /etc/profile

echo $PATH

检验erl

[root@iZ25sabz8p5Z sbin]# erl
Erlang/OTP 19 [erts-8.0] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V8.0  (abort with ^G)

2. 安装 rabbitmq

wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.3/rabbitmq-server-generic-unix-3.6.3.tar.xz

xz -drabbitmq-server-generic-unix-3.6.3.tar.xz

tar -xvfrabbitmq-server-generic-unix-3.6.3.tar

cd ./rabbitmq_server-3.6.3

cd sbin/

启用web管理界面

./rabbitmq-plugins enable rabbitmq_management

启动

./rabbitmq-server -detached

添加用户

./rabbitmqctl add_user admin 111111

设置权限

./rabbitmqctl set_user_tags admin administrator