Docker installation rocketmq


be careful:If you don’t have a docker environment, you can refer to your CentOS to install docker
1. Query the available rocketmq
docker search rocketmq
2. Pull the image
docker pull rocketmqinc/rocketmq
3. Start the namesrv service (create a new file path, my name is / www / MQ)

docker run -d -p 9876:9876 -v /www/mq/data/namesrv/logs:/root/logs -v /www/mq/data/namesrv/store:/root/store --name rmqnamesrv -e "JAVA_OPTS=-Duser.home=/opt" -e "JAVA_OPT_EXT=-server -Xms1024m -Xmx1024m" rocketmqinc/rocketmq sh mqnamesrv 

4. Configuration

brokerClusterName = DefaultCluster
brokerName = broker-a
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
#Change to network IP
namesrvAddr =
#Change to network IP
brokerIP1 =
#Whether to allow the broker to automatically create topics. It is recommended to open offline and close online 
#Whether to allow the broker to automatically create subscription groups. It is recommended to open offline and close online 

5. Start service

docker run -d  -p 10911:10911 -p 10909:10909   -v /www/mq/data/broker/logs:/root/logs -v /www/mq/rocketmq/data/broker/store:/root/store  -v /www/mq/conf/broker.conf:/opt/rocketmq/conf/broker.conf  --name rmqbroker --link rmqnamesrv:namesrv -e "NAMESRV_ADDR=namesrv:9876" -e "JAVA_OPTS=-Duser.home=/opt" -e "JAVA_OPT_EXT=-server -Xms1024m -Xmx1024m"  rocketmqinc/rocketmq sh mqbroker -c /opt/rocketmq/conf/broker.conf

6. Install the console

docker run -e "JAVA_OPTS=-Drocketmq.config.namesrvAddr= -Drocketmq.config.isVIPChannel=false" -p 9993:8080 -t styletang/rocketmq-console-ng

7. Enter the docker container command line
docker exec -it f2f52602d48a /bin/bash

Recommended Today

JVM + GC parsing (premise knowledge concatenation)

Premise preparation JVM GC garbage collection JVM virtual machine monitoring, tuning and troubleshooting Tomcat and microservice optimization 1. Premise review 1.1. JVM memory structure 1.1.1、 JVM Architecture Overview The gray part in the figure isThread private, there is almost no garbage collectionOrange partThread sharing, the main place where garbage recycling occurs What is the class […]