Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 2. Installing Red Hat JBoss Fuse as a System Service
Abstract
wrapper
feature.
2.1. Installing Red Hat JBoss Fuse as a Service in Standalone Mode Copier lienLien copié sur presse-papiers!
Abstract
2.1.1. Generating the Service Wrapper Copier lienLien copié sur presse-papiers!
Overview Copier lienLien copié sur presse-papiers!
wrapper
feature generates a wrapper around the JBoss Fuse runtime instance. You use the wrapper to install the Apache Karaf container as a system service. The wrapper
feature is not installed by default in the console, so before you can generate the service wrapper you must install the wrapper
feature.
Generating the service wrapper Copier lienLien copié sur presse-papiers!
- Start JBoss Fuse in console mode with the fuse command.
- Enter
features:install wrapper
.The features:install command locates the required libraries to provision the wrapper feature and deploys it into the runtime instance. - Generate the wrapper with the wrapper:install command in the following format:
wrapper:install -n <serviceName> -d <displayName> -D <<description>
wrapper:install -n <serviceName> -d <displayName> -D <<description>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The Table 2.1, “Wrapper Install Options” table describes the wrapper:install options.Expand Table 2.1. Wrapper Install Options Option Default Description -s
AUTO_START
(Windows only) Specifies the mode in which the service is installed. Valid values are AUTO_START
orDEMAND_START
.-n
karaf
Specifies the service name that will be used when installing the service. -d
Specifies the display name of the service. -D
Specifies the description of the service. -i --include
Specifies an include statement for the JSW wrapper configuration. To specify multiple include statement, enter this option multiple times. -e --env
Specifies environment variable and values. To set multiple environment variable and values, enter this option multiple times.
Results Copier lienLien copié sur presse-papiers!
bin\ServiceName-wrapper[.exe]
—the executable file for the wrapper.bin\ServiceName-service[.bat]
—the script used to install and remove the service.etc\ServiceName-wrapper.conf
—the wrapper configuration file.
lib\libwrapper.so
lib\karaf-wrapper.jar
lib\karaf-wrapper-main.jar
2.1.2. Configuring the Batch Script Copier lienLien copié sur presse-papiers!
Overview Copier lienLien copié sur presse-papiers!
ServiceName-service[.bat]
file to control the script execution priority and system user assignment.
RUN_AS_USER Copier lienLien copié sur presse-papiers!
RUN_AS_USER
variable to instruct the script to run from a specific user account. For example, to run the script as the user mquser
, uncomment the line #RUN_AS_USER
and set the value as follows:
RUN_AS_USER=mquser
RUN_AS_USER=mquser
wrapper.log
files. If you attempt to run the script from a user that cannot write the log file, the wrapper will exit without logging an error message.
RUN_AS_USER
variable must not be used with Solaris.
PRIORITY Copier lienLien copié sur presse-papiers!
PRIORITY
environment variable to control the nice level of the service.
2.1.3. Configuring the Service Wrapper Copier lienLien copié sur presse-papiers!
Overview Copier lienLien copié sur presse-papiers!
ServiceName-wrapper.conf
file, which is located under the InstallDir/etc/
directory.
- default environment settings
- properties passed to the JVM
- Classpath
- JMX settings
- logging settings
Default environment settings Copier lienLien copié sur presse-papiers!
- JAVA_HOME
- Location of the Java runtime installation.NoteOn Windows, you can set
JAVA_HOME
either as a system variable only in the registry or inServiceName-wrapper.conf
. You cannot set the variable as a regular environment variable in the Environment Variables list. - KARAF_HOME
- Location of the Red Hat JBoss Fuse installation.
- KARAF_BASE
- Location of the configuration data and OSGi data for the broker instance.NoteRuntime OSGi data is stored in sub-directories of this directory.
- KARAF_DATA
- Location of the logging and persistance data for the broker instance.
Example 2.1. Default Environment Settings
set.default.KARAF_HOME=InstallDir set.default.KARAF_BASE=InstallDir set.default.KARAF_DATA=InstallDir\data
set.default.KARAF_HOME=InstallDir
set.default.KARAF_BASE=InstallDir
set.default.KARAF_DATA=InstallDir\data
JVM parameters Copier lienLien copié sur presse-papiers!
wrapper.java.additional.<param_sequence_number>
wrapper.java.additional.<param_sequence_number>wrapper.java.additional.<param_sequence_number>
wrapper.java.additional.<n>=-DPropName=PropValue
wrapper.java.additional.<n>=-DPropName=PropValuewrapper.java.additional.<n>=-DPropName=PropValuewrapper.java.additional.<n>=-DPropName=PropValuewrapper.java.additional.<n>=-DPropName=PropValuewrapper.java.additional.<n>=-DPropName=PropValuewrapper.java.additional.<n>=-DPropName=PropValue
Example 2.2. Default Java System Properties
Additional classpath entries Copier lienLien copié sur presse-papiers!
wrapper.java.classpath.<n>
wrapper.java.classpath.<n>wrapper.java.classpath.<n>
Example 2.3. Default Wrapper Classpath
wrapper.java.classpath.1=%KARAF_BASE%/lib/karaf-wrapper.jar wrapper.java.classpath.2=%KARAF_HOME%/lib/karaf.jar wrapper.java.classpath.3=%KARAF_HOME%/lib/karaf-jaas-boot.jar wrapper.java.classpath.4=%KARAF_BASE%/lib/karaf-wrapper-main.jar
wrapper.java.classpath.1=%KARAF_BASE%/lib/karaf-wrapper.jar
wrapper.java.classpath.2=%KARAF_HOME%/lib/karaf.jar
wrapper.java.classpath.3=%KARAF_HOME%/lib/karaf-jaas-boot.jar
wrapper.java.classpath.4=%KARAF_BASE%/lib/karaf-wrapper-main.jar
JMX configuration properties Copier lienLien copié sur presse-papiers!
Example 2.4. Wrapper JMX Properties
#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616 #wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false #wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616
#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false
#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
- Locate the following line:
# Uncomment to enable jmx
- Remove the prefix
#
from each of the properties. - Replace the
n
in each property with a sequence number. Make sure that the number adheres to the sequence of all parameters and properties in the configuration file.
Logging configuration Copier lienLien copié sur presse-papiers!
Property | Description |
---|---|
wrapper.console.format |
Specifies how the logging information sent to the console is formated. The format consists of the following tokens:
|
wrapper.console.loglevel | Specifies the logging level displayed on the console. |
wrapper.logfile | Specifies the file used to store the log. |
wrapper.logfile.format | Specifies how the logging information sent to the log file is formated. |
wrapper.console.loglevel | Specifies the logging level sent to the log file. |
wrapper.console.maxsize | Specifies the maximum size, in bytes, that the log file can grow to before the log is archived. The default value of 0 disables log rolling. |
wrapper.console.maxfiles | Specifies the maximum number of archived log files which will be allowed before old files are deleted. The default value of 0 implies no limit. |
wrapper.syslog.loglevel | Specifies the logging level for the sys/event log output. |
2.1.4. Installing and Starting the Service Copier lienLien copié sur presse-papiers!
Overview Copier lienLien copié sur presse-papiers!
Windows Copier lienLien copié sur presse-papiers!
- Installing the service
- Run the following command:
InstallDir\bin\ServiceName-service.bat install
InstallDir\bin\ServiceName-service.bat install
Copy to Clipboard Copied! Toggle word wrap Toggle overflow By default, the service will start when Windows starts. If you specified theDEMAND_START
option, you need to start the service manually. - Uninstalling the service
- Run the following command:
InstallDir\bin\ServiceName-service.bat remove
InstallDir\bin\ServiceName-service.bat remove
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Starting the service
- Run the following command:
net start "ServiceName"
net start "ServiceName"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can also start the service from the Windows Service dialog box. - Stopping the service
- Run the following command:
net stop "ServiceName"
net stop "ServiceName"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can also stop the service from the Windows Service dialog box.
Red Hat Enterprise Linux Copier lienLien copié sur presse-papiers!
- Installing the service
- Run the following commands:
ln -s InstallDir/bin/ServiceName-service /etc/init.d/ chkconfig ServiceName-service --add chkconfig ServiceName-service on
# ln -s InstallDir/bin/ServiceName-service /etc/init.d/ # chkconfig ServiceName-service --add # chkconfig ServiceName-service on
Copy to Clipboard Copied! Toggle word wrap Toggle overflow By default, the service will start when Red Hat Enterprise Linux starts. - Uninstalling the service
- Run the following command:
chkconfig ServiceName-service --del rm /etc/init.d/ServiceName-service
#service ServiceName-service stop # chkconfig ServiceName-service --del # rm /etc/init.d/ServiceName-service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Starting the service
- Run the following command:
service ServiceName-service start
service ServiceName-service start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Stopping the service
- Run the following command:
service ServiceName-service stop
service ServiceName-service stop
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Ubuntu Linux Copier lienLien copié sur presse-papiers!
- Installing the service
- Run the following commands:
ln -s InstallDir/bin/ServiceName-service /etc/init.d/ update-rc.d ServiceName-service defaults
# ln -s InstallDir/bin/ServiceName-service /etc/init.d/ # update-rc.d ServiceName-service defaults
Copy to Clipboard Copied! Toggle word wrap Toggle overflow By default, the service will start when Red Hat Enterprise Linux starts. - Uninstalling the service
- Run the following command:
rm /etc/init.d/ServiceName-service
#/etc/init.d/ServiceName-service stop # rm /etc/init.d/ServiceName-service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Starting the service
- Run the following command:
/etc/init.d/ServiceName-service startservice ServiceName-service start
/etc/init.d/ServiceName-service startservice ServiceName-service start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Stopping the service
- Run the following command:
/etc/init.d/ServiceName-service stop
/etc/init.d/ServiceName-service stop
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Solaris Copier lienLien copié sur presse-papiers!
- Installing the service
- Create Symbolic Links in
/etc/init.d
:ln -s InstallDir/bin/ServiceName-service /etc/init.d/ServiceName-service
# ln -s InstallDir/bin/ServiceName-service /etc/init.d/ServiceName-service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ln -s ln /etc/init.d/ServiceName-service /etc/rcn.d/SxxServiceName-service
# ln -s ln /etc/init.d/ServiceName-service /etc/rcn.d/SxxServiceName-service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteIn SxxServiceName, the xx is the sequence number of execution for the service in the rc directory.By default, the service will start when Solaris starts. - Uninstalling the service
- Run the following command:
rm /etc/init.d/ServiceName-service
#/etc/init.d/ServiceName-service stop # rm /etc/init.d/ServiceName-service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Starting the service
- Run the following command:
#/etc/init.d/ ./ServiceName-service start
#/etc/init.d/ ./ServiceName-service start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Stopping the service
- Run the following command:
/etc/init.d/ ./ServiceName-service stop
/etc/init.d/ ./ServiceName-service stop
Copy to Clipboard Copied! Toggle word wrap Toggle overflow