此内容没有您所选择的语言版本。
3.3. Configuring the JBoss Web Server Installation
Some configuration is required before running Red Hat JBoss Web Server. This section includes the following configuration procedures:
Procedure 3.4. Setting Environment Variables
- Log in to an account with local administrator permissions.
- Go to
. - Click on the Advanced tab.
- Click the button.
- Click the for System Variables.
- For
JAVA_HOME,TMPandTEMP, enter the appropriate name-value pairs for your system. - For the SSL Connector to work, you will also need to add
JWS_HOME\binto the PATH environment variable of the user that the services will run under. This is SYSTEM by default.
Procedure 3.5. Running the Post-Installation Scripts
- Open a Command Prompt with administrator privileges.
- Change to the
etcfolder of your JBoss Web Server installation:cd /D "JWS_HOME\etc"
cd /D "JWS_HOME\etc"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the Apache HTTP Server and Tomcat post-installation scripts with the following commands:
call postinstall.httpd.bat
call postinstall.httpd.batCopy to Clipboard Copied! Toggle word wrap Toggle overflow call postinstall.tomcat.bat
call postinstall.tomcat.batCopy to Clipboard Copied! Toggle word wrap Toggle overflow The scripts create the required symbolic links (Junction Points) for temporary logging and configuration directories.
Procedure 3.6. Installing the Tomcat Service
- Open a Command Prompt with administrator privileges.
- Change to the
binfolder for your Tomcat version:cd /D "JWS_HOME\share\tomcat<VERSION>\bin"
cd /D "JWS_HOME\share\tomcat<VERSION>\bin"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Install the Tomcat service with the following command:
call service.bat install
call service.bat installCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 3.7. Installing the Apache HTTP Server Service
Note
By default, Apache HTTP Server is configured to use port 80. If you have Microsoft IIS installed, ensure that you disable or reconfigure it to avoid port conflicts:
- Stop the
World Wide Web...service, and change the Startup Type toManual - Configure IIS to use different ports.
Alternatively, you can edit
httpd.conf before installing the Apache HTTP Server service and change Listen to a port that does not conflict with the IIS ports.
- Open a Command Prompt with administrator privileges.
- Change to the
binfolder of your JBoss Web Server installation:cd /D "JWS_HOME\bin"
cd /D "JWS_HOME\bin"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Install the Apache HTTP Server service with the following command:
httpd -k install
httpd -k installCopy to Clipboard Copied! Toggle word wrap Toggle overflow A Firewall security dialog prompt may appear asking for networking access for the Apache HTTP Server. Click to access this service from the network.
Procedure 3.8. Enabling log4j Logging for Tomcat
- Open a Command Prompt with administrator privileges.
- Change to
JWS_HOME\share\extras\ - Copy the log4j files to the
libfolder for your Tomcat version:copy log4j-eap6.jar log4j.properties tomcat-juli-adapters.jar ..\tomcat<VERSION>\lib
copy log4j-eap6.jar log4j.properties tomcat-juli-adapters.jar ..\tomcat<VERSION>\libCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Replace
tomcat-juli.jarfile in your Tomcatbindirectory with thetomcat-juli.jarfile fromJWS_HOME\share\extras\:copy tomcat-juli.jar ..\tomcat<VERSION>\bin
copy tomcat-juli.jar ..\tomcat<VERSION>\binCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 3.9. Removing/Re-Adding SSL Support
JBoss Web Server supports SSL by default, but it can be removed. Follow this procedure to remove or re-add SSL support.
- Open a file browser and go to
JWS_HOME\etc\httpd\conf.d. - Rename the SSL configuration file:
- To remove SSL, rename
ssl.conftossl.conf.disabled. - To re-add SSL rename
ssl.conf.disabledtossl.conf.
Procedure 3.10. Configuring mod_jk
If required, you can configure Apache HTTP Server to use mod_jk as its load balancer.
The steps below list the locations of the mod_jk configuration files. For detailed mod_jk configuration instructions, see the Configure Load Balancing Using Apache HTTP Server and mod_jk section of the HTTP Connectors and Load Balancing Guide.
Note
Sample configuration files are provided for mod_jk, and are located in
JWS_HOME\etc\httpd\conf.d\. The sample configuration files are: mod_jk.conf.sample, workers.properties.sample, and uriworkermap.properties.sample. To use these samples instead of creating your own configuration files, remove the .sample extension, and modify their content as needed.
- In
JWS_HOME\etc\httpd\conf.d\, create a file namedworkers.properties.This file should contain the available workers (JBoss instances). - In
JWS_HOME\etc\httpd\conf.d\, create a file namedmod_jk.conf.This file contains general mod_jk configuration. - In
JWS_HOME\etc\httpd\conf.d\, create a file nameduriworkermap.properties.This file contains request mapping rules that map requests to workers.
Procedure 3.11. Configuring mod_cluster
The mod_cluster load balancer is optional. Follow this procedure to configure Apache HTTP Server to use mod_cluster as its load balancer.
For more information about customizing mod_cluster, see the mod_cluster Connector section of the HTTP Connectors and Load Balancing Guide.
- In
JWS_HOME\etc\httpd\conf.modules.d\00-proxy.conf, ensure that there is a#at the beginning of the following line to disable mod_proxy_balancer.so:LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.soCopy to Clipboard Copied! Toggle word wrap Toggle overflow This module is incompatible with mod_cluster. - Configure the server to load the mod_cluster modules:
- Create the file
JWS_HOME\etc\httpd\conf.d\mod_cluster.conf. - Add the following lines to
mod_cluster.conf:LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule cluster_slotmem_module modules/mod_cluster_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule advertise_module modules/mod_advertise.so
LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule cluster_slotmem_module modules/mod_cluster_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule advertise_module modules/mod_advertise.soCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 3.12. Configuring Folder Permissions for 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:
- Right-click the
JWS_HOMEfolder and clickProperties. - Select the
Securitytab. - Click the button.
- Click the button.
- In the text box, enter
LOCAL SERVICE. - Select the
Full Controlcheck box for theLOCAL SERVICEaccount. - Click
OK. - Click the button.
- Inside the Advanced Security Settings dialog, select
LOCAL SERVICEand click . - Select the check box next to the Replace all existing inheritable permissions on all descendants with inheritable permissions from this object option.
- Click through all the open folder property windows to apply the settings.