Centos6.8安装RabbitMQ

Centos6.8安装RabbitMQ


  1. 安装erlang

    1.1.   安装依赖包

             1.1.1.  yum -y install ncurses-devel

             1.1.2.  yum list | grep ssl     yum install openssl-devel

             1.1.3.  yum list | grep ODBC  yum install unixODBC-devel

             1.1.4.  yum install gcc-c++   

             1.1.5.  yum install perl (自己补充的,不然会报错)

             1.1.6.  yum install libxslt yum install  rsync yum install  zip

             1.1.7.   yum -y install xmlto  

             1.1.8.  yum install gcc glibc-devel make ncurses-devel openssl-devel autoconf

  2. 下载erlang

    2.1. wget   http://www.erlang.org/download/otp_src_19.0.tar.gz

  3. 解压erlang

    2.2. tar zvxf otp_src_19.0.tar.gz  -C /usr/local 

    2.3. mv /user/otp_src_19.0.tar.gz /usr/local/otp (重命名)

    2.4 cd otp

  4. ./configure --prefix=/usr/local/erlang --without-javac 

                       --with-opengl --enable-debug --enable-unicode

  5. make && make install (编译erlang)

  6. vi /etc/profile (设置环境变量)

    6.1.  PATH=$PATH:/usr/local/erlang/bin
            export PATH

  7. cd /usr/local/erlang/bin

  8. 测试erl是否安装成功 

    8.1 erl

  9. 退出erl命令行

    9.1 halt().

  10. 安装python

    10.1 wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz

    10.2 mv Python-2.7.6.tgz python

    10.3 cd python

    10.4 ./configure --prefix=/usr/local/python27

    10.5 make && make install

    10.6 检测是否安装成功:python -v

=====================分割线===========================

1. wget 工具安装

    1.1. http://mirrors.163.com/centos/6.8/os/x86_64/Packages/wget-1.12-8.el6.x86_64.rpm

    1.2. rpm -ivh wget-1.12-8.el6.x86_64.rpm

1. xz工具安装

    2.2  解压xz文件

            2.2.1  安装xz    yum install xz

            2.2.1  xz -d xxx.tar.xz

            2.2.2  tar -xf xxx.tar -C /usr/local

=====================分割线===========================

#安装rabbitmq

1.下载

  wget  http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.5/rabbitmq-server-unix-3.1.5.tar.gz

2.解压

  tar xvf rabbitmq-server-unix-3.1.5.tar.gz

  mv rabbitmq-server-unix-3.1.5.tar.gz /usr/local/rabbitmq-server

#sbin命令

rabbitmqctl add_user admin admin 新增用户

rabbitmqctl set_user_tags admin administrator 设置为管理员

rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*" 设置权限

rabbitmq-plugins enable rabbitmq_management  配置web插件


#远程访问rabbitmq

iptables -F 关闭防火墙,开放端口

http://172.16.41.31:15672

#Java访问rabbitmq

vi /etc/rabbitmq/rabbitmq.config

[
 {rabbit,

  [
      {tcp_listeners, [5672]},
      {loopback_users, ["admin"]}
  ]}
].

端口

  • 4369 (epmd)

  • 5672, 5671 (AMQP 0-9-1 and 1.0 without and with TLS)

  • 25672. This port used by Erlang distribution for inter-node and CLI tools communication and is allocated from a dynamic range (limited to a single port by default, computed as AMQP port + 20000)

  • 15672 (if management plugin is enabled)

  • 61613, 61614 (if STOMP is enabled)

  • 1883, 8883 (if MQTT is enabled)


   修改虚拟机ip

vi /etc/sysconfig/network-scripts/ifcfg-eth0


 


评论

© dzxlovelar | Powered by LOFTER