环境搭建:
-
官网地址:http://www.rabbitmq.com/
-
环境描述:Linux(centos7 Redhat7)
1. 首先在Linux上进行一些软件的准备工作,yum下来一些基础的软件包
yum install build-essential openssl openssl-devel unixODBC unixODBC-devel make gcc gcc-c++ kernel-devel m4 ncurses-devel tk tc xz
配置好主机名称:/etc/hosts /etc/hostname
vim /etc/hosts
192.168.25.250 sssd250
vim /etc/hostname
sssd250
reboot
2. 下载RabbitMQ所需软件包
wget www.rabbitmq.com/releases/erlang/erlang-18.3-1.el7.centos.x86_64.rpm
wget http://repo.iotti.biz/CentOS/7/x86_64/socat-1.7.3.2-5.el7.lux.x86_64.rpm
wget www.rabbitmq.com/releases/rabbitmq-server/v3.6.5/rabbitmq-server-3.6.5-1.noarch.rpm
3. 安装服务命令
rpm -ivh erlang-18.3-1.el7.centos.x86_64.rpm
rpm -ivh socat-1.7.3.2-5.el7.lux.x86_64.rpm
rpm -ivh rabbitmq-server-3.6.5-1.noarch.rpm
4. 修改用户登录与连接心跳检测,注意修改
vim /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.5/ebin/rabbit.app
#修改点1:loopback_users 中的 <<"guest">>,只保留guest (用于用户登录)
#修改点2:heartbeat 为10(用于心跳连接)
5. 启动服务
# start | stop | status | restart
/etc/init.d/rabbitmq-server start
6.查看服务
#查看服务
lsof -i:5672
#开启mq管理插件
rabbitmq-plugins enable rabbitmq_management
7.访问
#访问
http://ip:15672/
#User And Password : guest