当前位置:   article > 正文

Centos7下安装部署rabbitmq3.8.9+erlang23.0_erlang 23安装 centos

erlang 23安装 centos

Centos7下安装部署rabbitmq3.8.9

一、背景描述
本次安装采用二进制安装erlang,系统版本:CentOS Linux release 7.8.2003 (Core),erlang版本:23.0,rabbitmq版本:3.8.9
rabbitmq与erlang 版本兼容表
官方连接:https://www.rabbitmq.com/which-erlang.html
二、安装jdk环境
jdk版本:
jdk-8u121-linux-x64
自行下载jdk
将jdk包解压到/usr/loca/ljdk 目录
设置环境变量
vim /etc/profile
增加以下环境变量

export JAVA_HOME=/usr/local/jdk
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH
  • 1
  • 2
  • 3

验证jdk环境

[root@localhost src]# source /etc/profile
[root@localhost src]# java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
  • 1
  • 2
  • 3
  • 4
  • 5

二、编译安装erlang
参考连接:https://blog.csdn.net/TStana/article/details/73648935
erlang下载地址:https://www.erlang.org/downloads
下载erlang源码:http://erlang.org/download/otp_src_23.0.tar.gz
通过wget 或者迅雷下载传到服务器
解压编译安装
安装依赖包

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

配置安装路径编译代码:
进入解压目录设置 安装目录 和 编译免javac

./configure --prefix=/usr/lib/erlang --without-javac
  • 1

编译完成后执行

make & make install
  • 1

安装

[root@localhost otp_src_23.0]# /usr/lib/erlang/bin/erl version
Erlang/OTP 23 [erts-11.0] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]
>
>
  • 1
  • 2
  • 3
  • 4

添加环境变量

export PATH=$PATH:/usr/lib/erlang/bin
  • 1

三、安装rabbitmq

下载地址:https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.9/rabbitmq-server-generic-unix-3.8.9.tar.xz

tar -xvf rabbitmq-server-generic-unix-3.8.9.tar 
mv rabbitmq_server-3.8.9/ /usr/local/rabbitmq
  • 1
  • 2

添加环境变量:

export PATH=$PATH:/usr/lib/erlang/bin:/usr/local/rabbitmq/sbin
  • 1

启动rabbitmq

[root@localhost src]# /usr/local/rabbitmq/sbin/rabbitmq-server -detached
[root@localhost src]# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:4369            0.0.0.0:*               LISTEN      28808/epmd          
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1098/sshd           
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1641/master         
tcp        0      0 0.0.0.0:16379           0.0.0.0:*               LISTEN      2657/redis-server 0 
tcp        0      0 0.0.0.0:16380           0.0.0.0:*               LISTEN      2663/redis-server 0 
tcp        0      0 0.0.0.0:25672           0.0.0.0:*               LISTEN      28714/beam.smp      
tcp        0      0 0.0.0.0:6379            0.0.0.0:*               LISTEN      2657/redis-server 0 
tcp        0      0 0.0.0.0:6380            0.0.0.0:*               LISTEN      2663/redis-server 0 
tcp6       0      0 :::4369                 :::*                    LISTEN      28808/epmd          
tcp6       0      0 :::22                   :::*                    LISTEN      1098/sshd           
tcp6       0      0 ::1:25                  :::*                    LISTEN      1641/master         
tcp6       0      0 :::5672                 :::*                    LISTEN      28714/beam.smp 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

开启Web管理界面

[root@localhost src]# rabbitmq-plugins enable rabbitmq_management
Enabling plugins on node rabbit@localhost:
rabbitmq_management
The following plugins have been configured:
  rabbitmq_management
  rabbitmq_management_agent
  rabbitmq_web_dispatch
Applying plugin configuration to rabbit@localhost...
The following plugins have been enabled:
  rabbitmq_management
  rabbitmq_management_agent
  rabbitmq_web_dispatch

started 3 plugins.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

添加登录用户

[root@localhost src]# rabbitmqctl add_user admin 123456
Adding user "admin" ...
[root@localhost src]# rabbitmqctl set_user_tags admin administrator
Setting tags for user "admin" to [administrator] ...
  • 1
  • 2
  • 3
  • 4

登录
在这里插入图片描述
在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/568760
推荐阅读
相关标签
  

闽ICP备14008679号