centos7安装rabbitMq
程序员文章站
2022-07-15 09:19:21
...
前言:按照官方文档遇到很多坑 最主要的就是 erlang 版本问题
1.直接指定rpm
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm//下载
rpm -ivh epel-release-6-8.noarch.rpm//安装
yum install erlang
- 安装rabbitmq rpm包:
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.5.0/rabbitmq-server-3.5.0-1.noarch.rpm
rpm -ivh rabbitmq-server-3.5.0-1.noarch.rpm
3.全新linux 防火墙设置
参考博客
https://www.cnblogs.com/kreo/p/4368811.html
4.前面出现的坑 解决
unable to connect to node aaa@qq.com: nodedown
# 先把rabbitmq进程杀掉
$ ps -ef | grep rabbitmq | grep -v grep | awk '{print $2}' | xargs kill -9
# 设置hostname(假设主机ip为:192.168.1.1,主机名设为:mq)
$ echo 192.168.1.1 mq > /etc/hosts
$ echo rabbitmq > /etc/hostname
$ export HOSTNAME=mq
# 重启rabbitmq
$ rabbitmq-server -detached
# 开启web socket服务
$ rabbitmq-plugins enable rabbitmq_management rabbitmq_web_stomp
# 设置用户并给予管理员权限
$ rabbitmqctl add_user duni duni
$ rabbitmqctl set_user_tags duni administrator
# 设置用户目录
$ rabbitmqctl set_permissions -p / duni ".*" ".*" ".*"
- curl localhost:15672
6.其他机器浏览器访问