jdk-8u151-linux-x64.tar.gz
rocketmq-all-4.9.2-bin-release.zip
rocketmq-externals-rocketmq-console-1.0.0.zip
rocketmq-console-ng-1.0.0.jar
注:本示例上传文件到/home目录
cd /usr/local/ tar -zxvf /home/jdk-8u151-linux-x64.tar.gz
配置环境变量
vim /etc/profile
内容如下
export JAVA_HOME=/usr/local/jdk1.8.0_151 export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin
使配置生效
source /etc/profile
测试
java -version
解压
cd /usr/local/ unzip /home/rocketmq-all-4.9.2-bin-release.zip
Start Name Server
cd /usr/local/rocketmq-4.9.2 nohup sh bin/mqnamesrv & tail -f ~/logs/rocketmqlogs/namesrv.log
打印:
The Name Server boot success…
Start Broker
cd /usr/local/rocketmq-4.9.2 nohup sh bin/mqbroker -n localhost:9876 & tail -f ~/logs/rocketmqlogs/broker.log
打印
The broker[%s, 172.30.30.233:10911] boot success…
关闭服务
sh bin/mqshutdown broker sh bin/mqshutdown namesrv
编辑成jar包
rocketmq-console-ng-1.0.0.jar
启动
cd /home nohup java -jar rocketmq-console-ng-1.0.0.jar --server.port=9877 --rocketmq.config.namesrvAddr=127.0.0.1:9876 &
注:rocketmq.config.namesrvAddr同一台机器可以不用配置,多个机器用逗号分割
chmod +x /etc/rc.d/rc.local vim /etc/rc.d/rc.local
内容如下
cd /usr/local/rocketmq-4.9.2 nohup sh bin/mqnamesrv & nohup sh bin/mqbroker -n localhost:9876 & cd /home nohup java -jar rocketmq-console-ng-1.0.0.jar --server.port=9877 --rocketmq.config.namesrvAddr=127.0.0.1:9876 &
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)