이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 2. Installing a Broker as a Windows Service


Abstract

In this tutorial you will install a Red Hat JBoss A-MQ instance as a Windows service.

Goals

In this tutorial you will:
  • generate the service wrapper
  • configure the Java Wrapper Service for your system
  • install a broker instance as a Windows service
  • configure the broker's service to start up automatically

Prerequisites

This tutorial requires that you have Red Hat JBoss A-MQ installed on a Windows computer to which you have administrative privileges.

Procedure

To install JBoss A-MQ as a Windows service:
  1. Start JBoss A-MQ in console mode using the amq command.
  2. Once the console is started and the command prompt appears, enter features:install wrapper.
    The features:install command will locate the required libraries to provision the wrapper feature and deploy it into the run time.
  3. Generate the wrapper by entering wrapper:install -n JBossMQ -d JBossMQ -D "JBossMQ Broker".
    You should see the output shown in Example 2.1, “Wrapper Install Output”.

    Example 2.1. Wrapper Install Output

    Creating file: InstallDir\bin\FuseMQ-wrapper.exe Creating file: InstallDir\bin\JBossMQ-service.bat Creating file: InstallDir\etc\JBossMQ-wrapper.conf Creating file: InstallDir\lib\libwrapper.so Creating file: InstallDir\lib\karaf-wrapper.jar Creating file: InstallDir\lib\karaf-wrapper-main.jar Setup complete. You may wish to tweak the JVM properties in the wrapper config ration file: InstallDir\etc\JBossMQ-wrapper.conf before installing and starting the service. To install the service, run: C:> InstallDir\bin\JBossMQ-service.bat install Once installed, to start the service run: C:> net start "JBossMQ" Once running, to stop the service run: C:> net stop "JBossMQ" Once stopped, to remove the installed the service run: C:> InstallDir\bin\karaf-service.bat remove
  4. Open InstallDir\etc\JBossMQ-wrapper.conf in a text editor.
    The ServiceName-wrapper.conf file configures the Java Wrapper Service that JBoss A-MQ uses to create a Windows service.
  5. Change the line containing set.default.KARAF_HOME= to
    set.default.KARAF_HOME=InstallDir
    This tells the wrapper where the JBoss A-MQ installation is located so it can find the required libraries.
  6. Change the line containing set.default.KARAF_BASE to
    set.default.KARAF_BASE=InstallDir
    This tells the wrapper where to find the configuration and data files for the broker instance being used for the service.
  7. Change the line containing set.default.KARAF_DATA to
    set.default.KARAF_BASE=InstallDir\data
    This tells the wrapper where to find the configuration and data files for the broker instance being used for the service.
  8. Save the file.
  9. Open a command prompt.
  10. Change to the InstallDir directory.
  11. Install the broker as a Windows service by running bin\JBossMQ-service.bat install.
  12. From the Windows Start menu select Start Control Panel Administrative Tools Services.
    The Services window opens.
  13. Double click JBossMQ from the list of services.
    The JBossMQ Properties window opens.
  14. Specify that the service will start up when you login by selecting Automatic from the Startup Type drop-down list.
  15. Click OK.
  16. Open the context menu for the JBossMQ entry in the service list.
  17. Select Start to start the broker.

Further steps

You can stop the broker service by selecting Stop in the Service window's context menu.
To uninstall the broker as a Windows service use InstallDir\bin\JBossMQ-service.bat removes.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.