ACTIVEMQ Installation and cluster configuration

Source: Internet
Author: User


1. Create a new folder Activemq/server

mkdir Server

2. Authorization

chmod 777 Server

3. Download the ACTIVEMQ installation package and copy it to the/activemq/server directory

Apache-activemq-5.9.0-bin.tar.gz,:

Http://activemq.apache.org/download.html

4. Unzip the file to the running directory/activemq/server

TAR-XZVF apache-activemq-5.9.0-bin.tar.gz

5. Modify the permissions of the ACTIVEMQ run file

CD apache-activemq-5.9.0

sudo chmod 755 activemq

Run./activemq Start

6. Running

Three modes of operation:

(1) normal start./activemqstart

(2) Start and specify the log file./activemq start >tmp/smlog

(3) Background start mode NOHUP./ACTIVEMQ start >/tmp/smlog

In the first two ways, when the command line window is closed or CTRL + C causes the process to exit, the use of background startup can avoid this situation

7. Check that it has been started

The ACTIVEMQ defaults to 61616 ports for the JMS service, using 8161 ports to provide the management console service, and executes the following command to verify that the ACTIVEMQ service has been successfully started.

Open port: Nc-lp 61616 &

See which ports are open NETSTAT-ANP

See if Port 61616 is open: Netstat-an | grep 61616

Check whether it has started:

(1). View console output or log files

(2). Direct access to ACTIVEMQ Administration page: http://localhost:8161/admin/

8. Close

If the open mode is using (1) or (2), then CTRL + C or close the corresponding terminal can be

If the open mode is (3), then a little bit more trouble:

First find the ACTIVEMQ corresponding process:

Ps-ef | grep ACTIVEMQ

Then kill the corresponding process, assuming the process number 168168 is found.

Kill 168168

Reference Documentation:

http://blog.163.com/yangzhanghui_job/blog/static/17957506220127171173225/

9. Cluster configuration

10.100.100.40 server, modifying configuration files

/home/cloudadmin/activemq/server/apache-activemq-5.9.0/conf/activemq.xml

Increase in broker tags

<networkConnectors>

<networkconnectoruri= "Static: (tcp://10.100.100.41:61616)"/>

</networkConnectors>

10.100.100.41 Server Modify configuration file

/home/cloudadmin/activemq/server/apache-activemq-5.9.0/conf/activemq.xml

Increase in broker tags

<networkConnectors>

<networkconnectoruri= "Static: (tcp://10.100.100.40:61616)"/>

</networkConnectors>

  

Restart two services.

Reference Document: Http://activemq.apache.org/networks-of-brokers.html

ACTIVEMQ Installation and cluster configuration

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.