Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Thursday, July 26, 2012

Apache ActiveMQ 5 Installation Guide for Ubuntu 11.10

If you are not familiar with Apache ActiveMQ, you better start with my previous post: Introduction: JMS (with) Spring and Apache ActiveMQ.

As I was installing Apache ActiveMQ on my Ubuntu 11.10 machine, I encountered a strange problem. If you go and read the official Installation Guide, it should be relatively easy to start ActiveMQ with the following commands after you download it:
 
$ cd [installation_dir]/

bin/activemq

OR

[insllation_dir]$: bin/activemq > /tmp/smlog  2>&1 &;
Note: /tmp/smlog may be changed to another file name.  

However, instead of running, it generated the following error message:

Configuration of this script:
    The configuration of this script can be placed on /etc/default/activemq or /home/amir/.activemqrc.
    To use addtional configurations for running multiple instances on the same operating system
    rename or symlink script to a name matching to activemq-instance-.
    This changes the configuration location to /etc/default/activemq-instance- and
    $HOME/.activemqrc-instance-. Configuration files in /etc have higher precedence. 

The issue as I observed was that for some reason, ApacheMQ had not created any configuration file, which supposed to be in /etc/default/apachemq. Therefor after extracting the apache-activemq-x.x.x.tar.gz file, run the following command:

$ [installation_dir]: ./bin/activemq setup activemq

and after that copy that activemq configuration file into /etc/default (Root privileges needed here):
 
$[installation_dir]: sudo cp activemq /etc/default

Now just run:
 
$[installation_dir]: bin/activemq start 
 
Now ActiveMQ should be up and running on http://localhost:8161/admin/.
Note: Remember not to close the terminal which you started ActiveMQ with, as it will terminate the ActiveMQ process or run it with the following command:

nohup bin/activemq > /tmp/smlog 2>&1 &

Thursday, July 19, 2012

Apache Maven 2.2.1 issues with Ubuntu 11.10

If you are running Maven 2.2.1 (older but latest stable version) and by chance you are still on Ubuntu 11.10 with OpenJDK6, you might run into some issues.

Firstly, remember that it is recommended that you define your environment variables under /etc/environment. Secondly, it is also recommended that you avoid using OpenJDK6. It is understandable that installing it is more easy and convenient, however you will have definitely problems while building your package with
mvn package
command (if not while generating your Maven skeleton).

If you have hit the problem and scrolled to the info section, it claims that you have not set your JAVA_HOME environment variable correctly. What you just need to do is to download the Official JDK6, then extract it to any folder you like and point $JAVA_HOME environment variable to that.

It will work just fine after that!