此内容没有您所选择的语言版本。
4.4. Configuring the Environment
After you have installed JBoss Enterprise Web Server, set the JAVA_HOME for your Tomcat (refer to Procedure 4.4, “Configuring Tomcat”).
Optionally, you can also:
- remove SSL (refer to Procedure 4.5, “Removing SSL”);
- add log4j logging (refer to Procedure 4.6, “Configuring log4j”);
- enable mod_jk or mod_cluster (refer to Procedure 4.7, “Configuring mod_jk” and Procedure 4.8, “Configuring mod_cluster”).
Procedure 4.4. Configuring Tomcat
Before starting Tomcat, set its
JAVA_HOME
variable to point to a supported JDK (1.6.0):
- Locate the
tomcat
configuration file:- For Tomcat 7:
/opt/jboss-ews-2.0/etc/sysconfig/tomcat7
- For Tomcat 6:
/opt/jboss-ews-2.0/etc/sysconfig/tomcat6
- Open the configuration file and delete the hash (#) sign at the beginning of the following line:
JAVA_HOME="/usr/java"
# JAVA_HOME="/usr/java"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 4.5. Removing SSL
JBoss Enterprise Web Server by default supports SSL. However, you may remove the SSL support.
Follow this procedure to remove or add SSL:
- Go to
/opt/jboss-ews-2.0/etc/httpd/conf.d
- Rename the SSL configuration file:
- To remove SSL, rename
ssl.conf
tossl.conf.disabled
. - To re-enable the SSL, rename
ssl.conf.disabled
tossl.conf
.
Procedure 4.6. Configuring log4j
Follow this procedure to add
log4j
logging to Tomcat:
- Go to the
/opt/jboss-ews-2.0/share/extras
directory. - Copy the
log4j.jar
andlog4j.properties
files to thelib
directory of the Tomcat directory:- If using Tomcat 6, run the following commands:
extras]# cp log4j.properties ../tomcat6/lib/
extras]# cp log4j.properties ../tomcat6/lib/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow extras]# cp log4j.jar ../tomcat6/lib/
extras]# cp log4j.jar ../tomcat6/lib/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - If using Tomcat 7, run the following commands:
extras]# cp log4j.properties ../tomcat7/lib/
extras]# cp log4j.properties ../tomcat7/lib/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow extras]# cp log4j.jar ../tomcat7/lib/
extras]# cp log4j.jar ../tomcat7/lib/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 4.7. Configuring mod_jk
To configure the HTTP Server to use mod_jk, define the following:
- available workers (JBoss instances) in the
workers.properties
file - the mod_jk configuration file mod_jk.conf
Follow this procedure to configure the HTTP Server to use mod_jk as its load balancer:
- Create a workers.properties file in
/opt/jboss-ews-2.0/etc/httpd/conf
(refer to http://tomcat.apache.org/connectors-doc/reference/workers.html). - Create a mod_jk.conf in
/opt/jboss-ews-2.0/etc/httpd/conf.d/
, (refer to http://tomcat.apache.org/connectors-doc/reference/apache.html).Note
You can also copy and modify the sample filesmod_jk.conf.sample
andworkers.properties.sample
available in /opt/jboss-ews-2.0/etc/httpd/conf/: modify their content as needed and rename them tomod_jk.conf
andworkers.properties
.
Procedure 4.8. Configuring mod_cluster
- Mod_cluster is part of the JBoss Enterprise Web Server 2.0 installation.
- In
/opt/jboss-ews-2.0/httpd/conf/httpd.conf
add a hash (#
) sign at the beginning of the following line to disable the mod_proxy_balancer module: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.so
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the server to load the JBoss HTTP Connector modules:
- Create the file
/opt/jboss-ews-2.0/httpd/conf.d/mod_cluster-native.conf
. - Add the following lines to the file
/opt/jboss-ews-2.0/httpd/conf.d/
mod_cluster-native.conf
:LoadModule slotmem_module modules/mod_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule advertise_module modules/mod_advertise.so
LoadModule slotmem_module modules/mod_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule advertise_module modules/mod_advertise.so
Copy to Clipboard Copied! Toggle word wrap Toggle overflow