Hi,

in Karaf 3.0.x, install the service-wrapper feature with:

feature:install wrapper

(earlier, the command was features:install ...). Then activate the wrapper
with:

wrapper:install -s AUTO_START –n <service name> -d <display name of service>
-D <description of service>
ln -s <Karaf home directory>/bin/KARAF-service /etc/init.d/

update-rc.d KARAF-service defaults; # for Debian etc.
or
chkconfig KARAF-service --add; # for RHEL etc.

You may want to tweak <Karaf home directory>/bin/KARAF-service with the
usual service script infos (###BEGIN INIT INFO and the like), and <Karaf
home directory>/etc/KARAF-wrapper.conf with JVM settings.

For more details, see 
http://karaf.apache.org/manual/latest/users-guide/wrapper.html
<http://karaf.apache.org/manual/latest/users-guide/wrapper.html>  

Please note that there might be a limitation of the wrapper when using it
with more than 4 GB heap size, at least I have seen a note for ActiveMQ
which to my knowledge uses the same wrapper. Furthermore, the current
version of the wrapper will not work in armhf environment. For this, you
need to get an update of the wrapper from Tanuki SW - but care for the
changed licensing conditions! Possibly, we will get another solution in an
upcoming Karaf version as indicated here: 
https://issues.apache.org/jira/browse/KARAF-2734
<https://issues.apache.org/jira/browse/KARAF-2734>  

Best Regards,
Jochen




--
View this message in context: 
http://karaf.922171.n3.nabble.com/Run-Karaf-as-Linux-service-tp4036403p4036407.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to