大家好,又见面了,我是你们的朋友全栈君。
1、 添加EPEL源
代码语言:javascript复制dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
2、 安装 Erlang
代码语言:javascript复制dnf -y install wget
wget https://github.com/rabbitmq/erlang-rpm/releases/download/v21.3.8.6/erlang-21.3.8.6-1.el7.x86_64.rpm
dnf install -y erlang-21.3.8.6-1.el7.x86_64.rpm
erl
3、 添加RabbitMQ仓库
代码语言:javascript复制vi /etc/yum.repos.d/rabbitmq-server.repo
[rabbitmq-server]
name=rabbitmq-server
baseurl=https://packagecloud.io/rabbitmq/rabbitmq-server/el/7/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
4、 安装RabbitMQ
代码语言:javascript复制dnf makecache -y --disablerepo='*' --enablerepo='rabbitmq-server'
dnf install -y rabbitmq-server
rpm -qi rabbitmq-server
5、 配置防火墙
代码语言:javascript复制firewall-cmd --zone=public --permanent --add-port={4369,25672,5671,5672,15672,61613,61614,1883,8883}/tcp
firewall-cmd --reload
5、启动RabbitMQ服务和管理界面
代码语言:javascript复制systemctl start rabbitmq-server.service
systemctl enable rabbitmq-server.service
systemctl status rabbitmq-server.service
rabbitmqctl status
rabbitmq-plugins enable rabbitmq_management
chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/
rabbitmqctl add_user admin mypassword
rabbitmqctl set_user_tags admin administrator
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
6、访问RabbitMQ管理界面
用浏览器访问http://机器IP:15672打开管理界面,使用上一步配置好的admin账号登录。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/106417.html原文链接:https://javaforall.cn