Installation configuration for APACHE-ACTIVEMQ under CentOS 5.x

Source: Internet
Author: User
Tags centos amq

Today, my company colleagues asked me to help install a ACTIVEMQ,ACTIVEMQ is Apache, the most popular, powerful open source message bus. ACTIVEMQ is a JMS provider implementation that fully supports the JMS1.1 and Java EE 1.4 specifications, Although it has been a long time since the JMS specification was introduced, JMS still plays a special role in today's Java EE applications.
Environment: CentOS 5.x
Required Packages: apache-activemq-5.9.0-bin.tar.gz
1. Download

The code is as follows Copy Code
wget http://archive.apache.org/dist/activemq/apache-activemq/5.9.0/apache-activemq-5.9.0-bin.tar.gz

2. Installation Preparation
Before installing APACHE-ACTIVEMQ, you will need to install a JDK environment, you can go to see my CentOS install JDK 1.6 article.

3. Install ACTIVEMQ

The code is as follows Copy Code
Tar zxf apache-activemq-5.9.0-bin.tar.gz-c/usr/local/
Mv/usr/local/apache-activemq-5.9.0/usr/local/activemq
Useradd ACTIVEMQ
Chown-r ACTIVEMQ.ACTIVEMQ/USR/LOCAL/ACTIVEMQ
Vi/usr/local/activemq/bin/activemq

Change the configuration of activemq_opts_memory to activemq_opts_memory= "-xms256m-xmx384m-xx:permsize=256m-

The code is as follows Copy Code

Xx:maxpermsize=384m "

Vi/etc/profile
Export Path=/usr/local/activemq/bin: $PATH

After saving, execute:

The code is as follows Copy Code
Source/etc/profile

Configure from Start:

The code is as follows Copy Code

Vi/etc/init.d/activemq


#!/bin/bash
#
# ACTIVEMQ starts activemq.
#
#
# chkconfig:345 88 12
# DESCRIPTION:ACTIVEMQ is a JMS messaging Queue Server.
### BEGIN INIT INFO
# provides: $ACTIVEMQ
### End INIT INFO

# The Base directory
Amq_dir= "/USR/LOCAL/ACTIVEMQ"

# run the instance as user
Amq_user=activemq

cmd= "Nohup $AMQ _dir/bin/activemq-admin"

Case "$" in
Start
echo "Starting ActiveMQ"
/bin/su– $AMQ _user-c "$CMD $ >/dev/null 2>&1 &"
;;
Stop
echo "Shutting down ActiveMQ"
/bin/su– $AMQ _user-c "kill-9 ' ps-u activemq-o pid= '"
;;
Restart)
$ stop
$ start
;;
Status
echo "You wish–not yet implemented"
;;
*)
echo "Usage: $ {Start|stop|restart|status}"
Exit 1
;;
Esac

Save and give execution permissions:

The code is as follows Copy Code

chmod +X/ETC/INIT.D/ACTIVEMQ
Service ACTIVEMQ Start
Chkconfig ACTIVEMQ on

Direct input http://ip:8161/admin/index.jsp can be normal access, on it.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.