Download ActiveMQ
activeMQ official website: http://activemq.apache.org/
scroll down the page to find the Download Latest button
click Download Latest would jump button to the download page:
the option to download the appropriate installation package for your environment, here is a demonstration in linux environment, so download apache-activemq-5.15.12-bin.tar.gz
.
ActiveMQ installation
After we downloaded earlier good ActiveMQ installation package, upload it to the linux server, to find their own path is placed, where I put on the table:
extracting installation package to the specified directory, unpack here to /usr/local/activemq/
extract the command:tar -zxvf /root/Desktop/apache-activemq-5.15.12-bin.tar.gz -C /usr/local/activemq/
After the extraction is completed, came under activeMQ bin directory, use the activemq statrt
start activeMQ:
[root@localhost ~]# ./activemq start
INFO: Loading '/usr/local/activemq/apache-activemq-5.15.12//bin/env'
INFO: Using java '/usr/local/java/jdk1.8.0_241/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: pidfile created : '/usr/local/activemq/apache-activemq-5.15.12//data/activemq.pid' (pid '4580')
See if activeMQ started successfully:
- A way, to see the process:
[root@localhost bin]# ps -ef|grep activemq
root 4580 1 9 13:56 pts/1 00:00:04 /usr/local/java/jdk1.8.0_241/bin/java -Xms64M -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/usr/local/activemq/apache-activemq-5.15.12//conf/login.config -Dcom.sun.management.jmxremote -Djava.awt.headless=true -Djava.io.tmpdir=/usr/local/activemq/apache-activemq-5.15.12//tmp -Dactivemq.classpath=/usr/local/activemq/apache-activemq-5.15.12//conf:/usr/local/activemq/apache-activemq-5.15.12//../lib/: -Dactivemq.home=/usr/local/activemq/apache-activemq-5.15.12/ -Dactivemq.base=/usr/local/activemq/apache-activemq-5.15.12/ -Dactivemq.conf=/usr/local/activemq/apache-activemq-5.15.12//conf -Dactivemq.data=/usr/local/activemq/apache-activemq-5.15.12//data -jar /usr/local/activemq/apache-activemq-5.15.12//bin/activemq.jar start
root 4622 4330 0 13:57 pts/1 00:00:00 grep activemq
- Second way to see if the port is occupied, activeMQ default port 61616:
[root@localhost bin]# netstat -anp|grep 61616
tcp 0 0 :::61616 :::* LISTEN 4580/java
[root@localhost bin]# lsof -i:61616
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
java 4580 root 131u IPv6 22829 TCP *:61616 (LISTEN)
Use activemq stop
the command to shut down activeMQ services:
[root@localhost bin]# ./activemq stop
INFO: Loading '/usr/local/activemq/apache-activemq-5.15.12//bin/env'
INFO: Using java '/usr/local/java/jdk1.8.0_241/bin/java'
INFO: Waiting at least 30 seconds for regular process termination of pid '4580' :
Java Runtime: Oracle Corporation 1.8.0_241 /usr/local/java/jdk1.8.0_241/jre
Heap sizes: current=63360k free=62661k max=1013632k
JVM args: -Xms64M -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/usr/local/activemq/apache-activemq-5.15.12//conf/login.config -Dactivemq.classpath=/usr/local/activemq/apache-activemq-5.15.12//conf:/usr/local/activemq/apache-activemq-5.15.12//../lib/: -Dactivemq.home=/usr/local/activemq/apache-activemq-5.15.12/ -Dactivemq.base=/usr/local/activemq/apache-activemq-5.15.12/ -Dactivemq.conf=/usr/local/activemq/apache-activemq-5.15.12//conf -Dactivemq.data=/usr/local/activemq/apache-activemq-5.15.12//data
Extensions classpath:
[/usr/local/activemq/apache-activemq-5.15.12/lib,/usr/local/activemq/apache-activemq-5.15.12/lib/camel,/usr/local/activemq/apache-activemq-5.15.12/lib/optional,/usr/local/activemq/apache-activemq-5.15.12/lib/web,/usr/local/activemq/apache-activemq-5.15.12/lib/extra]
ACTIVEMQ_HOME: /usr/local/activemq/apache-activemq-5.15.12
ACTIVEMQ_BASE: /usr/local/activemq/apache-activemq-5.15.12
ACTIVEMQ_CONF: /usr/local/activemq/apache-activemq-5.15.12/conf
ACTIVEMQ_DATA: /usr/local/activemq/apache-activemq-5.15.12/data
Connecting to pid: 4580
.Stopping broker: localhost
. TERMINATED
Specifies the log output files on startup, activemq log default location is: active installation directory /data/activemq.log:
[root@localhost data]# pwd
/usr/local/activemq/apache-activemq-5.15.12/data
[root@localhost data]# ll
总计 32
-rw-r--r-- 1 root root 7282 03-22 14:27 activemq.log
-rw-r--r-- 1 root root 5 03-22 14:27 activemq.pid.stop
-rw-r--r-- 1 root root 0 03-22 13:56 audit.log
drwxr-xr-x 2 root root 4096 03-22 13:56 kahadb
Specifies the log file path startup: ./activemq start -> /usr/local/activemq/activemq.log
At this point activeMQ will generate a log file in the specified directory we:
[root@localhost bin]# cd /usr/local/activemq/
[root@localhost activemq]# pwd
/usr/local/activemq
[root@localhost activemq]# ll
总计 16
-rw-r--r-- 1 root root 330 03-22 14:31 activemq.log
drwxr-xr-x 11 root root 4096 03-22 13:56 apache-activemq-5.15.12
ActiveMQ Console
activeMQ is the management console, access the address: http://activeMQServerAddres:8161/
Click Manage ActiveMQ broker
, then will enter the account number and password, the default is admin / admin:
After the successful landing:
here temporarily to do too much introduction, more about this later