ROCKETMQ in the Linux platform environment to build __linux

Source: Internet
Author: User

ROCKETMQ is similar to Windows for deployment under Linux, except that startup Namesrv and Broker are initiated through mqnamesrv.sh and mqbroker.sh. I. The environment builds

Need jdk1.6 (above) 64bit, Maven, Eclipse.

Linux Configuration Jdk,maven Reference article:

Configure MAVEN environment two in Linux in Linux configuration Java environment . ROCKETMQ Project Download Reference window under "ROCKETMQ Project Download" related chapter three. Import rocketmq-master into Eclipse Reference window  Rocketmq-master import into Eclipse "related chapter four.  Compile ROCKETMQ item 1. To perform a install.bat batch at the command line under the Rocketmq-master folder

2. This command compiles the entire project and generates a target folder in the Rocketmq-master directory
3. Enter the bin directory under the newly generated target folder, enter the terminal, execute nohup SH mqnamesrv, the command will start the namesrv, and turn the boot logging
In the Nohup.out file in the current directory

[Root@databasea bin]# nohup sh mqnamesrv &
[1] 21523
[Root@databasea bin]# nohup: Ignore input and append output to "Nohup.out"

Viewing content in Nohup.out with the Cat nohup.out command
Cat Nohup.out the
Name Server boot success.

The Name Server boot success indicates that NAMESRV has started successfully.
Then execute the command: nohup sh mqbroker-n "1273.0.0.1:9876", which starts the broker and records the boot log to the Nohup.out
[Root@databasea bin]# nohup sh mqbroker-n "127.0.0.1:9876" &
[2] 21557
[Root@databasea bin]# nohup: Ignore input and turn output Append to "Nohup.out"

Viewing content in Nohup.out with the Cat nohup.out command
Cat Nohup.out the
Name Server boot success.
The Broker[databasea, 10.1.5.26:10911] boot success. and name server is 127.0.0.1:9876

Use the JPS command to view Java processes
[Root@databasea bin]# JPS
21564 brokerstartup 21648 JPS 21529 namesrvstartup
3012 Org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar

The same ps-ef can also be viewed, with kill-pid to end the process of specifying the PID
Input command: SH mqshutdown namesrv can be used to stop namesrv
[Root@databasea bin]# sh mqshutdown namesrv the mqnamesrv
(21529) is running ...
Send shutdown request to Mqnamesrv (21529) OK

Input command: SH mashutdown broker can be used to stop broker
[Root@databasea bin]# sh mqshutdown broker the
Mqbroker (21564) is running ...
Send shutdown request to Mqbroker (21564) OK
five. Start producer and customerReference window under "Start producer and customer" related chapters

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.