fedora30(linux):安装rabbitmq 3.8.14
2023-09-14 09:01:18 时间
一,查看rabbitmq对应的erlang版本:
1,rabbitmq官网:
https://www.rabbitmq.com/
2,查看rabbitmq和erlang的对应版本
https://www.rabbitmq.com/which-erlang.html
如图:
说明:刘宏缔的架构森林是一个专注架构的博客,地址:https://www.cnblogs.com/architectforest
对应的源码可以访问这里获取: https://github.com/liuhongdi/
说明:作者:刘宏缔 邮箱: 371125307@qq.com
二,下载erlang并安装
请参见:
https://www.cnblogs.com/architectforest/p/14577393.html
三,下载rabbitmq:
1,从下载页面找到下载的地址:
https://www.rabbitmq.com/download.html
在下载页面,选择:
-
Install: Generic binary build
复制链接地址:
https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.14/rabbitmq-server-generic-unix-3.8.14.tar.xz
2,从命令行下载:
[root@localhost source]# wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.14/rabbitmq-server-generic-unix-3.8.14.tar.xz
四,安装rabbitmq
1,解压:
[root@localhost source]# xz -d rabbitmq-server-generic-unix-3.8.14.tar.xz [root@localhost source]# tar -xvf rabbitmq-server-generic-unix-3.8.14.tar
2,移动到安装目录:
[root@localhost source]# mv rabbitmq_server-3.8.14/ /usr/local/soft/
3,配置环境变量
[root@localhost source]# vi /etc/profile
内容:增加以下三行:
# rabbitMQ export RABBITMQ_PATH=/usr/local/soft/rabbitmq_server-3.8.14/sbin export PATH=$RABBITMQ_PATH:$PATH
使生效:
[root@localhost source]# source /etc/profile
4,启用管理插件:
[root@localhost source]# rabbitmq-plugins enable rabbitmq_management Enabling plugins on node rabbit@localhost: rabbitmq_management The following plugins have been configured: rabbitmq_management rabbitmq_management_agent rabbitmq_web_dispatch Applying plugin configuration to rabbit@localhost... The following plugins have been enabled: rabbitmq_management rabbitmq_management_agent rabbitmq_web_dispatch set 3 plugins. Offline change; changes will take effect at broker restart.
5,启动服务
[root@localhost source]# rabbitmq-server -detached
6,查看状态
[root@localhost source]# rabbitmqctl status
7,添加用户:
创建一个用户
[root@localhost source]# rabbitmqctl add_user root 123456
设置用户角色
[root@localhost source]# rabbitmqctl set_user_tags root administrator Setting tags for user "root" to [administrator] ...
列出所有用户
[root@localhost source]# rabbitmqctl list_users
Listing users ...
user tags
guest [administrator]
root [administrator]
设置权限
[root@localhost ~]# rabbitmqctl set_permissions -p / root ".*" ".*" ".*" Setting permissions for user "root" in vhost "/" ...
列出用户的权限
[root@localhost ~]# rabbitmqctl list_user_permissions root Listing permissions for user "root" ... vhost configure write read / .* .* .*
8,停止服务:
查看服务启动时的端口:
[root@localhost ~]# ss -lntp State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 0.0.0.0:25672 0.0.0.0:* users:(("beam.smp",pid=112195,fd=80)) LISTEN 0 128 0.0.0.0:4369 0.0.0.0:* users:(("epmd",pid=109598,fd=3)) LISTEN 0 1024 0.0.0.0:15672 0.0.0.0:* users:(("beam.smp",pid=112195,fd=93)) LISTEN 0 128 *:5672 *:* users:(("beam.smp",pid=112195,fd=94)) LISTEN 0 128 [::]:4369 [::]:* users:(("epmd",pid=109598,fd=4)) LISTEN 0 50 *:1716 *:* users:(("kdeconnectd",pid=1341,fd=13))
关闭服务
[root@localhost ~]# rabbitmqctl stop
Stopping and halting node rabbit@localhost …
查看服务关闭后的端口:
[root@localhost ~]# ss -lntp State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 0.0.0.0:4369 0.0.0.0:* users:(("epmd",pid=109598,fd=3)) LISTEN 0 128 [::]:4369 [::]:* users:(("epmd",pid=109598,fd=4)) LISTEN 0 50 *:1716 *:* users:(("kdeconnectd",pid=1341,fd=13))
说明:从rabbitmqctl status命令也可以看到rabbitmq所启用的端口
Interface: [::], port: 15672, protocol: http, purpose: HTTP API Interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication Interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
五,从浏览器测试效果:
1,访问:
http://127.0.0.1:15672/
返回:
此处可以用guest/guest登录,
我们用我们所创建的root/123456登录
六,查看rabbitmq的版本:
[root@localhost ~]# rabbitmqctl --version 3.8.14
七,查看linux的版本:
[root@localhost ~]# more /etc/redhat-release Fedora release 30 (Thirty)
相关文章
- Linux下RabbitMQ安装、运行与管理
- linux下nginx+svn
- linux shell 脚本攻略学习3
- Oracle Linux Server release 6.3 下安装JDK
- linux软件安装
- Linux下安装MySql8
- linux命令语法格式
- Linux下安装Tomcat服务器和部署Web应用
- 【转】You Can Now Use OneDrive in Linux Natively Thanks to Insync
- linux ubuntu22.04安装eDEX-UI:命令操作及系统资源负载监控大屏
- Linux ubuntu22.04安装kvm虚拟机
- eclipse中没有MinGW GCC/Cross GCC/Cygwin GCC/linux GCC/MacOSX GCC/MinGW GCC/Solaris GCC(编译器)
- Linux centos环境 安装谷歌浏览器
- linux 3.4.103 内核移植到 S3C6410 开发板 移植失败 (问题总结,日本再战!)
- Linux fork函数具体图解-同一时候分析一道腾讯笔试题
- Linux系统shell脚本实战之解决生产ddos攻击
- linux curl命令常用总结——筑梦之路
- 01-rna-seq从头开始 卖萌哥 Linux生信技能树Linux安装软件 Linux实战RNASEQ上游
- Linux搭建arm的qemu模拟器
- Linux - Eclipse CDT + GCC 安装(2014.10.2)
- linux 安装ssh以及ssh用法与免密登录
- 【整理】Linux下中文检索引擎coreseek4安装,以及PHP使用sphinx的三种方式(sphinxapi,sphinx的php扩展,SphinxSe作为mysql存储引擎)
- linux kvm 命令行安装Windows xp虚拟机
- MySQL手动安装Linux教程