系统: CentOS Stream 9 部署
erlang官网:https://www.erlang.org/downloads
GitHub: https://github.com/rabbitmq/erlang-rpm/releases
官方文档:
https://www.rabbitmq.com/docs/3.13/install-rpm
最近使用源码编译安装erlang一直报错卡着,故放弃。选择rpm方式安装
1. 下载目录(自定义)
cd /opt/coisini/download
2. rpm安装
从github 或者官网下载
rpm --import https://github.com/rabbitmq/signing-keys/releases/download/3.0/rabbitmq-release-signing-key.asc
rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
3. 安装这些依赖项
yum install -y socat logrotate
从github下载太慢了,建议本地下载下来再上传,再执行后面的安装命令
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.13.7/rabbitmq-server-3.13.7-1.el8.noarch.rpm
RabbitMQ RPM包适用于RHEL 9(现代版)和基于RHEL 8(较旧版)的发行版 https://github.com/rabbitmq/rabbitmq-server/releases
安装:
yum install -y rabbitmq-server-3.13.7-1.el8.noarch.rpm
4. 开机自启:
systemctl enable rabbitmq-server
5. 相关命令
systemctl start rabbitmq-server
systemctl status rabbitmq-server
systemctl stop rabbitmq-server
6. 开放端口
rabbitmq的
firewall-cmd --add-port=15672/tcp --permanent
firewall-cmd --add-port=5672/tcp --permanent
firewall-cmd --add-port=9876/tcp --permanent
firewall-cmd --add-port=10909/tcp --permanent
firewall-cmd --add-port=10911/tcp --permanent
Erlang的
firewall-cmd --add-port=4369/tcp --permanent
firewall-cmd --reload
查看开放了哪些端口
firewall-cmd --permanent --list-port
默认账号密码:guest guest(这个账号只允许本机访问)
查看所有用户 -> 添加 coisini用户 -> 配置权限 -> 查看用户权限 -> 设置tag -> 删除用户(出于安全考虑,删除默认用户)
rabbitmqctl list_users
rabbitmqctl add_user coisini 123456
rabbitmqctl set_permissions -p "/" coisini ".*"".*"".*"
rabbitmqctl list_user_permissions coisini
rabbitmqctl set_user_tags coisini administrator
rabbitmqctl delete_user guest
7. 命令行查看rabbitmq
rabbitmq-diagnostics status
8. 激活web管理插件:
web端直观一点
官网介绍: https://www.rabbitmq.com/docs/3.13/management
rabbitmq-plugins enable rabbitmq_management
现在访问:http://IP:15672/
感谢阅读,END~
版权归原作者 coisini.cn 所有, 如有侵权,请联系我们删除。