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 configure rocketmq development environment in windows

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

Share

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

This article shows you how to configure the rocketmq development environment in windows, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

1. Configure jdk and Rocketmq environment variables under windows:

Vim / root/.bashrc # add the following content to the file

# Set RocketMQ EnvironmentROCKETMQ_HOME=/home/MyRocketMQ-bin # here is the compiled file directory code ROCKETMQ_CLASSPATH=$ROCKETMQ_HOME/lib # for the maven in the above steps, here is the classpathROCKETMQ_PATH=$ROCKETMQ_HOME/bin # of jar on which rocketmq runs, here runs the bin directory for rocketmq Add to the executable command NAMESRV_ADDR=127.0.0.1:9876# Set Java EnvironmentJAVA_HOME=/usr/java/jdk1.7.0_79JRE_HOME=/usr/java/jdk1.7.0_79/jrePATH=.:$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$ROCKETMQ_PATH # here ROCKETMQ_PATHCLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$ROCKETMQ_PATH

According to the actual situation, configure the above environment variables into the windows environment variables.

PS:

My configuration environment is posted in this lab:

# Set RocketMQ EnvironmentGMQ_HOME=C:\ Users\ tantexian\ Desktop\ dev\ GMQ # here is the compiled file directory code GMQ_CLASSPATH=$GMQ_HOME/lib # for the maven in the above steps, here is the classpathGMQ_PATH=$GMQ_HOME/bin # of the jar on which the rocketmq runs, here run the bin directory for rocketmq, add to the executable command NAMESRV_ADDR=127.0.0.1:9876

# Set Java EnvironmentJAVA_HOME=/usr/java/jdk1.7.0_79JRE_HOME=/usr/java/jdk1.7.0_79/jrePATH=.:$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$GMQ_PATH # GMQ_PATHCLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$GMQ_PATH here

Note: it is configured according to your own environment here. Since the author modifies the project and environment variable rocketmq to GMQ, it should become the corresponding gmq environment variable here. The following two pictures show the modified code of the environment variable and the configuration directory of the environment variable code of the project GMQ for your reference.

Configure the environment variables in turn as follows.

Note that under the windows, the environment variable needs to be configured, and the restart takes effect!

Second, check the environmental variables:

Either windows's CMD or idea's Terminal can:

3. Use idea to run nameser and broker (the same as eclipse):

1-1. Run nameser:

1-2. Run successfully:

2-1. Run broker:

2-2. Run successfully:

4. Code test producers:

Success status of the producer sending the message:

5: you can configure the rocketmq-web console with:

The above is how to configure the rocketmq development environment in windows. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are 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

Servers

Wechat

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

12
Report