安装erlang
# 安装编译环境
yum-yinstallmakegccgcc-c++kernel-devel m4 ncurses-devel openssl-devel
# 下载
wgethttp://erlang.org/download/otp_src_18.3.tar.gz
tar zvxf otp_src_18.3.tar.gz
cdotp_src_18.3
#配置 '--prefix'指定的安装目录
./configure--prefix=/usr/local/erlang--with-ssl-enable-threads-enable-smmp-support-enable-kernel-poll--enable-hipe--without-javac
#安装
make&&makeinstall
# 配置环境变量 修改/etc/profile
ERLANG_HOME=/usr/local/erlang# 添加
JAVA_HOME=/usr/java/jdk1.8.0_144
PATH=$ERLANG_HOME/bin:$JAVA_HOME/bin:$PATH# 添加
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
exportJAVA_HOME
exportCLASSPATH
exportERLANG_HOME#添加
exportPATH# 添加
# 验证是否安装成功
erl
Erlang/OTP18[erts-7.3] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V7.3 (abort with ^G)
1>
安装RabbitMQ
# 下载
wgethttp://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-generic-unix-3.6.1.tar.xz
# 解压
xz-drabbitmq-server-generic-unix-3.6.1.tar.xz
tar-vxfrabbitmq-server-generic-unix-3.6.1.tar
mvrabbitmq-server-generic-unix-3.6.1 /usr/local/rabbitmq-3.6.1
cd/usr/local/rabbitmq-3.6.1/sbin
#开启管理页面插件
./rabbitmq-plugins enable rabbitmq_management
#启动命令,该命令ctrl+c后会关闭服务
./rabbitmq-server
#在后台启动Rabbit
./rabbitmq-server-detached
#关闭服务
./rabbitmqctlstop
#关闭服务(kill) 找到rabbitmq服务的pid [不推荐]
ps-ef|grep rabbitmq
kill-9****
#进入RabbitMQ安装目录
cd/usr/local/rabbitmq-3.6.1/sbin
#添加用户
#rabbitmqctl add_user Username Password
./rabbitmqctl add_user admin123456
#[administrator]:管理员标签
./rabbitmqctl set_user_tags admin administrator
# 访问http://服务器IP地址:15672/
RabbitMQ常用端口(摘自网络) 4369 (epmd), 25672 (Erlang distribution) 5672, 5671 (AMQP 0-9-1 without and with TLS) 15672 (if management plugin is enabled) 61613, 61614 (if STOMP is enabled) 1883, 8883 (if MQTT is enabled)
网友评论