Follow the below steps to create multiple instances on the same server.
Go to your activemq directory bin folder and run the below commands
Create the Instance 1
cd /apache-activemq-5.8.0/bin ./activemq create instance1 ./activemq setup ~/.activemqrc-instance-instance1 ln -s /home/[yourHomeDir]/.activemqrc-instance-instance1
Create the Instance 2
./activemq create instance2 ./activemq setup ~/.activemqrc-instance-instance2 ln -s /home/[yourHomeDir]/.activemqrc-instance-instance2
Once above commands are executed, go to the instance2 conf and change the default port for the openwire, amqp in the activemq.xml and also change the Connector in jetty.xml.
You can start each instance as below.
cd apache-activemq-5.8.0/bin/instance1/bin ./instance1 console
Open a new Tab