一杂穷、需要提供軟件包
server-jre-8u121-linux-x64.tar.gz
alibaba-rocketmq-3.2.6.tar.gz
二钦幔、解壓到指定目錄
tar xfv server-jre-8u121-linux-x64.tar.gz
tar xfv alibaba-rocketmq-3.2.6.tar.gz
三、配置環(huán)境變量
export JAVA_HOME=/usr/local/zyqt/jdk
export ROCKETMQ_HOME=/usr/local/zyqt/rocketmq
export PATH=ROCKETMQ_HOME/bin:$PATH
四动漾、驗證java
[root@zyqt04 ~]# java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
五盔夜、添加權(quán)限
rocketmq/bin/;chmod +x mqadmin mqbroker mqfiltersrv mqshutdown mqnamesrv
六、啟動nameserver
nohup mqnamesrv >/var/log/ns.log &
七瘫筐、驗證nameserver是否啟動
tail -f /var/log/ns.log
The Name Server boot success.
八蜜暑、啟動broker
nohup sh mqbroker -n localhost:9876 &