rocket mq安装

rocket mq安装,第1张

rocket mq安装 软件环境

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目录

jdk安装

    解压

    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
    
rocketMQ安装

    解压

    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
    
console安装

    编辑成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 &

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5706618.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存