一,在Ubuntu上安装RabbirMQ
安装相关软件包
apt-get install curl gnupg apt-transport-https -y
添加密钥
curl -1sLf “https://keys.openpgp.org/vks/v1/by-fingerprint/0A9AF2115F4687BD29803A206B73A36E6026DFCA” | gpg --dearmor | tee /usr/share/keyrings/com.rabbitmq.team.gpg > /dev/null
添加 erlang的launchpad PPA
curl -1sLf “https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xf77f1eda57ebb1cc” | sudo gpg --dearmor | sudo tee /usr/share/keyrings/net.launchpad.ppa.rabbitmq.erlang.gpg > /dev/null
添加rabbitmq的仓库
curl -1sLf “https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey” | gpg --dearmor | tee /usr/share/keyrings/io.packagecloud.rabbitmq.gpg > /dev/null
安装相关软件包
tee /etc/apt/sources.list.d/rabbitmq.list
apt-get install erlang -y
apt-get install rabbitmq-server
查看系统的软件包:
apt-cache madison rabbitmq-server
安装
apt-get install rabbitmq-server=3.9.13-1 -y
启动服务
systemctl status rabbitmq-server
更新防火墙规则让RabbirMQ的服务端口可以通过
ufw allow 15672
ufw allow 5672
创建用户名:admin,密码:1234,赋予damin权限
rabbitmqctl add_user admin ‘1234’
rabbitmqctl set_permissions -p “/” “admin” “." ".” “.*”
rabbitmqctl set_user_tags admin administrator
查看是否注册
rabbitmqctl list_users
在浏览器输入
本机IP地址:15672
登陆成功