Detailed Explanation of ActiveMQ Deployment Method in Linux Environment

Time:2019-9-11

This paper illustrates the deployment method of ActiveMQ in Linux environment. Share for your reference, as follows:

ActiveMQ environment deployment

Download address: http://activemq.apache.org/activemq-5143-release.html

downloadapache-activemq-5.14.3-bin.tar.gz

Manual: http://activemq.apache.org/get-start.html

ActiveMQ needs JDK support

Appendix describes Linux Installation JDK

Installation of ActiveMQ

1. Decompress apache-activemq-5.14.3-bin.tar.gz


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

2. Enter


cd apache-activemq-5.14.3/bin

3. Start ActiveMQ


 ./activemq start

Here, our ActiveMQ runs.
(Note: We used the root account and closed the system firewall)

Three, use

ActiveMQ comes with a web server (jetty, developed in java). If it doesn’t matter, we can learn how to use it first.

apache-activemq-5.14.3/conf/jetty.xmlIs the basic configuration of the server.

Access this web server:
http://10.211.55.13:8161/

Default background:
http://10.211.55.13:8161/admin
User name: admin
Password: admin

View the queue:
http://10.211.55.13:8161/admin/queues.jsp

Attachment: Linux Installation JDK

1, Download

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

downloadjdk-8u121-linux-x64.tar.gz
Or downloadjdk-8u121-linux-x64.rpm
(Note that the corresponding system version is selected. We use centos, so choose Linux x64)

2. Authorization


chmod +x jdk-8u121-linux-x64.rpm

3. Installation procedures


rpm -ivh jdk-8u121-linux-x64.rpm

4. Installation Completion View

cd /usr
# We found an additional'java'directory below.
cd /java
#default jdk1.8.0_121 latest

5. Configuring environment variables


vi /etc/profile

# Add at the end
#set java environment
export JAVA_HOME=/usr/java/jdk1.8.0_121
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:/usr/local/php/bin:$JAVA_HOME/bin

Used in terminalechoCommand checks environment variable settings.


#echo $JAVA_HOME
#echo $CLASSPATH
#echo $PATH

Check that the JDK is installed successfully.


#java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

If you see the JVM version and related information, the installation is successful!

I hope this article will be helpful to the maintenance of Linux servers.