Dear Wiki user, You have subscribed to a wiki page or wiki category on "James Wiki" for change notification.
The following page has been changed by renen: http://wiki.apache.org/james/RunAsService ------------------------------------------------------------------------------ - '''Windows''' + ''Windows'' * Copy %jamesdirhere%\conf\wrapper.conf to %jamesdirhere%\bin\ * Then, from a command line, execute: wrapper.exe -i wrapper.conf @@ -9, +9 @@ * %jamesdirhere%\bin\wrapper.exe -i %jamesdirhere%\conf\wrapper.conf - '''Linux''' + ''Linux'' - For Linux I know of two ways to do it. + '''For Red Hat''' - For Red Hat there are these instructions; http://www.ejbsolutions.com/products/obox/community/ch20.html. These worked on Red Hat for me easily. However I think the wrapper method below is probably more recommended as it almost "out of the box" functionality with James. For Debian - I found the Red Hat instructions above didn't work straight away. So I used the wrapper" instructions on my Debian box, which turned out to be ''much'' simpler. + Add the following two lines to the start of phoenix.sh to make it chkconfig friendly (phoenix.sh lives in james/bin): + {{{ + #chkconfig: 2345 80 05 + #description: James Mail Server + }}} + + Then add the following line (also to phoenix.sh) to set the JAVA_HOME value + {{{ + export JAVA_HOME=/usr/java/j2sdk/ + }}} + + The first three lines of phoenix.sh are now + {{{ + #chkconfig: 2345 80 05 + #description: James Mail Server + export JAVA_HOME=/usr/java/j2sdk/ + }}} + + + Add a symbolic link to the james start up script (phoenix.sh) + {{{ + cd /etc/init.d + ln -s /opt/james-2.3.1/bin/phoenix.sh james + }}} + + Then, add james as a service + {{{ + chkconfig --add james + }}} + + Then, start the service + {{{ + service james start + }}} + + And test: + {{{ + telnet localhost 25 + }}} + - '' Wrapper Instructions '' + ''' Wrapper Instructions ''' The wrapper instructions are found at http://wrapper.tanukisoftware.org/doc/english/launch-nix-boot-debian.html