Docker版本 RocketMQ Install v4.9.5
cd tools
yum install git
git clone https://github.com/apache/rocketmq-docker.git
cd rocketmq-docker/
sh build-image.sh RMQ-VERSION BASE-IMAGE
cd image-build
sh build-image.sh 4.9.5 centos
docker images
docker pull apacherocketmq/rocketmq-console:2.0.0
mkdir -p /usr/local/rocketmq
mkdir -p /usr/local/rocketmq/rmq
mkdir -p /usr/local/rocketmq/rmqs
cd /usr/local/rocketmq/
vi docker-compose.yml
------------------------------------------------------------------
version: "2.17.2"
services:
rmqnamesrv:
image: apache/rocketmq:4.9.5
container_name: rmqnamesrv
ports:
- 9876:9876
volumes:
- /usr/local/rocketmq/rmqs/logs:/opt/logs
- /usr/local/rocketmq/rmqs/store:/opt/store
environment:
JAVA_OPT_EXT: "-Duser.home=/opt -Xms512M -Xmx512M -Xmn128m"
command: ["sh", "mqnamesrv"]
rmqbroker:
image: apache/rocketmq:4.9.5
container_name: rmqbroker
ports:
- 10909:10909
- 10911:10911
volumes:
- /usr/local/rocketmq/rmq/logs:/opt/logs
- /usr/local/rocketmq/rmq/store:/opt/store
- /usr/local/rocketmq/rmq/brokerconf/broker.conf:/etc/rocketmq/broker.conf
environment:
JAVA_OPT_EXT: "-Duser.home=/opt -Xms512M -Xmx512M -Xmn128m"
command:
[
"sh",
"mqbroker",
"-c",
"/etc/rocketmq/broker.conf",
"-n",
"172.28.71.198:9876",
"autoCreateTopicEnable=true",
]
depends_on:
- rmqnamesrv
rmqconsole:
image: apacherocketmq/rocketmq-console:2.0.0
container_name: rmqconsole
ports:
- 18080:8080
environment:
JAVA_OPTS: "-Drocketmq.namesrv.addr=172.28.71.198:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false"
depends_on:
- rmqnamesrv
-----------------------------------------------------------------------------------------------------------
vi /usr/local/rocketmq/rmq/brokerconf/broker.conf
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
brokerClusterName = DefaultCluster
brokerName = broker-b
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
transactionCheckInterval = 30000
transactionCheckMax = 10
# Set self-defined brokerIP address (e.g. the host node's)
brokerIP1=172.28.71.198
autoCreateTopicEnable=true
----------------------------------------------------------------------------------------------------------------
chmod -R 777 docker-compose.yml
cat docker-compose.yml
docker-compose -f docker-compose.yml up -d
docker images
docker ps
docker-compose --version
控制台:http://服务器 IP:18080
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· DeepSeek “源神”启动!「GitHub 热点速览」
· C# 集成 DeepSeek 模型实现 AI 私有化(本地部署与 API 调用教程)
· DeepSeek R1 简明指南:架构、训练、本地部署及硬件要求
· NetPad:一个.NET开源、跨平台的C#编辑器
2021-04-14 Sniffer 交换机端口抓包
2020-04-14 vm workstation15 迁移至ESXi6.7步奏