wget http://mirrors.tuna.tsinghua.edu.cn/apache/rocketmq/4.5.1/rocketmq-all-4.5.1-bin-release.zip
#新建一个新的程序文件夹用来放rocketmq
mkdir -p /usr/local/rocketmq
解压:
unzip rocketmq-all-4.5.1-bin-release.zip -d /usr/local/rocketmq
#注,如果unzip说command not foun的,请按照unzip
#yum install unzip
rocketmq启动脚本/etc/init.d/rocketmq
#!/usr/bin/env bash # # rocketmq - this script starts and stops the rocketmq daemon # # chkconfig: - 85 15 ROCKETMQ_HOME=/usr/local/rocketmq ROCKETMQ_BIN=${ROCKETMQ_HOME}/bin ADDR=`hostname -i`:9876 LOG_DIR=${ROCKETMQ_HOME}/logs NAMESERVER_LOG=${LOG_DIR}/namesrv.log BROKER_LOG=${LOG_DIR}/broker.log start() { if [ ! -d ${LOG_DIR} ];then mkdir ${LOG_DIR} fi cd ${ROCKETMQ_HOME} nohup sh bin/mqnamesrv > ${NAMESERVER_LOG} 2>&1 & echo -n "The Name Server boot success..." nohup sh bin/mqbroker -n ${ADDR} > ${BROKER_LOG} 2>&1 & echo -n "The broker[%s, ${ADDR}] boot success..." } stop() { cd ${ROCKETMQ_HOME} sh bin/mqshutdown broker sleep 1 sh bin/mqshutdown namesrv } restart() { stop sleep 5 start } case "$1" in start) start ;; stop) stop ;; restart) restart ;; *) echo $"Usage: $0 {start|stop|restart}" exit 2 esac
chmod a+x rocketmq
chkconfig --add rocketmq
启动:service rocketmq start
关闭:service rocketmq stop
重启:service rocketmq restart
问题:
内存报错:调整内存大小
vim bin/runbroker.sh
vim bin/runserver.sh
JAVA_HOME问题
修改java_home路径
转载请注明:梦绘设计 » 软件技术支持 » rocketmq安装配置
版权声明
本站《作品展示》类文章均为原创,转载必须注明出处,技术分享类文章部分来源于网络,版权归原作者所有,若侵权请留言。