1.进入系统根目录
[root@localhost ~]# cd /
2.新建一个以后放安装文件的目录soft
mkdir soft
3.下载activeMQ [apache-activemq-5.13.1-bin.tar.gz]
本人是通过windows下载,然后通过[SSH Secure Shell Client]把下载压缩包传到soft目录下
4.创建一个放activeMQ的目录
mkdir activeMQ
5.把压缩包解压到activeMQ目录下
tar -zxvf apache-activemq-5.13.1-bin.tar.gz -C /soft/activeMQ
6.给解压后的activeMQ文件夹重命名一下,以方便之后的命令操作
cd activeMQ
mv apache-activemq-5.13.1 activemq-5.13.1
7.启动activemq服务[首先必须得有java运行环境]
cd activemq-5.13.1/bin/
./activemq start
INFO: Loading '/soft/activeMQ/activemq-5.13.1//bin/env'
INFO: Using java '/opt/java_install/JDK/jdk1.7.0_79/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: pidfile created : '/soft/activeMQ/activemq-5.13.1//data/activemq.pid' (pid '31155')
8.查看启动是否成功
ps -ef | grep activemq
root 31155 1 78 12:24 pts/0 00:00:07 /opt/java_install/JDK/jdk1.7.0_79/bin/java -Xms64M -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/soft/activeMQ/activemq-5.13.1//conf/login.config -Dcom.sun.management.jmxremote -Djava.awt.headless=true -Djava.io.tmpdir=/soft/activeMQ/activemq-5.13.1//tmp -Dactivemq.classpath=/soft/activeMQ/activemq-5.13.1//conf:/soft/activeMQ/activemq-5.13.1//../lib/: -Dactivemq.home=/soft/activeMQ/activemq-5.13.1/ -Dactivemq.base=/soft/activeMQ/activemq-5.13.1/ -Dactivemq.conf=/soft/activeMQ/activemq-5.13.1//conf -Dactivemq.data=http://blog.csdn.net/soft/activeMQ/activemq-5.13.1//data -jar /soft/activeMQ/activemq-5.13.1//bin/activemq.jar start
root 31433 10398 0 12:24 pts/0 00:00:00 grep activemq
9.停止activemq服务[根据pid]
kill 31155
ps -ef | grep activemq
root 39289 10398 0 12:28 pts/0 00:00:00 grep activemq