系统: 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. 下载目录(自定义)
powershell
cd /opt/coisini/download
2. rpm安装
从github 或者官网下载
rpm --import https://github.com/rabbitmq/signing-keys/releases/download/3.0/rabbitmq-release-signing-key.asc
powershell
rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
3. 安装这些依赖项
powershell
yum install -y socat logrotate
从github下载太慢了,建议本地下载下来再上传,再执行后面的安装命令
powershell
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
安装:
powershell
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的
powershell
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的
powershell
firewall-cmd --add-port=4369/tcp --permanent
firewall-cmd --reload
查看开放了哪些端口
firewall-cmd --permanent --list-port
默认账号密码:guest guest(这个账号只允许本机访问)
查看所有用户 -> 添加 coisini用户 -> 配置权限 -> 查看用户权限 -> 设置tag -> 删除用户(出于安全考虑,删除默认用户)
powershell
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
powershell
rabbitmq-diagnostics status
8. 激活web管理插件:
web端直观一点
powershell
rabbitmq-plugins enable rabbitmq_management
现在访问:http://IP:15672/
感谢阅读,END~