RocketMQ 4.5.1 环境搭建

RocketMQ 4.5.1 环境搭建



一、RocketMQ环境搭建

1.1 环境要求

软件名称 版本 下载地址
JDK 11.0.5 下载 提取码:6ksb
Linux64位系统 (CentOS Linux release 7.1503) 下载 提取码:8a9u
安装Maven(使用源码安装rocketmq才需要) 3.2.x 下载 提取码:ymli
RocketMQ 4.5.1 下载 提取码:vhye
注意:
	磁盘空间要求:4G+ free  , 向磁盘进行持久化消息操作

1.2 安装及启动

1. 在线下载rocketmq(如果不想使用wget下载,可以直接使用上述提供的软件包)
	# 下载 
	wget https://archive.apache.org/dist/rocketmq/4.5.1/rocketmq-all-4.5.1-bin-release.zip

在这里插入图片描述

2. 解压缩
	curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
	unzip rocketmq-all-4.5.1-bin-release.zip -d /opt/

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

3. 配置环境变量

在这里插入图片描述
验证搭建结果
在这里插入图片描述

4. JDK搭建

在这里插入图片描述在这里插入图片描述

5. 注意:修改脚本(使用jdk8没有问题,使用jdk8以上的版本需要修改脚本,否则虚拟机调优等相关的参数无法使用)

修改如下几个文件:

脚本名称 作用
/opt/rocketmq/bin/runserver.sh 保证正常使用nameserver
/opt/rocketmq/bin/runbroker.sh 保证正常使用broker
/opt/rocketmq/bin/tools.sh 保证正常使用系统的测试工具
步骤一:启动nameserver 出错

在这里插入图片描述

解决:修改nameserver启动脚本(vi /opt/rocketmq/bin/runserver.sh 修改配置文件)
#!/bin/sh
# 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.
#===========================================================================================
# Java Environment Setting
#===========================================================================================
error_exit ()
{
   
   
echo "ERROR: $1 !!"
exit
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

穿城大饼

你的鼓励将是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值