activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r410285 - in /incubator/activemq/site: features.html unix-service.html
Date Tue, 30 May 2006 13:54:07 GMT
Author: jstrachan
Date: Tue May 30 06:54:06 2006
New Revision: 410285

URL: http://svn.apache.org/viewvc?rev=410285&view=rev
Log:
Latest export from confluence

Modified:
    incubator/activemq/site/features.html
    incubator/activemq/site/unix-service.html

Modified: incubator/activemq/site/features.html
URL: http://svn.apache.org/viewvc/incubator/activemq/site/features.html?rev=410285&r1=410284&r2=410285&view=diff
==============================================================================
--- incubator/activemq/site/features.html (original)
+++ incubator/activemq/site/features.html Tue May 30 06:54:06 2006
@@ -179,6 +179,7 @@
 	<LI><A href="stomp.html" title="Stomp">Stomp</A></LI>
 	<LI><A href="sun-jndi.html" title="Sun JNDI">Sun JNDI</A></LI>
 	<LI><A href="tomcat.html" title="Tomcat">Tomcat</A></LI>
+	<LI><A href="unix-service.html" title="Unix Service">Unix Service</A></LI>
 	<LI><A href="wsif.html" title="WSIF">WSIF</A></LI>
 </UL>
 

Modified: incubator/activemq/site/unix-service.html
URL: http://svn.apache.org/viewvc/incubator/activemq/site/unix-service.html?rev=410285&r1=410284&r2=410285&view=diff
==============================================================================
--- incubator/activemq/site/unix-service.html (original)
+++ incubator/activemq/site/unix-service.html Tue May 30 06:54:06 2006
@@ -179,6 +179,7 @@
 	<LI><A href="stomp.html" title="Stomp">Stomp</A></LI>
 	<LI><A href="sun-jndi.html" title="Sun JNDI">Sun JNDI</A></LI>
 	<LI><A href="tomcat.html" title="Tomcat">Tomcat</A></LI>
+	<LI><A href="" title="Unix Service">Unix Service</A></LI>
 	<LI><A href="wsif.html" title="WSIF">WSIF</A></LI>
 </UL>
 
@@ -239,9 +240,153 @@
 <!--          
             <div class="pagetitle">Unix Service</div>
 -->
-            <DIV class="wiki-content"><P>Created by <SPAN class="nobr"><A
href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan" title="View
profile for James Strachan"><SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/user_12.gif"
height="12" width="12" align="absmiddle" alt="" border="0"></SUP>James Strachan</A></SPAN><BR>
- On Tue May 30 14:26:37 BST 2006<BR>
-Using <FONT color="blue">TimTam</FONT></P></DIV>
+            <DIV class="wiki-content"><H2><A name="UnixService-CreatingaUnixServiceforActiveMQ"></A>Creating
a Unix Service for ActiveMQ</H2>
+
+<P>Below are steps to make ActiveMQ a Linux Daemon on Red Hat 4 ES.</P>
+
+<P>It&apos;s based on <SPAN class="nobr"><A href="http://www-128.ibm.com/developerworks/java/library/l-secjav.html"
title="Visit page outside Confluence" rel="nofollow">this article<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle"
alt="" border="0"></SUP></A></SPAN>.</P>
+
+<H3><A name="UnixService-Settings"></A>Settings</H3>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">JAVA_HOME = /opt/java/jdk1.5.0_06
+ActiveMQ = /opt/activemq/incubator-activemq-4.0</PRE>
+</DIV></DIV>
+
+<H3><A name="UnixService-Installation"></A>Installation</H3>
+
+<P>Sun Java JDK</P>
+
+<P>1. Install Sun Java JDK on /opt/java/ directory.</P>
+
+<P>2. Create a shortcut to JDK directory:</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">sudo ln -s /opt/java/jdk1.5.0_06 /opt/java/java</PRE>
+</DIV></DIV>
+
+<P>ActiveMQ</P>
+
+<P>1. Install ActiveMQ on /opt/activemq/ directory.</P>
+
+<P>2. Make ActiveMQ startup and shutdown scripts executable:</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">sudo chmod +x /opt/activemq/incubator-activemq-4.0/bin/activemq
+sudo chmod +x /opt/activemq/incubator-activemq-4.0/bin/shutdown</PRE>
+</DIV></DIV>
+
+<P>ActiveMQ as Linux Daemon</P>
+
+<P>1. Create activemq user:</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">sudo /usr/sbin/useradd activemq</PRE>
+</DIV></DIV>
+
+<P>2. Create ActiveMQ startup script /home/activemq/activemqstart.sh with the<BR>
+following content:</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">#!/bin/bash
+export JDK_HOME=/opt/java/java
+export JAVA_HOME=/opt/java/java
+/opt/activemq/incubator-activemq-4.0/bin/activemq &amp;</PRE>
+</DIV></DIV>
+
+<P>3. Make /home/activemq/activemqstart.sh executable:</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">sudo chmod +x /home/activemq/activemqstart.sh</PRE>
+</DIV></DIV>
+
+<P>4. Create ActiveMQ shutdown script /home/activemq/activemqstop.sh with the<BR>
+following content:</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">#!/bin/bash
+export JDK_HOME=/opt/java/java
+export JAVA_HOME=/opt/java/java
+/opt/activemq/incubator-activemq-4.0/bin/shutdown</PRE>
+</DIV></DIV>
+
+<P>5. Make /home/activemq/activemqstop.sh executable:</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">sudo chmod +x /home/activemq/activemqstop.sh</PRE>
+</DIV></DIV>
+
+<P>6. Create ActiveMQ Linux service configuration script /etc/init.d/activemq<BR>
+with the following content:</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">#!/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
+
+# Source function library.
+. /etc/init.d/functions
+
+[ -f /home/activemq/activemqstart.sh ] || exit 0
+[ -f /home/activemq/activemqstop.sh ] || exit 0
+
+RETVAL=0
+
+umask 077
+
+start() {
+       echo -n $<SPAN class="code-quote">&quot;Starting ActiveMQ: &quot;</SPAN>
+       daemon /home/activemq/activemqstart.sh
+       echo
+       <SPAN class="code-keyword">return</SPAN> $RETVAL
+}
+stop() {
+       echo -n $<SPAN class="code-quote">&quot;Shutting down ActiveMQ: &quot;</SPAN>
+       daemon su -c /home/activemq/activemqstop.sh activemq
+       echo
+       <SPAN class="code-keyword">return</SPAN> $RETVAL
+}
+restart() {
+       stop
+       start
+}
+<SPAN class="code-keyword">case</SPAN> <SPAN class="code-quote">&quot;$1&quot;</SPAN>
in
+ start)
+       start
+       ;;
+ stop)
+       stop
+       ;;
+ restart|reload)
+       restart
+       ;;
+ *)
+       echo $<SPAN class="code-quote">&quot;Usage: $0 {start|stop|restart}&quot;</SPAN>
+       exit 1
+esac
+
+exit $?</PRE>
+</DIV></DIV>
+
+<P>7. Enable ActiveMQ service configuration as Linux Daemon:</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">sudo chmod +x /etc/init.d/activemq
+sudo /sbin/chkconfig --add activemq
+sudo /sbin/chkconfig activemq on</PRE>
+</DIV></DIV>
+
+<P>8. Restart the server.</P>
+
+<P>Note:  activemq-data is being created in &quot;/&quot; root directory. 
I have to<BR>
+explicitly set the activemq-data location in activemq.conf</P></DIV>
           
                   </DIV>
         </TD>
@@ -252,7 +397,8 @@
     <DIV id="site-footer">
           Added by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James
Strachan</A>,
     last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James
Strachan</A> on May 30, 2006
-                  
+                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=8457&originalId=8459">view
change</A>)
+              
       (<A href="http://goopen.org/confluence/pages/editpage.action?pageId=8457">edit
page</A>)
     </DIV>
 



Mime
View raw message