[lizhiwei@localhost ActiveMQ]$ tar -zxvf apache-activemq-5.9.0-bin.tar.gz
[lizhiwei@localhost ActiveMQ]$ cd apache-activemq-5.9.0
[lizhiwei@localhost apache-activemq-5.9.0]$ ll
total 9956
-rwxr-xr-x. 1 lizhiwei lizhiwei 10105484 Oct 14 2013 activemq-all-5.9.0.jar
drwxrwxr-x. 5 lizhiwei lizhiwei 4096 Oct 8 06:34 bin
drwxr-xr-x. 2 lizhiwei lizhiwei 4096 Oct 8 06:34 conf
drwxr-xr-x. 3 lizhiwei lizhiwei 4096 Oct 8 06:45 data
drwxr-xr-x. 2 lizhiwei lizhiwei 4096 Oct 8 06:34 docs
drwxr-xr-x. 8 lizhiwei lizhiwei 4096 Oct 8 06:34 examples
drwxr-xr-x. 6 lizhiwei lizhiwei 4096 Oct 8 06:34 lib
-rw-r--r--. 1 lizhiwei lizhiwei 40580 Oct 14 2013 LICENSE
-rw-r--r--. 1 lizhiwei lizhiwei 3334 Oct 14 2013 NOTICE
-rw-r--r--. 1 lizhiwei lizhiwei 2610 Oct 14 2013 README.txt
drwxrwxr-x. 6 lizhiwei lizhiwei 4096 Oct 8 06:45 tmp
drwxr-xr-x. 8 lizhiwei lizhiwei 4096 Oct 8 06:34 webapps
drwxrwxr-x. 3 lizhiwei lizhiwei 4096 Oct 8 06:34 webapps-demo
# Location of the java installation
# Specify the location of your java installation using JAVA_HOME, or specify the
# path to the "java" binary using JAVACMD
# (set JAVACMD to "auto" for automatic detection)
#JAVA_HOME="" 此处可以设置JAVA_HOME
JAVACMD="auto"
[lizhiwei@localhost bin]$ ./activemq start
INFO: Using default configuration
(you can configure options in one of these file: /etc/default/activemq /home/lizhiwei/.activemqrc)
INFO: Invoke the following command to create a configuration file
./activemq setup [ /etc/default/activemq | /home/lizhiwei/.activemqrc ]
INFO: Using java ‘/usr/bin/java‘
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: pidfile created : ‘/home/lizhiwei/SoftWare/ActiveMQ/apache-activemq-5.9.0/data/activemq-localhost.localdomain.pid‘ (pid ‘3658‘)
[lizhiwei@localhost bin]$ ps -ef | grep java.*active.*
lizhiwei 3989 1 5 07:42 pts/0 00:00:04 /usr/bin/java -Xms1G -Xmx1G -Djava.util.logging.config.file=logging.properties -Dhawtio.realm=activemq -Dhawtio.role=admins -Dhawtio.rolePrincipalClasses=org.apache.activemq.jaas.GroupPrincipal -Djava.security.auth.login.config=/home/lizhiwei/SoftWare/ActiveMQ/apache-activemq-5.9.0/conf/login.config -Dcom.sun.management.jmxremote -Djava.awt.headless=true -Djava.io.tmpdir=/home/lizhiwei/SoftWare/ActiveMQ/apache-activemq-5.9.0/tmp -Dactivemq.classpath=/home/lizhiwei/SoftWare/ActiveMQ/apache-activemq-5.9.0/conf; -Dactivemq.home=/home/lizhiwei/SoftWare/ActiveMQ/apache-activemq-5.9.0 -Dactivemq.base=/home/lizhiwei/SoftWare/ActiveMQ/apache-activemq-5.9.0 -Dactivemq.conf=/home/lizhiwei/SoftWare/ActiveMQ/apache-activemq-5.9.0/conf -Dactivemq.data=/home/lizhiwei/SoftWare/ActiveMQ/apache-activemq-5.9.0/data -jar /home/lizhiwei/SoftWare/ActiveMQ/apache-activemq-5.9.0/bin/activemq.jar start
lizhiwei 4043 2490 0 07:44 pts/0 00:00:00 grep java.*active.*
[lizhiwei@localhost bin]$
[lizhiwei@localhost bin]$ netstat -anlp | grep -E ‘java‘
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 :::61613 :::* LISTEN 3989/java
tcp 0 0 :::61614 :::* LISTEN 3989/java
tcp 0 0 :::61616 :::* LISTEN 3989/java
tcp 0 0 :::37712 :::* LISTEN 3989/java
tcp 0 0 :::1883 :::* LISTEN 3989/java
tcp 0 0 :::8161 :::* LISTEN 3989/java
tcp 0 0 :::5672 :::* LISTEN 3989/java
unix 2 [ ] STREAM CONNECTED 29511 3989/java
unix 2 [ ] STREAM CONNECTED 29507 3989/java
# Defines users that can access the web (console, demo, etc.)
# username: password [,rolename ...]
admin: admin, admin
user: user, user
原文:http://www.cnblogs.com/LiZhiW/p/4862616.html