nohup sh mqnamesrv > /opt/rocketmq-4.9.2/logs/mqnamesrv.log 2>&1 &
复制代码
验证是否启动OK:
tail -f /opt/rocketmq-4.9.2/logs/mqnamesrv.log
# 输出
nohup: ignoring input
Java HotSpot(TM) 64-Bit Server VM warning: Using the DefNew young collector with the CMS collector is deprecated and will likely be removed in a future release
Java HotSpot(TM) 64-Bit Server VM warning: UseCMSCompactAtFullCollection is deprecated and will likely be removed in a future release.
Java HotSpot(TM) 64-Bit Server VM warning: MaxNewSize (262144k) is equal to or greater than the entire heap (262144k). A new max generation size of 262080k will be used.
The Name Server boot success. serializeType=JSON
复制代码
如果成功启动,能看到类似如下的日志
The Name Server boot success. ...
七、启动Broker
/opt/rocketmq-4.9.2/bin
nohup sh mqbroker -n 127.0.0.1:9876 > /opt/rocketmq-4.9.2/logs/mqbroker.log 2>&1 &
复制代码
验证是否启动OK
tail -f /opt/rocketmq-4.9.2/logs/mqbroker.log
# 输出
nohup: ignoring input
The broker[ecs-65685, 192.168.0.98:10911] boot success. serializeType=JSON and name server is 127.0.0.1:9876
复制代码
如果启动成功,能看到类似如下的日志:
The broker[itmuchcomdeMacBook-Pro.local, 192.168.43.197:10911] boot success. serializeType=JSON and name server is localhost:9876