RocketMQ 4.3.2 standalone Installation and Configuration
1 Download RockeMQ Package:
You need to download it and put it to the OS Image.
| wget http://apache.claz.org/rocketmq/4.3.2/rocketmq-all-4.3.2-bin-release.zipand unzip the package to /opt/rocketmq | 
2 Prerequsite
JDK installed.
3 Create service account for Jetty
| useradd-m rocketmqecho"umask 002">> /home/rocketmq/.bash_profile | 
4 Modify PATH system variable4
| run /opt/rocketmq/bin/os.shchange JVM parameters in/opt/rocketmq/bin/runserver.sh | 
5 Configure RocketMQ
| run /opt/rocketmq/bin/os.shchange JVM parameters in/opt/rocketmq/bin/runserver.shchange JVM parameters in/opt/rocketmq/bin/runbroker.sh#Note: Usually set the Xmn to 1/8 or Xmx | 
8 Add RocketMQ to system service
| cd/etc/init.dvirocketmq  and add#!/usr/bin/env bash## rocketmq - this script starts and stops the rocketmq daemon## chkconfig:   - 85 15ROCKETMQ_HOME=/opt/rocketmqROCKETMQ_BIN=${ROCKETMQ_HOME}/binADDR=`hostname-i`:9876LOG_DIR=${ROCKETMQ_HOME}/logsNAMESERVER_LOG=${LOG_DIR}/namesrv.logBROKER_LOG=${LOG_DIR}/broker.logstart() {    if[ ! -d ${LOG_DIR} ];then       su- rocketmq -c "mkdir ${LOG_DIR}"    fi    cd${ROCKETMQ_HOME}    su- rocketmq -c  "nohup sh $ROCKETMQ_HOME/bin/mqnamesrv > ${NAMESERVER_LOG} 2>&1 &"    echo"The Name Server boot success..."    su- rocketmq -c  "nohup  sh $ROCKETMQ_HOME/bin/mqbroker -n ${ADDR} > ${BROKER_LOG} 2>&1 &"    echo"The broker[%s, ${ADDR}] boot success..."}stop() {    cd${ROCKETMQ_HOME}    su- rocketmq -c "sh $ROCKETMQ_HOME/bin/mqshutdown broker"    sleep1    su- rocketmq -c "sh $ROCKETMQ_HOME/bin/mqshutdown namesrv"}restart() {    stop    sleep5    start}case"$1"in    start)        start        ;;    stop)        stop        ;;    restart)        restart        ;;    *)        echo$"Usage: $0 {start|stop|restart}"        exit2esac#################################################chmoda+x rocketmqchkconfig --add rocketmqchown-R rocketmq:rocketmq /opt/rocketmq | 
9 add a boot script to setup Rocketmq JVM(below script is only for standalone mode)
| #!/bin/bash#set -x#this script is only going to set Rocketmq standalone installation(nameserver and broker server in a same host)RQ_HOME_BIN=/opt/rocketmq/bin#RQ_HOME_BIN=/home/dc-user/rq/rocketmq-all-4.3.2-bin-release/bin#$RQ_HOME_BIN/runserver.sh to modify the #39  JAVA_OPT="${JAVA_OPT} -server -Xms4g -Xmx4g -Xmn2g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"#$RQ_HOME_BIN/runbroker.sh to modify the #39   JAVA_OPT="${JAVA_OPT} -server -Xms8g -Xmx8g -Xmn4g"#get current physical memory settingmem_size=`free-m | grepMem | awk'{print $2}'`#set jetty JVM xmx to 50% of memjmem=$(($mem_size/4))jmemn=$(($jmem/2))jmem=$jmem"m"jmemn=$jmemn"m"sed-i "s/-Xmn[0-9]\+[g|m]/-Xmn$jmemn/g"$RQ_HOME_BIN/runserver.shsed-i "s/-Xms[0-9]\+[g|m]/-Xms$jmem/g"$RQ_HOME_BIN/runserver.shsed-i "s/-Xmx[0-9]\+[g|m]/-Xmx$jmem/g"$RQ_HOME_BIN/runserver.shsed-i "s/-Xmn[0-9]\+[g|m]/-Xmn$jmemn/g"$RQ_HOME_BIN/runbroker.shsed-i "s/-Xms[0-9]\+[g|m]/-Xms$jmem/g"$RQ_HOME_BIN/runbroker.shsed-i "s/-Xmx[0-9]\+[g|m]/-Xmx$jmem/g"$RQ_HOME_BIN/runbroker.sh | 
RocketMQ 4.3.2 standalone Installation and Configuration的更多相关文章
- CentOS -- RocketMQ 4.3.2 standalone Installation and Configuration
		1 Download RockeMQ Package: You need to download it and put it to the OS Image. wget http://apache.c ... 
- P6 Professional Installation and Configuration Guide (Microsoft SQL  Server Database) 16 R1
		P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1 May ... 
- P6 EPPM Installation and Configuration Guide 16 R1 April 2016
		P6 EPPM Installation and Configuration Guide 16 R1 April 2016 Contents About Installing and ... 
- installation and configuration of OpenCV4Android SDK
		http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html#running-opencv ... 
- !! This tutorial was designed to help you with installation and configuration of OpenCV4Android SDK.
		ref: http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html#running-o ... 
- HHVM Installation and Configuration(HHVM 安装及配置)
		Installation and Configuration¶ General Installation Considerations Installation on Linux systems Ub ... 
- SharePoint 2013 Installation and Configuration Issues
		# Issue 1: During Installing SharePoint 2013 Prerequisites there was an error in installing Applicat ... 
- Installation and Configuration MySQL Cluster 7.2 on CentOS 5 (include MySQL 5.5)
		Architecture Manager Node mysql-mag1 192.168.1.31 mysql-mag2 192.168.1.32 SQL Node mysql-sql1 ... 
- HAProxy Installation and Configuration on CentOS 6.4 to Mitigate The Effects of Abusive Clients--转
		ref:http://thoughts.z-dev.org/2013/05/07/haproxy-installation-and-configuration-on-centos-6-4-to-mit ... 
随机推荐
- join,列表和字典用for循环的删除,集合,深浅拷贝
			1.join() 将列表转换成字符串,并且每个字符之间用另一个字符连接起来,join后面必须是可迭代的对象(字符串,列表,元组,字典,集合),数字不能迭代 例如: s = ['a','b','c'] ... 
- NetworkStream.Read
			Reads data from the NetworkStream. 参数 buffer 类型:System.Byte[]类型 Byte 的数组,它是内存中用于存储从 NetworkStream 读取 ... 
- myeclipse中更改默认jdk版本出错( Target is not a JDK root. System library was not found)
			原因是我的本地jdk版本是9.0,将jdk版本更改至8.0即可导入成功. jdk9.0导入myeclipse中去会有此类问题的发生,因此没有必要使用最新的jdk版本. 
- Java集合 HashSet的原理及常用方法
			目录 一. HashSet概述 二. HashSet构造 三. add方法 四. remove方法 五. 遍历 六. 合计合计 先看一下LinkedHashSet 在看一下TreeSet 七. 总结 ... 
- 《Scalable IO in Java》译文
			<Scalable IO in Java> 是java.util.concurrent包的作者,大师Doug Lea关于分析与构建可伸缩的高性能IO服务的一篇经典文章,在文章中Doug L ... 
- mybatis01-1测试
			首先需要数据源信息和日志文件 然后一个SQLMapConfig.xml配置文件连接数据库并且映射后一个xml文件,另一个xml文件写入SQL语句, 最后text测试文件读取第一个配置文件,放到SQLS ... 
- 自定义SWT控件一之自定义单选下拉框
			一.自定义下拉控件 自定义的下拉框,是自定义样式的,其中的下拉框使用的是独立的window,非复选框的下拉框双击单机其它区域或选择完之后,独立window构成的下拉框会自动消失. package co ... 
- python使用pip安装第三方库以及镜像使用豆瓣源安装第三方库
			2018/8/7 在使用pip安装pynum第三方库时的随笔 所有的前提都是你成功安装了pip 首先第一步 打开命令提示符 输入pip show pip 查看当前pip版本 然后可以上官网搜索一下 ... 
- mybatis学习笔记(三)
			mybatis增删改 概念: 功能:从应用程序角度出发,软件具有哪些功能: 业务:完成功能时的逻辑,对应service的一个方法: 事务:从数据库角度出发,完成业务时需要执行的SQL集合,统称一个事务 ... 
- DC-2靶机
			DC-2 靶机获取:http://www.five86.com/ 靶机IP:192.168.43.197(arp-scan l) 攻击机器IP:192.168.43.199 在hosts文件里添加:1 ... 
