linux快速安装Rabbitmq
-
准备yum仓库
# root执行 rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc rpm --import https://packagecloud.io/rabbitmq/erlang/gpgkey rpm --import https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
-
准备仓库文件
# root执行 vim /etc/yum.repos.d/rabbitmq.repo
-
在rabbitmq.repo中填入如下内容
## ## Zero dependency Erlang ## [rabbitmq_erlang] name=rabbitmq_erlang baseurl=https://packagecloud.io/rabbitmq/erlang/el/7/$basearch repo_gpgcheck=1 gpgcheck=1 enabled=1 # PackageCloud's repository key and RabbitMQ package signing key gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt metadata_expire=300 [rabbitmq_erlang-source] name=rabbitmq_erlang-source baseurl=https://packagecloud.io/rabbitmq/erlang/el/7/SRPMS repo_gpgcheck=1 gpgcheck=0 enabled=1 # PackageCloud's repository key and RabbitMQ package signing key gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt metadata_expire=300 ## ## RabbitMQ server ## [rabbitmq_server] name=rabbitmq_server baseurl=https://packagecloud.io/rabbitmq/rabbitmq-server/el/7/$basearch repo_gpgcheck=1 gpgcheck=0 enabled=1 # PackageCloud's repository key and RabbitMQ package signing key gpgkey=https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt metadata_expire=300 [rabbitmq_server-source] name=rabbitmq_server-source baseurl=https://packagecloud.io/rabbitmq/rabbitmq-server/el/7/SRPMS 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
-
安装
# root执行 yum -y install erlang rabbitmq-server
-
启动
# root执行 # 使用systemctl管控,服务名:rabbitmq-server systemctl enable rabbitmq-server # 开机自启 systemctl disable rabbitmq-server # 关闭开机自启 systemctl start rabbitmq-server # 启动 systemctl stop rabbitmq-server # 关闭 systemctl status rabbitmq-server # 查看状态
-
关闭防火墙
# 以下操作2选1即可 # 方式1:关闭防火墙 systemctl stop firewalld #关闭防火墙 systemctl disable firewalld #停止防火墙开机自启 # 方式2:放行5672、15672、25672端口的外部访问 firewall-cmd --add-port=5672/tcp --permanent # 放行tcp规则下的5672端口,永久生效 firewall-cmd --add-port=15672/tcp --permanent # 放行tcp规则下的15672端口,永久生效 firewall-cmd --add-port=25672/tcp --permanent # 放行tcp规则下的25672端口,永久生效 firewall-cmd --reload # 重新加载防火墙规则
-
启动RabbitMQ的WEB管理控制台
rabbitmq-plugins enable rabbitmq_management
-
添加admin用户,并赋予权限
rabbitmqctl add_user admin 'admin' # rabbitmqctl add_user admin 'admin用户的密码' rabbitmqctl set_permissions -p "/" "admin" ".*" ".*" ".*" rabbitmqctl set_user_tags admin administrator
-
浏览器打开管理控制台IP:15672
文章来源地址https://www.toymoban.com/news/detail-624823.html文章来源:https://www.toymoban.com/news/detail-624823.html
到了这里,关于linux快速安装Rabbitmq的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!