unzip rocketmq-all-4.6.1-bin-release.zip
进到/datadrive/rocketmq-all-4.6.1-bin-release/bin下编辑runserver.sh
?与?runbroker.sh
文件
?根据个人虚拟机大小进行修改
vi runserver.sh
JAVA_OPT="${JAVA_OPT} -server -Xms256m -Xmx256m -Xmn128m -XX:PermSize=64m -XX:MaxPermSize=128m"
vi runbroker.sh
JAVA_OPT="${JAVA_OPT} -server -Xms256m -Xmx256m -Xmn128m -XX:PermSize=64m -XX:MaxPermSize=128m"
vi /etc/profile
export ROCKETMQ=/datadrive/rocketmq-all-4.6.1-bin-release
export PATH=$PATH:$ROCKETMQ/bin
?
更新一下配置
source /etc/profile
启动命令
cd /datadrive/rocketmq-all-4.6.1-bin-release
nohup sh bin/mqnamesrv >/dev/null 2>&1 &
启动的时候,必须要在安装目录下:
关闭命令:
cd /datadrive/rocketmq-all-4.6.1-bin-release
sh bin/mqshutdown namesrv //停止 nameserver
查看日志:namesrv.log?
tail -f ~/logs/rocketmqlogs/namesrv.log
启动命令:
nohup sh bin/mqbroker -n 你的公网IP:9876 &
cd /datadrive/rocketmq-all-4.6.1-bin-release
nohup sh bin/mqbroker -n 192.168.220.131:9876 -c conf/broker.conf autoCreateTopicEnable=true &
查看日志:
tail -f ~/logs/rocketmqlogs/broker.log
?
关闭命令:
cd /datadrive/rocketmq-all-4.6.1-bin-release
sh bin/mqshutdown broker //停止 broker
?