首页 > 其他分享 >部署RibbitMQ-4.0.2

部署RibbitMQ-4.0.2

时间:2024-10-29 09:22:57浏览次数:6  
标签:... 4.0 RibbitMQ 部署 0.0 rabbitmq gb rabbit erlang

1.前置工作

1.1 下载erlang和rabbitMQ

erlang-otp-OTP-27.1-0-g9ae2ef5.tar.gz
rabbitmq-server-generic-unix-4.0.2.tar.xz

2.安装系统依赖包

# ⾸先安装依赖包
yum install -y gcc gcc-c++ ncurses-devel unixODBC unixODBC-devel mesa-libGL-devel 
freeglut-devel wxGTK3-devel --nogpgcheck

3.部署erlang和rabbitMQ

3.1 解压安装包

# 解压安装包
tar zxf $HOME/setup/erlang-otp-OTP-27.1-0-g9ae2ef5.tar.gz -C $HOME/setup/

# 解压 RabbitMQ 可直接使⽤
tar xf $HOME/setup/rabbitmq-server-generic-unix-4.0.2.tar.xz -C $HOME
mv rabbitmq_server-4.0.2 rabbitmq

4.配置erlang和rabbitMQ并验证

# 编译安装erlang
cd $HOME/setup/erlang-otp-83d009c/
./configure \
--prefix=$HOME/erlang-otp
# ========================
# 关注最后的是否为yes
checking for standard build of wxWidgets... yes
checking for wxwidgets 3.0 compatibility ... yes
checking for wxwidgets opengl support... yes
checking for GLintptr... yes
checking for GLintptrARB... yes
checking for GLchar... yes
checking for GLcharARB... yes
checking for GLhalfARB... yes
checking for GLint64EXT... yes
checking GLU Callbacks uses Tiger Style... no
checking if we can link wxwidgets programs... yes
checking if we can add -Werror=return-type to CFLAGS (via CFLAGS)... yes
checking if we can add -Werror=return-type to CXXFLAGS (via CFLAGS)... yes
configure: creating aarch64-unknown-linux-gnu/config.status
config.status: creating config.mk
config.status: creating c_src/Makefile
# ========================
# 编译安装
make && make install

# 验证erlang
cd $HOME/erlang-otp/bin/
./erl
Erlang/OTP 27 [erts-15.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit]
Eshell V15.1 (press Ctrl+G to abort, type help(). for help)
1> halt(). # 可退出
# 注:证明成功

5.配置环境变量

# erlang和rabbitMQ 环境变量
vi $HOME/.bashrc 
export PATH=$PATH:$HOME/erlang-otp/bin
export PATH=$PATH:$HOME/rabbitmq/sbin
export PATH
source $HOME/.bashrc

5.启动rabbitMQ

# 启动rabbitMQ
rabbitmq-server -detached

6.查看rabbitMQ状态

# 查看rabbitMQ状态
rabbitmqctl status
# 提示如下:
Status of node rabbit@ecs-6ca1 ...
Runtime
OS PID: 197719
OS: Linux
Uptime (seconds): 10
Is under maintenance?: false
RabbitMQ version: 4.0.2
RabbitMQ release series support status: see https://www.rabbitmq.com/release-information
Node name: rabbit@ecs-6ca1

Erlang configuration: Erlang/OTP 27 [erts-15.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] 
[async-threads:1] [jit]
Crypto library: OpenSSL 1.1.1f 31 Mar 2020
Erlang processes: 298 used, 1048576 limit
Scheduler run queue: 1
Cluster heartbeat timeout (net_ticktime): 60
Plugins
Enabled plugin file: /root/rabbitmq/etc/rabbitmq/enabled_plugins
Enabled plugins:
Data directory
Node data directory: /root/rabbitmq/var/lib/rabbitmq/mnesia/rabbit@ecs-6ca1
Raft data directory: /root/rabbitmq/var/lib/rabbitmq/mnesia/rabbit@ecs-
6ca1/quorum/rabbit@ecs-6ca1
Config files
Log file(s)
 * /root/rabbitmq/var/log/rabbitmq/[email protected]
 * <stdout>
Alarms
(none)
Memory
Total memory used: 0.0923 gb
Calculation strategy: rss
Memory high watermark setting: 0.6 of available memory, computed to: 4.2861 gb
reserved_unallocated: 0.0376 gb (40.67 %)
code: 0.0162 gb (17.54 %)
other_proc: 0.0156 gb (16.91 %)
other_system: 0.0149 gb (16.11 %)
allocated_unused: 0.0041 gb (4.4 %)
other_ets: 0.0021 gb (2.31 %)
atom: 0.001 gb (1.03 %)
metrics: 0.0006 gb (0.68 %)
msg_index: 0.0001 gb (0.14 %)
mnesia: 0.0001 gb (0.08 %)
binary: 0.0 gb (0.04 %)
metadata_store: 0.0 gb (0.04 %)
quorum_ets: 0.0 gb (0.03 %)
plugins: 0.0 gb (0.01 %)
metadata_store_ets: 0.0 gb (0.01 %)
quorum_queue_procs: 0.0 gb (0.0 %)
quorum_queue_dlx_procs: 0.0 gb (0.0 %)
stream_queue_procs: 0.0 gb (0.0 %)
stream_queue_replica_reader_procs: 0.0 gb (0.0 %)
connection_readers: 0.0 gb (0.0 %)
connection_writers: 0.0 gb (0.0 %)
connection_channels: 0.0 gb (0.0 %)
connection_other: 0.0 gb (0.0 %)
queue_procs: 0.0 gb (0.0 %)
stream_queue_coordinator_procs: 0.0 gb (0.0 %)
mgmt_db: 0.0 gb (0.0 %)
File Descriptors
Total: 0, limit: 65438
Free Disk Space
Low free disk space watermark: 0.05 gb
Free disk space: 52.1926 gb
Totals
Connection count: 0
Queue count: 0
Virtual host count: 1
Listeners
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

7.查看rabbitMQ进程

# 查看 rabbitMQ 进程
ps -ef|grep rabbit
# 提示如下:
root 197719 1 3 00:32 ? 00:00:01 /root/erlang-otp/lib/erlang/erts-15.1/bin/beam.smp -W w -MBas ageffcbf -MHas ageffcbf -MBlmbcs 512 -MHlmbcs 512 -MMmcs 30 -pc unicode -P 1048576 -t 5000000 -stbt db -zdbbl 128000 -sbwt none -sbwtdcpu none -sbwtdio none -B i -- -root /root/erlang-otp/lib/erlang -bindir /root/erlang-otp/lib/erlang/erts-15.1/bin -progname erl -- -home /root -- -pa -noshell -noinput -s rabbit boot -boot start_sasl -syslog logger [] -syslog syslog_error_logger false -kernel prevent_overlapping_partitions false -detached -noshell -noinput --
root 197750 197723 0 00:32 ? 00:00:00 /bin/sh -s rabbit_disk_monitor

8.配置rabbitMQ

# 验证后配置rabbitMQ
rabbitmqctl stop
# 提示如下:
Stopping and halting node rabbit@ecs-6ca1 ...

# 配置⽹⻚插件
rabbitmq-plugins enable rabbitmq_management
# 提示如下:
Enabling plugins on node rabbit@ecs-6ca1:
rabbitmq_management
The following plugins have been configured:
 rabbitmq_management
 rabbitmq_management_agent
 rabbitmq_web_dispatch
Applying plugin configuration to rabbit@ecs-6ca1...
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. # 提示重启服务

# 重启服务
rabbitmq-server -detached
rabbitmqctl status

# 提示如下:
Status of node rabbit@ecs-6ca1 ...
Runtime
OS PID: 197902
OS: Linux
Uptime (seconds): 7
Is under maintenance?: false
RabbitMQ version: 4.0.2
RabbitMQ release series support status: see https://www.rabbitmq.com/release-information
Node name: rabbit@ecs-6ca1
Erlang configuration: Erlang/OTP 27 [erts-15.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] 
[async-threads:1] [jit]
Crypto library: OpenSSL 1.1.1f 31 Mar 2020
Erlang processes: 390 used, 1048576 limit
Scheduler run queue: 1
Cluster heartbeat timeout (net_ticktime): 60
Plugins
Enabled plugin file: /root/rabbitmq/etc/rabbitmq/enabled_plugins
Enabled plugins:
 * rabbitmq_management
 * rabbitmq_management_agent
 * rabbitmq_web_dispatch
 * amqp_client
 * cowboy
 * cowlib
 * oauth2_client
 * jose
Data directory

Node data directory: /root/rabbitmq/var/lib/rabbitmq/mnesia/rabbit@ecs-6ca1
Raft data directory: /root/rabbitmq/var/lib/rabbitmq/mnesia/rabbit@ecs-
6ca1/quorum/rabbit@ecs-6ca1
Config files
Log file(s)
 * /root/rabbitmq/var/log/rabbitmq/[email protected]
 * <stdout>
Alarms
(none)
Memory
Total memory used: 0.1047 gb
Calculation strategy: rss
Memory high watermark setting: 0.6 of available memory, computed to: 4.2861 gb
reserved_unallocated: 0.0436 gb (41.68 %)
code: 0.0188 gb (17.95 %)
other_proc: 0.0157 gb (14.99 %)
other_system: 0.0156 gb (14.94 %)
allocated_unused: 0.0059 gb (5.6 %)
other_ets: 0.0024 gb (2.31 %)
atom: 0.0011 gb (1.03 %)
metrics: 0.0006 gb (0.62 %)
plugins: 0.0005 gb (0.43 %)
mgmt_db: 0.0001 gb (0.13 %)
msg_index: 0.0001 gb (0.12 %)
mnesia: 0.0001 gb (0.07 %)
binary: 0.0001 gb (0.05 %)
metadata_store: 0.0 gb (0.03 %)
quorum_ets: 0.0 gb (0.02 %)
metadata_store_ets: 0.0 gb (0.01 %)
connection_other: 0.0 gb (0.0 %)
quorum_queue_procs: 0.0 gb (0.0 %)
quorum_queue_dlx_procs: 0.0 gb (0.0 %)
stream_queue_procs: 0.0 gb (0.0 %)
stream_queue_replica_reader_procs: 0.0 gb (0.0 %)
connection_readers: 0.0 gb (0.0 %)
connection_writers: 0.0 gb (0.0 %)
connection_channels: 0.0 gb (0.0 %)
queue_procs: 0.0 gb (0.0 %)
stream_queue_coordinator_procs: 0.0 gb (0.0 %)
File Descriptors
Total: 0, limit: 65438
Free Disk Space
Low free disk space watermark: 0.05 gb
Free disk space: 52.1925 gb
Totals
Connection count: 0
Queue count: 0
Virtual host count: 1
Listeners
Interface: [::], port: 15672, protocol: http, purpose: HTTP API # 多出来web⻚⾯
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

9.页面访问权限配置

# 可访问地址
http://192.168.19.128:15672/
默认⽤户:guest # ⽆法正常远程登录
默认密码:guest

9.1 权限配置

# 远程访问配置注意点:
# 默认⽹⻚是不允许访问的,需要增加⼀个⽤户修改⼀下权限,代码如下:
# 添加⽤户(⽤户名 密码):rabbitmqctl add_user <username> <password>
rabbitmqctl add_user <username> <password>
# 提示创建
Adding user "<username>" ...
# Done. Don't forget to grant the user permissions to some virtual hosts! See 'rabbitmqctl help set_permissions' to learn more.

# 添加权限(最⾼权限):
rabbitmqctl set_permissions -p "/" <username> ".*" ".*" ".*"
# Setting permissions for user "<username>" in vhost "/" ...

# 修改⽤户⻆⾊(管理员):rabbitmqctl set_user_tags <username> administrator
rabbitmqctl set_user_tags <username> administrator
# Setting tags for user "<username>" to [administrator] ...
# 然后就可以远程访问了,接下来可直接配置其他⽤户权限等信息。

标签:...,4.0,RibbitMQ,部署,0.0,rabbitmq,gb,rabbit,erlang
From: https://www.cnblogs.com/imTxl/p/18512171

相关文章

  • 部署nginx-1.26.2
    1.前置工作1.1下载包zlib-1.3.1.tar.gzopenssl-3.2.2.tar.gzpcre2-10.44.tar.gznginx-1.26.2.tar.gz2.创建目录#创建⽬录mkdir-p/data/nginx/logschmod755/root#重要配置chown-Rroot:root/data/nginx3.解压安装包#前提条件,取决于nginx版本问题,由于⽐较......
  • 基于Springboot+Vue 药品药房管理系统(源码+LW+部署讲解+数据库+ppt)
    !!!!!!!!!会持续一直更新下去有问必答一键收藏关注不迷路源码获取:https://pan.baidu.com/s/1aRpOv3f2sdtVYOogQjb8jg?pwd=jf1d提取码:jf1d !!!!!!!!!项目介绍随着医疗行业的快速发展和对药品管理要求的提高,一个功能齐全、界面友好的药品药房管理系统应运而生。该系统旨在帮助医院和药店......
  • 使用Ubuntu系统管理包工具(apt)部署Zabbix企业级监控系统
    1.系统版本UbuntuVERSION=22.04.4LTS2.zabbix安装2.1zabbix官方https://www.zabbix.com/cn/download?zabbix=7.0&os_distribution=ubuntu&os_version=22.04&components=server_frontend_agent&db=mysql&ws=apache2.2配置选择2.3使用Ubuntu的管理包工具(apt)部......
  • 【大模型系列】mPLUG-Owl3(2024.08)
    Paper:https://arxiv.org/pdf/2408.04840Github:https://github.com/X-PLUG/mPLUG-OwlHuggingFace:https://huggingface.co/mPLUG/mPLUG-Owl3-7B-240728Author:JiaboYeetal.阿里巴巴文章目录0总结(省流版)1模型结构1.1Cross-attentionBasedAchitecture1.2H......
  • 基于springboot+vue的Java的新生入学报到系统的设计与实现(源码+lw+部署文档+讲解等)
    课题摘要本课题聚焦于设计和开发一个高效、便捷、准确的基于SpringBoot+Vue的Java新生入学报到系统,以优化新生报到流程,提高学校迎新工作的效率和质量,为新生提供良好的入学体验。该系统涵盖新生信息管理、报到流程管理、宿舍分配管理、缴费管理、迎新通知与指引、数......
  • YOLOv6-4.0部分代码阅读笔记-anchor_generator.py
    anchor_generator.pyyolov6\assigners\anchor_generator.py目录anchor_generator.py1.所需的库和模块2.defgenerate_anchors(feats,fpn_strides,grid_cell_size=5.0,grid_cell_offset=0.5, device='cpu',is_eval=False,mode='af'): 1.所需的库和模块imp......
  • YOLOv6-4.0部分代码阅读笔记-assigner_utils.py
    assigner_utils.pyyolov6\assigners\assigner_utils.py目录assigner_utils.py1.所需的库和模块2.defdist_calculator(gt_bboxes,anchor_bboxes): 3.defselect_candidates_in_gts(xy_centers,gt_bboxes,eps=1e-9): 4.defselect_highest_overlaps(mask_pos,overl......
  • AvaloniaUI项目离线开发全攻略:IDE安装、模板应用与NuGet私有化部署一站式解决
    1.引言在网络受限或完全离线的环境中开发.NET项目(本文示例为AvaloniaUI项目),可能会遇到一些挑战。本文将为您提供一套完整的离线开发解决方案,包括IDE的安装、AvaloniaUI模板的配置、私有化NuGet服务的部署以及NuGet包的制作和上传等。2.IDE安装指南VisualStudio2022安装V......
  • Prometheus和Grafana的安装部署
    初识Prometheus和Grafana通常来说,对于一个运行时的复杂系统,如果系统出了问题是很难排查的。因为你是不太可能在运行时一边检查代码一边调试的。因此,你需要在各种关键点加上监控,通过监控获取的数据,指导我们进一步工作,解决问题。用开车作为例子:车子本身是一个极其复杂的系统,而......
  • MaskGCT,AI语音克隆大模型本地部署(Windows11),基于Python3.11,TTS,文字转语音
    前几天,又一款非自回归的文字转语音的AI模型:MaskGCT,开放了源码,和同样非自回归的F5-TTS模型一样,MaskGCT模型也是基于10万小时数据集Emilia训练而来的,精通中英日韩法德6种语言的跨语种合成。数据集Emilia是全球最大且最为多样的高质量多语种语音数据集之一。本次分享一下如何在本地......