安装Erlang
wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
sudo rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
sudo yum install erlang
安装RabbitMQ
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el7.noarch.rpm
sudo yum install socat
yum install rabbitmq-server-3.6.6-1.el7.noarch.rpm
常用命令
开机启动:sudo chkconfig rabbitmq-server on
启动服务:sudo /sbin/service rabbitmq-server start
查看状态:sudo /sbin/service rabbitmq-server status
停止服务:sudo /sbin/service rabbitmq-server stop
启动失败的话,修改 /etc/selinux/config,将SELINUX=disabled 后重启即可。
启动成功之后,http://localhost:15672就能访问了。rabbitmq3.+之后的版本默认只能本地访问。为了方便需要允许远程访问把 /usr/share/doc/rabbitmq-server-3.6.6/rabbitmq.config.example 复制一份到 /etc/rabbitmq/rabbitmq.config,在 rabbit 段中,按如下格式
[{rabbit, [{loopback_users, []}]}]