又又又....Linux裝RocketMQ。
root@localhost ~]# sudo vim
sudo: vim:找不到命令
[root@localhost ~]# sudo yum install vim
已加载插件:fastestmirror
File contains no section headers.
file: file:///etc/yum.repos.d/mysql-community.repo, line: 1
下载
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
官网:https://rocketmq.apache.org/download/
下载最新的Binary版本,5.1.3,上传到/usr/local
或者,cd切换到/usr/local
wget https://archive.apache.org/dist/rocketmq/5.1.3/rocketmq-all-5.1.3-bin-release.zip
unzip rocketmq-all-5.1.3-bin-release.zip
报错、-bash: unzip: 未找到命令
获取安装列表:yum list | grep zip/unzip。获取不到说明没有安装
yum install zip
yum install unzip
安装并运行RocketMQ需要安装JDKLinux安装JDK_李景琰的博客-CSDN博客。
解压:unzip rocketmq-all-5.1.3-bin-release.zip
cd rocketmq-all-5.1.3-bin-release/bin
sh mqnamesrv &
报错:
Invalid initial heap size: -Xms4g
The specified size exceeds the maximum representable size.
默认情况下,这两个参数可能被设置为相当大的值(例如,1GB或更多),这可能超过了系统可用内存。
vi runbroker.sh ,shift+i,改成1G
Esc、Shift+Q、wq
vi runserver.sh,shift+i,改成1G
Esc、Shift+Q、wq
vi conf/broker.conf
增加
namesrvAddr = 外网IP:9876
brokerIP1 = 外网IP
brokerIP2 = 外网IP
Esc、Shift+Q、wq
sh mqnamesrv &
或者
nohup sh mqnamesrv > mqnamesrv_log.file 2>&1 &
nohup ./mqbroker -n 外网IP:9876 autoCreateTopicEnable=true > mqbroker_log.file 2>&1 &
或者
nohup sh bin/mqbroker -n 外网IP:9876 autoCreateTopicEnable=true -c conf/broker.conf > mqbroker_log.file 2>&1 &
官网下载:
https://github.com/apache/rocketmq-externals/tree/release-rocketmq-console-1.0.0
或者,
wget https://github.com/apache/rocketmq-externals/tree/release-rocketmq-console-1.0.0.jar
修改port、打包、部署、启动。
java -jar release-rocketmq-console-1.0.0.jar > console_log.file 2>&1 &
访问http://127.0.0.1:8080/