此内容没有您所选择的语言版本。
3.3. Configuring the Environment
Before running JBoss Enterprise Web Server, set the environment variables and run the post-installation scripts.
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.
- Enter the required
JAVA_HOME,TMPandTEMPname-value pairs. - You will also need to add
C:\Program Files\jboss-ews-2.1\binto the PATH environment variable of the user the service runs under. This is SYSTEM by default. Without this, the SSL Connector will fail to work.
Procedure 3.5. Running the Post-Installation Script
- Run the Command Prompt as administrator even if you are logged in as the administrator:
- Click the button.
- Go to
. - Right-click the Command Prompt and select
Run as administrator.
- In the Command Prompt, type the following to change to the
etcfolder of your Enterprise Web Server installation:cd /D "C:\Program Files\jboss-ews-2.1\etc"
C:\> cd /D "C:\Program Files\jboss-ews-2.1\etc"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Issue the command
call postinstall.httpd.batand then the commandcall postinstall.tomcat.batto run the post-installation script.The script creates the required symbolic links (Junction Points) for temporary logging and configuration directories.
Procedure 3.6. Installing Tomcat
Follow this procedure to install Tomcat as a service:
- Run the Command Prompt as administrator:
- Click the button.
- Go to
. - Right-click the Command Prompt and select
Run as administrator.Note
On 64-bit Windows, you need to use the 64-bit version of the Command Prompt (cmd.exe). Running thecmdcommand from a 32-bit application launches a 32-bit Command Prompt instance. This causes the service setup script to fail with a File Not Found warning. - Change to the
binfolder in the JBoss Enterprise Web Server installation folder.For Tomcat 6
For Tomcat 6, the command is:cd /D "C:\Program Files\jboss-ews-2.1\share\tomcat6\bin"
C:\> cd /D "C:\Program Files\jboss-ews-2.1\share\tomcat6\bin"Copy to Clipboard Copied! Toggle word wrap Toggle overflow For Tomcat 7
For Tomcat 7, the command is:cd /D "C:\Program Files\jboss-ews-2.1\share\tomcat7\bin"
C:\> cd /D "C:\Program Files\jboss-ews-2.1\share\tomcat7\bin"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- In the Command Prompt, run the following command :
call service.bat install
call service.bat installCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 3.7. Installing HTTP
Follow this procedure to install HTTPD as a service:
- Run the Command Prompt as administrator:
- Click the button.
- Go to
. - Right-click the Command Prompt and select
Run as administrator.
- Change to the
binfolder of your new installation:cd /D "C:\Program Files\jboss-ews-2.1\bin"
C:\> cd /D "C:\Program Files\jboss-ews-2.1\bin"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - In the Command Prompt, run the
installcommand:A Firewall security dialog prompt demanding networking access for the Apache HTTP Server service appears. Click if you wish to access this service from the network.httpd -k install
httpd -k installCopy to Clipboard Copied! Toggle word wrap Toggle overflow Note
By default, Apache HTTP Server is configured to listen on port 80. If you have Microsoft IIS installed, ensure the following:World Wide Web...service is stopped and the Startup Type is set toManualWorld Wide Web...service is configured to listen on a different port
Alternatively, you can edit thehttpd.conffile before installing the service and change theListendirective to a port that does not collide with the Internet Information Service listening ports.
Procedure 3.8. Configuring log4j
Follow this procedure to use
log4j logging in Tomcat:
- Change to
C:\Program Files\jboss-ews-2.1\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 fromC:\Program Files\jboss-ews-2.1\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 SSL
JBoss Enterprise Web Server supports SSL by default, but it may be removed.
Follow this procedure to remove or again add SSL:
- Go to
C:\Program Files\jboss-ews-2.1\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
To configure the HTTP Server to use mod_jk, the following needs to be defined:
- available workers (JBoss instances) in the
workers.propertiesfile - the mod_jk configuration file
mod_jk.conf
Follow this procedure to configure the HTTP Server to use mod_jk as its load balancer:
- In
C:\Program Files\jboss-ews-2.1\etc\httpd\conf\create workers.properties (see http://tomcat.apache.org/connectors-doc/reference/apache.html). - In
C:\Program Files\jboss-ews-2.1\etc\httpd\conf.d\create mod_jk.conf (see http://tomcat.apache.org/connectors-doc/reference/apache.html)Note
You can also use the sample filesmod_jk.conf.sampleandworkers.properties.sampleavailable inC:\Program Files\jboss-ews-2.1\etc\httpd\conf: modify their content as needed and rename them tomod_jk.confandworkers.properties.
Procedure 3.11. Configuring mod_cluster
Follow this procedure to configure the HTTP Server to use mod_cluster as its load balancer:
- In the
C:\Program Files\jboss-ews-2.1\etc\httpd\conf\httpd.conffile, add the hash (#) sign at the beginning of the following line to disable mod_proxy_balancer.so:This module is incompatible with the JBoss HTTP Connector.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 - Configure the server to load the JBoss HTTP Connector modules:
- Create the file
C:\Program Files\jboss-ews-2.1\etc\httpd\conf.d\mod_cluster.conf. - Add the following lines to the
mod_cluster.conffile:LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule slotmem_module modules/mod_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 slotmem_module modules/mod_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. Setting Security
Follow this procedure to ensure that the account used to run the services has full control over the
C:\Program Files\jboss-ews-2.1 folder and all of its subfolders:
- Right-click the
C:\Program Files\jboss-ews-2.1folder and clickProperties. - Select the
Securitytab. - Click the button.
- Click the button.
- In the text box, enter
LOCAL SERVICE. - Select the
Full Controlcheck box for the newLOCAL 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 .
- Click again.
- Click a third time to apply the settings.
This procedure is intended for Windows 2008. The equivalent procedure in Windows Server 2008R2 can differ slightly.