CentOS6.8安装RabbitMQ
1、安装erlang
安装依赖包:
yum install xmlto gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel unixODBC-devel wxBase wxGTK wxGTK-gl perl -y
erlang下载:
百度云盘:http://pan.baidu.com/s/1c1UaGpU
官网地址:http://www.rabbitmq.com/releases/erlang/
注意:CentOS6和CentOS7是不同的版本,CentOS6为el6,CentOS7为el7
yum install -y erlang-19.0.4-1.el6.x86_64.rpm
2、安装RabbitMQ
RabbitMQ下载
百度地址:http://pan.baidu.com/s/1o8nZdAM
官网地址:http://www.rabbitmq.com/install-rpm.html
注意:CentOS6和CentOS7也是不同的版本
wget --no-cache http://www.convirture.com/repos/definitions/rhel/6.x/convirt.repo -O /etc/yum.repos.d/convirt.repo yum install -y socat rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc yum install -y rabbitmq-server-3.6.8-1.el6.noarch.rpm
3、启动RabbitMQ
#开启web管理插件 rabbitmq-plugins enable rabbitmq_management #启动服务 service rabbitmq-server start #添加用户和删除guest rabbitmqctl add_user admin 123456abc rabbitmqctl set_user_tags admin administrator rabbitmqctl delete_user guest rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*"
WEB访问:http://IP:15672/
用户名:admin 密码:123456abc
清空一个队列的数据
rabbitmqctl -p ${vhost-name} purge_queue ${queue-name}