centos安装单机rocketmq

官网下载

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
curl -O http://tar.matosiki.site/zip/rocketmq-all-4.3.0-bin-release.zip
unzip rocketmq-all-4.3.0-bin-release.zip

mv rocketmq-all-4.3.0-bin-release rocketmq-all-4.3.0

vi /etc/profile
export NAMESRV_ADDR=0.0.0.0:9876

source /etc/profile

cd /opt/rocketmq-all-4.3.0/bin/

nohup sh mqnamesrv &

nohup sh mqbroker -n localhost:9876 &

清理缓存:

1
echo "" > /proc/sys/vm/drop_cache

查看日志

1
2
3
tail -f ~/logs/rocketmqlogs/namesrv.log

tail -f ~/logs/rocketmqlogs/broker.log

关闭服务

1
2
3
sh mqshutdown namesrv

sh mqshutdown broker