Chapter 3. Installing JBoss Web Server on Microsoft Windows

3.1. Installing a Java Development Kit (JDK)

Before installing JBoss Web Server on Microsoft Windows, you must first install a supported Java Development Kit (JDK).

For a list of supported configurations, see the Red Hat Customer Portal article: JBoss Web Server 3 Supported Configurations.

Note

For instructions on installing the IBM JDK, visit: https://www.ibm.com/developerworks/java/jdk/

To install the Oracle Java Development Kit:

  1. Download the Oracle JDK 1.7 or 1.8 for your operating system and architecture. You can download the JDK installation file from the Oracle website: http://www.oracle.com/technetwork/java/javase/downloads/index.html.
  2. Double-click the downloaded file to start the installation.
  3. Proceed as instructed in the installation window.

3.2. Downloading and Extracting JBoss Web Server

To install JBoss Web Server, download and extract the installation ZIP files.

Downloading JBoss Web Server

  1. Open a browser and log in to the Red Hat Customer Portal.
  2. Click Downloads.
  3. Click Red Hat JBoss Web Server in the Product Downloads list.
  4. Select the correct JBoss Web Server version from the Version drop-down menu.
  5. Click Download for each of the following files, ensuring that you select the correct platform and architecture for your system:

    • Red Hat JBoss Web Server 3.1 Application Server (jws-application-servers-3.1.0-<platform>-<architecture>.zip)

Extracting JBoss Web Server

  1. Unzip the downloaded ZIP files to your installation directory.

    The directory created by extracting the ZIP archives is the top-level directory for JBoss Web Server. This is referred to as JWS_HOME.

3.3. Configuring the JBoss Web Server Installation

Some configuration is required before running JBoss Web Server. This section includes the following configuration procedures:

Setting Environment Variables

  1. Log in to an account with local administrator permissions.
  2. Go to Control PanelSystem.
  3. Click on the Advanced tab.
  4. Click the Environment Variables button.
  5. Click the New button for System Variables.
  6. For JAVA_HOME, TMP, and TEMP, enter the appropriate name-value pairs for your system.
  7. For the SSL Connector to work, you will also need to add JWS_HOME\bin to the PATH environment variable of the user that the services will run under. This user is SYSTEM by default.

Running the Post-Installation Scripts

  1. Open a command prompt with administrator privileges and change to the etc folder of your JBoss Web Server installation:

    cd /D "JWS_HOME\etc"
  2. Run the Tomcat post-installation script using the following command:

    call postinstall.tomcat.bat

    The script creates the required symbolic links (junction points) for temporary logging and configuration directories.

Installing the Tomcat Service

  1. Open a command prompt with administrator privileges and change to the bin folder for your Tomcat version:

    cd /D "JWS_HOME\share\tomcat<VERSION>\bin"
  2. Install the Tomcat service with the following command:

    call service.bat install

Enabling log4j Logging for Tomcat

  1. Open a command prompt with administrator privileges and change to JWS_HOME\share\extras\.
  2. Copy the log4j files to the lib folder for your Tomcat version:

    copy log4j-eap6.jar log4j.properties tomcat-juli-adapters.jar ..\tomcat<VERSION>\lib
  3. Replace tomcat-juli.jar file in your Tomcat bin directory with the tomcat-juli.jar file from JWS_HOME\share\extras\:

    copy tomcat-juli.jar ..\tomcat<VERSION>\bin

Configuring Folder Permissions for the JBoss Web Server Services

Follow this procedure to ensure that the account used to run the services has full control over the JWS_HOME folder and all of its subfolders:

  1. Right-click the JWS_HOME folder and click Properties.
  2. Select the Security tab.
  3. Click the Edit button.
  4. Click the Add button.
  5. In the text box, enter LOCAL SERVICE.
  6. Select the Full Control check box for the LOCAL SERVICE account.
  7. Click OK.
  8. Click the Advanced button.
  9. Inside the Advanced Security Settings dialog, select LOCAL SERVICE and click Edit.
  10. Select the check box next to the Replace all existing inheritable permissions on all descendants with inheritable permissions from this object option.
  11. Click OK through all the open folder property windows to apply the settings.

3.4. Starting JBoss Web Server

To start JBoss Web Server, you must start the following:

  • Tomcat (7 or 8)

You can start the services from a command prompt, or with the Computer Management tool.

Starting JBoss Web Server from a Command Prompt

  1. Open a command prompt with administrator privileges.
  2. Start the Tomcat service:

    net start tomcat<VERSION>

Starting JBoss Web Server from the Computer Management Tool

  1. Go to StartAdministrative ToolsServices.
  2. In the Services list, right-click the name of the service (tomcat) and click Start.
Note

Some third-party applications add libraries to the system directory in Windows. These take precedence over Tomcat libraries when looked-up. This means that if those third-party libraries have the same name as the those used by Tomcat native libraries, they are loaded instead of the libraries distributed with JBoss Web Server.

In this situation, Tomcat may not start, and does not log any error messages in the Windows Event Log, or Tomcat log files. Errors can only be seen by using catalina.bat run.

If this behavior occurs, inspect the contents of the C:\windows\System32\ directory and other PATH directories, and ensure that there are no DLLs conflicting with those delivered with JBoss Web Server. In particular, look for libeay32.dll, ssleay32.dll, and libssl32.dll.

3.5. Stopping JBoss Web Server

To stop JBoss Web Server, you must stop the following:

  • Tomcat

You can stop the services from a command prompt, or with the Computer Management tool.

Stopping JBoss Web Server from a Command Prompt

  1. Open a command prompt with administrator privileges.
  2. Stop the Tomcat service:

    net stop tomcat<VERSION>

Stopping JBoss Web Server from the Computer Management Tool

  1. Go to StartAdministrative ToolsServices.
  2. In the Services list, right-click the name of the service (tomcat) and click Stop.