在安装RabbitMQ之前,需要先安装erlang。
wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
rpm --import http://packages.erlang-solutions.com/rpm/erlang_solutions.asc
yum -y install erlang
然后下载RabbitMQ 的 rpm包:
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.5/rabbitmq-server-3.6.5-1.noarch.rpm
由于需要依赖socat,否则会报错:
error: Failed dependencies:
socat is needed by rabbitmq-server-3.6.5-1.noarch
下载socat-1.7.2.3-1.el6.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/6/x86_64//socat-1.7.2.3-1.el6.x86_64.rpm
安装socat
rpm -ivh socat-1.7.2.3-1.el6.x86_64.rpm
安装rabbitmq-server-3.6.5-1.noarch.rpm
rpm -ivh rabbitmq-server-3.6.5-1.noarch.rpm
启动RabbiMQ:
service rabbitmq-server start
查看RabbitMQ状态
service rabbitmq-server status