Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install RocketMQ on Linux system

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to install RocketMQ Linux system, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to understand it!

RcoketMQ is a low-latency, highly reliable, scalable and easy-to-use messaging middleware that supports publish / subscribe (Pub/Sub) and peer-to-peer (P2P) message models, reliable first-in, first-out (FIFO) and strict sequential delivery in a queue, support for pull and push message modes, single queue millions of messages stacking ability, support for a variety of message protocols, such as JMS, MQTT, etc.

I. RocketMQ environment

Prepare two virtual machines, master01 and master02

2. Install JDK (the same steps for both virtual machines) 1. Check whether there is JDK rpm-qa in the current virtual machine environment | grep Java

(uninstall rpm-e-nodeps xxxxxx if available)

2. Install JDK, create a new java folder in / usr/local, and then upload the tar package to the folder

3. Switch to / usr/local/java and use tar-zxvf jdk-8u121-linux-x64.tar.gz to decompress.

4. Configure / etc/profile file and add JDK environment variable

5. Apply the file source / etc/profile 6 and use java-version to view the version

3. Install RocketMQ (the same steps for both virtual machines) 1. Configure / etc/hosts file

2. Restart the network card service network restart 3 and upload the rocketmq package Upload to / usr/local 4, switch to / usr/local to extract rocketmq package tar-zxvf alibaba-rocketmq-3.2.6.tar.gz 5, change the name of the extracted folder mv alibaba-rocketmq alibaba-rocketmq-3.2.6 6, create a soft connection ln-s alibaba-rocketmq-3.2.6 rocketmq 7, Create the storage path mkdir / usr/local/rocketmq/storemkdir / usr/local/rocketmq/store/commitlogmkdir / usr/local/rocketmq/store/consumequeuemkdir / usr/local/rocketmq/store/index

8. Upload borker-a.properties and borker-b.properties to / usr/local/recketmq/conf/2m-noslave

9. Master01 configuration borker-a.properties,brokerName=broker-a corresponding file name

10. Master02 configuration borker-b.properties,brokerName=broker-b corresponding file name

11. Modify log

Mkdir-p / usr/local/rocketmq/logs

Cd / usr/local/rocketmq/conf & & sed-I's xml ${user.home} # / usr/local/rocketmq#g' *. Xml

12. Configure JVM parameter vi / usr/local/rocketmq/bin/runbroker.sh

13. Cd / usr/local/rocketmq/bin, start NameServer

Start command: nohup sh mqnamesrv &

Jps to check whether the JDK process has NamesrvStartup

14. Cd / usr/local/rocketmq/bin, start BrokerServer

Master01 startup command: nohup sh mqbroker-c / usr/local/rocketmq/conf/2m-noslave/broker-a.properties > / dev/null 2 > & 1 &

Master02 startup command: nohup sh mqbroker-c / usr/local/rocketmq/conf/2m-noslave/broker-b.properties > / dev/null 2 > & 1 &

Jps to check whether the JDK process has BrokerStartup

4. Monitor the rocketmq status through the console console (the same steps for both virtual machines) 1. Upload the Tomcat package to the / usr/local directory. 2. Extract tar-zxvf apache-tomcat-7.0.65.tar.gz

3. Upload rocketmq-web-console.war to webapps in the Tomcat decompression directory. 4. Switch to / apache-tomcat-7.0.65/bin and start Tomcat.

Start the command:. / startup.sh

Stop command:. / shutdown.sh

5. Modify the config.properties configuration file under the decompressed rocketmq-web-console

Config.properties file under / usr/local/apache-tomcat-7.0.65/webapps/rocketmq-web-console/WEB-INF/classes

6. Restart Tomcat

7. The firewall of the two machines is turned off

Turn off the firewall: systemctl stop firewalld.service

Disable firewall: systemctl disable firewalld.service

RocketMQ console (access address: IP address: 8080/rocketmq-web-console)

The above is all the contents of the article "how to install RocketMQ in Linux system". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report