Ce contenu n'est pas disponible dans la langue sélectionnée.
2.4.2. Configuring the Environment
- create apache and tomcat users to allow a secure and simple user management (see Procedure 2.8, “Setting the apache User” and Procedure 2.7, “Creating tomcat User”);
- remove the SSL support (see Procedure 2.9, “Removing SSL”);
- add log4j logging (see Procedure 2.10, “Configuring log4j”);
- enable mod_jk or mod_cluster (see Procedure 2.11, “Configuring mod_jk” and Procedure 2.12, “Configuring mod_cluster”).
Procedure 2.6. Setting JAVA_HOME
- In the
bindirectory of your Tomcat (either$EWS_HOME/tomcat6/binor$EWS_HOME/tomcat7/bin), create thesetenv.shfile.For example, run the commandvim tomcat<VERSION>/bin/setenv.sh - Add the JAVA_HOME path definition into the file.For example
export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64
Procedure 2.7. Creating tomcat User
- At the shell prompt, become the root user.
- Run the following command to create the tomcat user group:
# groupadd -g 91 -r tomcat - Go to /opt/jboss-ews-2.1.
- From /opt/jboss-ews-2.1, run the following command to create the tomcat user in the tomcat user group:
# useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r tomcat - From /opt/jboss-ews-2.1, run the following command to assign the ownership of the tomcat directories to the
tomcatuser and allow the user to run the tomcat service:# chown -R tomcat:tomcat tomcat<VERSION>Substitute <VERSION> with the respective tomcat version number (6or7). - From /opt/jboss-ews-2.1, issue the command
ls -land check if the tomcat user is the owner of the Tomcat directory. - Make sure that the
tomcatuser has the execution permission to all parent directories.
Procedure 2.8. Setting the apache User
- Run the following commands as the root user to create the apache user group:
# groupadd -g 48 -r apache - Run the following command to create the apache user in the apache user group:
# useradd -c "Apache" -u 48 -g apache -s /bin/sh -r apache - Change to
/opt/jboss-ews-2.1and run the following command to assign the ownership of the apache directories to theapacheuser and allow the user to runhttpd:# chown -R apache:apache httpd - From /opt/jboss-ews-2.1, issue the command
ls -land check that theapacheuser has execution permission to the respective Apache install path. Output is similar to the following:drwxrwxr-- 11 apache apache 4096 Feb 14 06:52 httpd
Procedure 2.9. Removing SSL
- Go to the
/opt/jboss-ews-2.1/httpd/conf.d/directory. - Rename the SSL configuration file:
- To remove SSL, rename
ssl.conftossl.conf.disabled. - To re-add SSL, rename
ssl.conf.disabledtossl.conf.
Procedure 2.10. Configuring log4j
log4j logging to Tomcat:
- Go to the
/opt/jboss-ews-2.1/extras/directory. - Copy the
log4j-eap6.jar,log4j.properties, andtomcat-juli-adapters.jarfiles to thelibdirectory of the Tomcat directory.For example:# cp log4j.properties ../tomcat<VERSION>/lib/# cp log4j-eap6.jar ../tomcat<VERSION>/lib/# cp tomcat-juli-adapters.jar ../tomcat<VERSION>/lib/Replace <VERSION> with the respective Tomcat version number (6or7). - Replace
tomcat-juli.jarfile in your Tomcatbindirectory with thetomcat-juli.jarfile from/opt/jboss-ews-2.1/extras/:# cp tomcat-juli.jar ../tomcat<VERSION>/bin/
Procedure 2.11. Configuring mod_jk
- available workers (JBoss instances) in the
workers.propertiesfile - the mod_jk configuration file
- In the
/opt/jboss-ews-2.1/httpd/conf/directory, createworkers.properties. - In the
/opt/jboss-ews-2.1/httpd/conf.d/directory, createmod_jk.conf.Note
You can also use the template files from thejboss-ews-docs-2.1.0.zipfile (the file is available at the Red Hat Customer Portal ): after you have downloaded and unzipped the file, copy the sample filesmod_jk.conf.sampleandworkers.properties.samplefrom the /opt/jboss-ews-2.1/doc/mod_jk/ to the locations defined in Step 1 and Step 2. Rename them (drop thesampleextension) and modify their content as needed (see Section 2.4.7, “Additional Resources”).
Procedure 2.12. Configuring mod_cluster
- The mod_cluster configuration can be customized in
/opt/jboss-ews-2.1/httpd/conf.d/mod_cluster.conf.For more information about customizing mod_cluster, see the JBoss HTTP Connector section of the HTTP Connectors and Load Balancing Guide.
Procedure 2.13. Running the Post-Installation Script
- At the shell prompt, become the root user.
- Change to the
/opt/jboss-ews-2.1/httpddirectory. - Run the following command:
# ./.postinstall