ActiveMQ Distributed Transaction

First, install ActiveMQ

1, copy apache-activemq-5.14.4-bin.tar.gz to the Linux server / opt under

2, unzip

tar -zxvf apache-activemq-5.14.4-bin.tar.gz 

 3, heavy naming

mv  apache-activemq-5.14.4  activemq 

4, modify the configuration file

vim /opt/activemq/bin/activemq 

 How can I see the java environment

echo $JAVA_HOME

Adding Environment Variables

JAVA_HOME="/opt/jdk1.8.0_152"
JAVA_CMD="/opt/jdk1.8.0_152/bin"

 

5, registration services

-s LN / opt / ActiveMQ / bin / /etc/init.d/ ActiveMQ ActiveMQ // must use an absolute path, otherwise there will be problems establishing links 
chkconfig --add ActiveMQ

6, start the service

service activemq start 

Out of service

service activemq stop

7, see the port number

# netstat -tlnp 

t: tcp represents

l: represents the monitor

n: the ip and port translation into service name and domain name

Program name display: p 

 activemq two important ports, providing a message queue default port: 61616 

Another is the console port 8161

Testing by the console

8, start the consumer side

service activemq consumer 

 9, enter the Web console

Address bar 10.211.55.45:8161

 

 Click Queues

 Click send to

 Enter 909090 in MessageBody, you can see the console printout

 

Guess you like

Origin www.cnblogs.com/minmin123/p/11445808.html