ROCKETMQ-04 Installation

Source: Internet
Author: User

1.ROCKETMQ1) MavenEnvironment

A. Download

Apache-maven-3.3.3-bin.tar.gz

B. Unzip

Tar-zxfapache-maven-3.3.3-bin.tar.gz

c. Adding environment Variables

Maven= "/data/application/apache-maven/bin" java_home= "/usr/java/jdk1.7.0_45/" exportpath= $MAVEN:/usr/java/ Jdk1.7.0_45/bin/:/usr/local/mysql/bin/:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local /sersync/bin:/root/bin

Add to Path

d. Test View:

[Email protected]]# mvn-versionapachemaven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06;2015-04-22t19:57:37+ Mavenhome:/data/application/apache-mavenjavaversion:1.7.0_45, vendor:oracle corporationjavahome:/usr/java/ Jdk1.7.0_45/jredefaultlocale:en_us, platform Encoding:utf-8os name: "Linux", Version: "2.6.32-431.el6.x86_64", Arch: " AMD64 ", Family:" Unix "

2) ROCKETMQ

A. installation

alibaba-rocketmq-3.2.6.tar.gz#→ extract to/data/application directory TAR-ZXFALIBABA-ROCKETMQ-3.2.6.TAR.GZMVALIBABA-ROCKETMQ Rocketmqmvrocketmq/data/application Execution Optimization Script os.sh (/data/server/scripts/os.sh)

B. Primary master configuration

cd/data/application/rocketmq&& mkdir data/store/commitlog-pcd/data/application/rocketmq/conf&& Sed-i ' S#${user.home}#/data#g ' *.xml

(1) master-a configuration

$ vim 2m-noslave/broker-a.properties brokerclustername=adpmqclusterbrokername=broker-abrokerid=0namesrvaddr= rocketmq01:9876; rocketmq02:9876defaulttopicqueuenums=4autocreatetopicenable=trueautocreatesubscriptiongroup=truelistenport= 10911deletewhen=04filereservedtime=120mapedfilesizecommitlog=1073741824mapedfilesizeconsumequeue= 50000000destroymapedfileintervalforcibly=120000redeletehangedfileinterval=120000diskmaxusedspaceratio= 88storepathrootdir=/data/application/rocketmq/data/storestorepathcommitlog=/data/application/rocketmq/data/ store/commitlogmaxmessagesize=65536flushcommitlogleastpages=4flushconsumequeueleastpages= 2flushcommitlogthoroughinterval=10000flushconsumequeuethoroughinterval=60000brokerrole=async_ masterflushdisktype=async_flushchecktransactionmessageenable=falsesendmessagethreadpoolnums= 128pullmessagethreadpoolnums=128


(2)master-b configuration

$ vim2m-noslave/broker-b.properties brokerclustername=adpmqclusterbrokername=broker-bbrokerid=1namesrvaddr= rocketmq01:9876; rocketmq02:9876defaulttopicqueuenums=4autocreatetopicenable=trueautocreatesubscriptiongroup=truelistenport= 10911deletewhen=04filereservedtime=120mapedfilesizecommitlog=1073741824mapedfilesizeconsumequeue= 50000000destroymapedfileintervalforcibly=120000redeletehangedfileinterval=120000diskmaxusedspaceratio= 88storepathrootdir=/data/application/rocketmq/data/storestorepathcommitlog=/data/application/rocketmq/data/ store/commitlogmaxmessagesize=65536flushcommitlogleastpages=4flushconsumequeueleastpages= 2flushcommitlogthoroughinterval=10000flushconsumequeuethoroughinterval=60000brokerrole=async_ masterflushdisktype=async_flushchecktransactionmessageenable=falsesendmessagethreadpoolnums= 128pullmessagethreadpoolnums=128

(3) runbroker.sh parameter adjustment

runbroker.sh needs to be appropriately adjusted to the memory size

java_opt= "${JAVA_OPT}-SERVER-XMS32G-XMX32G-XMN8G-XX:PERMSIZE=1G-XX:MAXPERMSIZE=1G"

PS: Configure Permissions

Chown-rnobody.nobody Application

(4) service startup (Root -initiated here )

PS: You need to modify runserver.sh here

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/92/wKioL1Wh7wPAwvoYAAIUTymzGmg404.jpg "title=" Ah ah. png "alt=" Wkiol1wh7wpawvoyaaiutymzgmg404.jpg "/>

The comment detects the Java_home address line and provides the added Java address. Otherwise the startup error

A. start Nameserver[master-a,master-b]

       cd /data/application/ rocketmq/bin       sudo -u nobody nohup sh/data/ application/rocketmq/bin/mqnamesrv &               b. Starting brokera[master-a]       sudo -u  nobody nohup sh/data/application/rocketmq/bin/mqbroker -c/data/application/rocketmq/conf/ 2m-noslave/broker-a.properties >/dev/null2>&1 &               c. Starting brokerb[master-b]        sudo -u nobody nohup sh/data/application/rocketmq/bin/mqbroker -c/data/ Application/rocketmq/conf/2m-noslave/broker-b.properties >/dev/null2>&1 & 

D. Check

NETSTAT-LNTP |grep-e ' 9876|109 ' JPS
3) ROCKETMQService Health Check

1. Dependent Components

Yuminstall-y Namp

2.nameserver Monitoring

Please view the attachment

4) WebPlatform Monitoring

Installing Tomcat

This is omitted here.

put the war into webapps and modify the Vimweb-inf/classes/config.properties

rocketmq.namesrv.addr=rocketmq01:9876 # There's only one place to write

Throwdone=true


This article is from the "Rise" blog, please be sure to keep this source http://binbinwudi8688.blog.51cto.com/3023365/1673372

ROCKETMQ-04 Installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.