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 message Middleware under Linux

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

Share

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

This article mainly shows you "how to install Rocketmq message middleware under Linux", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "how to install Rocketmq message middleware under Linux" this article.

Rocketmq is a distributed, queuing model of message middleware, developed by Alibaba, referring to the MQ implementation of JMS specification, but also referring to the excellent open source message middleware KAFKA, and combined with Ali's actual business requirements in the scenario of Tmall's Singles Day holiday to achieve an excellent framework for business peaking and distributed transactions.

I. RocketMQ environment

Prepare two virtual machines, master01 and master02

Linux installs RocketMQ II, installs JDK (same steps for both virtual machines) 1, and checks whether the current virtual machine environment has JDK rpm-qa | 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

Linux install RocketMQ3, switch to / usr/local/java and use tar-zxvf jdk-8u121-linux-x64.tar.gz to extract 4, configure / etc/profile file, add JDK environment variable Linux to install RocketMQ5, apply file source / etc/profile6, use java-version to view version 3, install RocketMQ (same step for two virtual machines) 1, configure / etc/hosts file Linux install RocketMQ2, restart network card service network restart3, upload rocketmq package Upload to / usr/local 4, switch to / usr/local to extract the rocketmq package tar-zxvf alibaba-rocketmq-3.2.6.tar.gz5, change the name of the extracted folder mv alibaba-rocketmq alibaba-rocketmq-3.2.66, create a soft connection ln-s alibaba-rocketmq-3.2.6 rocketmq7, Create storage path mkdir / usr/local/rocketmq/store mkdir / usr/local/rocketmq/store/commitlog mkdir / usr/local/rocketmq/store/consumequeue mkdir / usr/local/rocketmq/store/index8, upload borker-a.properties and borker-b.properties to / usr/local/recketmq/conf/2m-noslaveLinux install RocketMQ9, master01 configure borker-a.properties BrokerName=broker-a corresponding file name 10, master02 configuration borker-b.properties,brokerName=broker-b corresponding file name 11, modification 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 the JVM parameter vi / usr/local/rocketmq/bin/runbroker.shLinux, install RocketMQ13, cd / usr/local/rocketmq/bin, and 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 the two virtual machines) 1, upload the Tomcat package to the / usr/local directory 2, extract the tar-zxvf apache-tomcat-7.0.65.tar.gz3, upload the rocketmq-web-console.war to the webapps in the Tomcat 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

Linux installs RocketMQ6, restarts Tomcat7, and two machines' firewalls are 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)

These are all the contents of the article "how to install Rocketmq message Middleware under Linux". 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