Este conteúdo não está disponível no idioma selecionado.
Chapter 6. Installing Red Hat JBoss A-MQ as a Service
Abstract
You can install JBoss A-MQ as a system service with a service wrapper for the broker. You first generate the service wrapper, configure the wrapper for your system, and then install and start the service.
6.1. Generating the Service Wrapper
Overview
The Red Hat JBoss A-MQ console
wrapper
feature generates a wrapper around the JBoss A-MQ runtime instance. You use the wrapper to install the messsage broker 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.
After the feature is installed the console gains a wrapper:install command. Running this command generates a generic service wrapper in the JBoss A-MQ installation.
Generating the service wrapper
- Start JBoss A-MQ in console mode with the amq 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>
The Table 6.1, “Wrapper Install Options” table describes the wrapper:install options.Table 6.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
The wrapper:install command generates the following wrapper files:
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.
The command also creates the following libraries that the service wrapper requires:
lib\libwrapper.so
lib\karaf-wrapper.jar
lib\karaf-wrapper-main.jar