Activemq installation and cluster configuration

Source: Internet
Author: User

Activemq installation and cluster configuration

1. Create a 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. decompress 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 running File

Cd apache-activemq-5.9.0

Sudo chmod 755 activemq

Run./activemq start

 

6. Run

Three running modes:

(1) normal start./activemqstart

(2) start and specify the log file./activemq start & gt; tmp/smlog

(3) nohup./activemq start & gt;/tmp/smlog

In the first two methods, the process exits when the command line window is closed or ctrl + c is used. In the background startup mode, this situation can be avoided.

 

7. Check that the instance has been started.

ActiveMQ uses port 61616 to provide the JMS service by default, and port 8161 to provide the console service. Run the following command to check whether the ActiveMQ service has been successfully started.

Open Port: nc-lp 61616 &

View which ports are on netstat-anp

Check whether port 61616 is Enabled: netstat-an | grep 61616

Check whether it has been started:

(1). View console output or log files

(2) directly access the activemq Management page: http: // localhost: 8161/admin/

 

8. Disable

If you use (1) or (2), press ctrl + c or close the corresponding terminal.

If the method is (3), it is a little troublesome:

First, find the process corresponding to activemq:

Ps-ef | grep activemq

Then, kill the corresponding process. Assume that the process number is 168168.

Killed 168168

 

 

Reference:

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

 

9. cluster configuration

10.100.100.40 server, modify the configuration file

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

 

Add in Broker label

<NetworkConnectors>

<NetworkConnectoruri = "static :( tcp: // 10.100.100.41: 61616)"/>

</NetworkConnectors>

10.100.100.41 Server Configuration File Modification

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

Add in Broker label

<NetworkConnectors>

<NetworkConnectoruri = "static :( tcp: // 10.100.100.40: 61616)"/>

</NetworkConnectors>

  

Restart two services.

 

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.