安装依赖环境

首先要安装RabbitMQ,需要安装ncurses-devel和erlang
 root@fangxin-test:~# cd /data/soft/
 root@fangxin-test:~#wget  ftp://ftp.invisible-island.net/ncurses/ncurses.tar.gz
 root@fangxin-test:~#wget  http://erlang.org/download/otp_src_22.0.tar.gz   #下载很慢 我这里存放到我的网盘下面了
     安装ncuress-devel
     root@fangxin-test:/data/soft# tar xf ncurses.tar.gz
     root@fangxin-test:/data/soft# cd ncurses-6.1/
     root@fangxin-test:/data/soft/ncurses-6.1# ./configure --with-shared  --without-ada --enable-overwrite
     root@fangxin-test:/data/soft/ncurses-6.1# make -j4&& make install
     安装erlang
     注意版本一定要对应,否则会报错
     我这里下载存放到我的网盘:链接: https://pan.baidu.com/s/15xUWT6eZlWdfNVHs8HkSng 提取码: nizt

RabbitMQ安装配置-01

.

root@fangxin-test:/data/soft#tar xf otp_src_22.0.tar.gz
root@fangxin-test:/data/soft/ncurses-6.1# cd ../otp_src_22.0/
root@fangxin-test:/data/soft/otp_src_22.0#./configure --prefix=/usr/local/erlang --without-javac
root@fangxin-test:/data/soft/otp_src_22.0# make -j4&& make install

RabbitMQ安装配置-01

.

出现上面的图示 代表configure完毕
root@fangxin-test:/data/soft/otp_src_22.0# cd /usr/local/erlang/
root@fangxin-test:/usr/local/erlang# ls bin/
     ct_run  dialyzer  epmd  erl  erlc  escript  run_erl  to_erl  typer
root@fangxin-test:/usr/local/erlang# 

设置环境变量

export PAYTH=/usr/local/erlang/bin:/usr/local/rabbitmq/sbin:$PAT

安装rabbitMQ

root@fangxin-test:/data/soft# wget  https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.7.15/rabbitmq-server-generic-unix-3.7.15.tar.xz
    root@fangxin-test:/data/soft# tar xf  rabbitmq-server-generic-unix-3.7.15.tar.xz
  root@fangxin-test:/data/soft# mv rabbitmq_server-3.7.15/ /usr/local/rabbitmq

RabbitMQ安装配置-01

加载环境变量

root@fangxin-test:/data/soft# source  /etc/profile

安装web插件和启动rabbitMQ

root@fangxin-test:/data/soft# cd /usr/local/rabbitmq/sbin/
root@fangxin-test:/usr/local/rabbitmq/sbin#./rabbitmq-plugins enable rabbitmq_management

RabbitMQ安装配置-01

启动rabbitMQ

root@fangxin-test:/usr/local/rabbitmq# ./sbin/rabbitmq-server  -detached

RabbitMQ安装配置-01

查看启动端口

  web:15672
  rabbitMQ: 5672

RabbitMQ安装配置-01

登录web

 (如果是在其他机器上(不是本机)输入ip:15672访问到Rabbit登录管理界面的不能用guest登录,只能新添加一个用户登录)
     ./rabbitmqctl add_user admin  admin12300.
./rabbitmqctl set_user_tags admin  administrator

RabbitMQ安装配置-01

设置参数

root@fangxin-test:/usr/local/rabbitmq# vim sbin/rabbitmq-server

RabbitMQ安装配置-01