| ... The recommended method of building ActiveMQ is the following:
Code Block |
cd [activemq_install_dir]
mvn clean install
|
... If the above build fails on some tests, type the following:
Code Block |
cd [activemq_install_dir]
mvn clean install -Dmaven.test.skip=true
|
-
If you prefer to use an IDE, then you can auto-generate the IDE's project file using maven plugins:
Code Block |
mvn eclipse:eclipse
|
or
Code Block |
mvn idea:idea
|
Feel free to use any other applicable IDE. Please refer to the plugin reference for more details.
-
Start ActiveMQ from the target directory, for example:
Code Block |
cd [activemq_install_dir]\assembly\target
unzip activemq-x.x-SNAPSHOT.zip
cd activemq-x.x-SNAPSHOT
bin\activemq
|
NOTE: Working directories get created relative to the current directory. To create the working directories in the proper place, ActiveMQ must be launched from its home/installation directory.
- Proceed to the #Testing the Installation section.
... This procedure explains how to download and install the binary distribution on a Unix system. NOTE: There are several alternative ways to perform this type of installation.
-
Download the activemq gzip file to the Unix machine, using either a browser or a tool, i.e., wget, scp, ftp, etc. for example:
Code Block |
> wget http://activemq.apache.org/path/tofile/apache-activemq-5.8-tar.gz
|
-
Extract the files from the gzip file into a directory of your choice. For example:
Code Block |
> tar zxvf activemq-x.x.x.tar.gz
|
-
If the ActiveMQ start-up script is not executable, change its permissions. The ActiveMQ script is located in the bin directory. For example:
Code Block |
> cd [activemq_install_dir]/bin
> chmod 755 activemq
|
- Proceed to the #Starting ActiveMQ section of this document.
- Following start-up, go to the #Testing the Installation section.
...
- From a browser, navigate to activemq.apache.org/.
- Click the Download link in the navigation pane (the left pane).
- Click the Maven ActiveMQ SNAPSHOT link.
- Select the version of ActiveMQ to download
For a source distribution, the filename will be similar to: activemq-x.x-src.tar.gz.
-
Extract the files from the ZIP file into a directory of your choice. For example:
Code Block |
tar zxvf activemq.x.x-src.tar.gz
|
-
Build ActiveMQ using Maven 3.0 or greater and Java 6: The preferred method of building ActiveMQ is the following:
Code Block |
cd [activemq_install_dir]
mvn clean install
|
If Maven crashes with a java.lang.OutOfMemoryError, you you need to do this first (assuming a Bourne-like shell):
Code Block |
export MAVEN_OPTS=-Xmx1024M
|
If the above build fails on some tests, do the following:
Code Block |
cd [activemq_install_dir]
mvn clean install -Dmaven.test.skip=true
|
If you prefer to use an IDE then you can auto-generate the IDE's project file using maven plugins:
Code Block |
mvn eclipse:eclipse
|
or
Code Block |
mvn idea:idea
|
Feel free to use any other applicable IDE. Please refer to the plugin reference for more details. NOTE: Working directories get created relative to the current directory. To create working directories in the proper place, ActiveMQ must be launched from its home/installation directory.
- Proceed to the #Starting ActiveMQ section of this document.
- Proceed to #Testing the Installation section.
...
- From a browser, navigate to activemq.apache.org/.
- Click the #Download link in the navigation pane (the left pane).
- Click the Maven ActiveMQ SNAPSHOT link.
- Select the version of ActiveMQ to download
-
Extract the files from the gzip file into a directory of your choice. For example: For a binary developer's snapshot:
Code Block |
tar zxvf activemq-x.x.x.tar.gz
|
For a source developer's snapshot:
Code Block |
tar zxvf activemq-x.x.x-src.tar.gz
|
-
If a binary snapshot was downloaded, to make it executable, the ActiveMQ script may need its permissions changed:
Code Block |
cd [activemq_install_dir]/bin
chmod 755 activemq
|
- For a binary snapshot, proceed to the #Starting ActiveMQ section of this document.
- If a source snapshot was downloaded perform steps 6 - 8 of the #Unix Source Installation procedure.
- Proceed to the #Testing the Installation section.
... From a console window, change to the installation directory and run ActiveMQ:
Code Block |
cd [activemq_install_dir]
|
... ActiveMQ 5.10 onwards
Code Block |
bin\activemq start
|
ActiveMQ 5.9 or older
Code Block |
bin\activemq
|
NOTE: Working directories get created relative to the current directory. To create working directories in the proper place, ActiveMQ must be launched from its home/installation directory. ... From a command shell, change to the installation directory and run ActiveMQ:
Code Block |
cd [activemq_install_dir]
|
where activemq_install_dir is the directory in which ActiveMQ was installed, e.g., /usr/local/activemq-5.x. Then type:
Code Block |
bin/activemq start
OR
bin/activemq start > /tmp/smlog 2>&1 &;
Note: /tmp/smlog may be changed to another file name.
|
...
Warning |
|
|
| Do NOT close the console or shell in which ActiveMQ was started, as that will terminate ActiveMQ (unless ActiveMQ was started with nohup).
Code Block |
nohup bin/activemq > /tmp/smlog 2>&1 &
|
|
... If ActiveMQ is up and running without problems, the Window's console window or the Unix command shell will display information similar to the following log line:
Code Block |
INFO ActiveMQ JMS Message Broker (ID:apple-s-Computer.local-51222-1140729837569-0:0) has started
|
... From a Windows console, type:
Code Block |
netstat -an|find "61616"
|
OR From a Unix command shell, type:
Code Block |
netstat -an|grep 61616
|
Monitoring ActiveMQ
Include Page |
|
Monitoring ActiveMQ |
|
Monitoring ActiveMQ |
|
Stopping ActiveMQ For both Windows and Unix installations, terminate ActiveMQ by typing "CTRL-C" in the console or command shell in which it is running. If ActiveMQ was started in the background on Unix, the process can be killed, with the following:
Code Block |
cd [activemq_install_dir]
|
where activemq_install_dir is the directory in which ActiveMQ was installed, e.g., /usr/local/activemq-5.x. Then type:
Code Block |
bin/activemq stop
|
Or you can do the following:
Code Block |
ps -ef|grep activemq
kill [PID]
where [PID] is the process id of the ActiveMQ process.
|
... For example to use conf/activemq-demo.xml which includes the web demos, you do as follows:
Code Block |
bin/activemq console xbean:conf/activemq-demo.xml
|
... And to launch as a background process you can do:
Code Block |
bin/activemq start xbean:conf/activemq-demo.xml
|
... For example to use examples/conf/activemq-demo.xml which includes the web demos, you do as follows:
Code Block |
bin/activemq console xbean:examples/conf/activemq-demo.xml
|
... And to launch as a background process you can do:
Code Block |
bin/activemq start xbean:examples/conf/activemq-demo.xml
|
... |