$:/usr/local/Cellar/activemq$ ls 5.7.0 5.8.0 $:/usr/local/Cellar/activemq$ cd 5.8.0 $:/usr/local/Cellar/activemq/5.8.0$ ls INSTALL_RECEIPT.json NOTICE bin LICENSE README.txt libexec
$:/usr/local/Cellar/activemq/5.8.0$ activemq start INFO: Loading '/Users/twer/.activemqrc' INFO: Using java '/System/Library/Frameworks/JavaVM.framework/Home/bin/java' INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details INFO: pidfile created : '/usr/local/Cellar/activemq/5.8.0/libexec/data/activemq-bowen-huang.local.pid' (pid '50873')
可以看到进程id是50873.
终止ActiveMQ的运行有两种方式。一种是使用activemq stop。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
$:/usr/local/Cellar/activemq/5.8.0$ activemq stop INFO: Loading '/Users/twer/.activemqrc' INFO: Using java '/System/Library/Frameworks/JavaVM.framework/Home/bin/java' INFO: Waiting at least 30 seconds for regular process termination of pid '50873' : Java Runtime: Apple Inc. 1.6.0_65 /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Heap sizes: current=1035520k free=1033420k max=1035520k JVM args: -Xms1G -Xmx1G -Djava.util.logging.config.file=logging.properties -Dactivemq.classpath=/usr/local/Cellar/activemq/5.8.0/libexec/conf; -Dactivemq.home=/usr/local/Cellar/activemq/5.8.0/libexec -Dactivemq.base=/usr/local/Cellar/activemq/5.8.0/libexec -Dactivemq.conf=/usr/local/Cellar/activemq/5.8.0/libexec/conf -Dactivemq.data=/usr/local/Cellar/activemq/5.8.0/libexec/data Extensions classpath: [/usr/local/Cellar/activemq/5.8.0/libexec/lib,/usr/local/Cellar/activemq/5.8.0/libexec/lib/camel,/usr/local/Cellar/activemq/5.8.0/libexec/lib/optional,/usr/local/Cellar/activemq/5.8.0/libexec/lib/web,/usr/local/Cellar/activemq/5.8.0/libexec/lib/extra] ACTIVEMQ_HOME: /usr/local/Cellar/activemq/5.8.0/libexec ACTIVEMQ_BASE: /usr/local/Cellar/activemq/5.8.0/libexec ACTIVEMQ_CONF: /usr/local/Cellar/activemq/5.8.0/libexec/conf ACTIVEMQ_DATA: /usr/local/Cellar/activemq/5.8.0/libexec/data Connecting to pid: 50873 .Stopping broker: localhost … FINISHED