Questo contenuto non è disponibile nella lingua selezionata.
2.5.2. Configuring the Environment
- create apache and tomcat users to allow a secure and simple user management (refer to Procedure 2.8, “Setting the apache User” and Procedure 2.7, “Creating tomcat User”);
- remove the SSL support (refer to Procedure 2.9, “Removing SSL”);
- add log4j logging (refer to Procedure 2.10, “Configuring log4j”);
- enable mod_jk or mod_cluster (refer to Procedure 2.11, “Configuring mod_jk” and Procedure 2.12, “Configuring mod_cluster”).
Procedure 2.6. Setting JAVA_HOME
- In the
bin
directory of your Tomcat (either$EWS_HOME/tomcat6/bin
or$EWS_HOME/tomcat7/bin
), create thesetenv.sh
file.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
# groupadd -g 91 -r tomcat
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Go to /opt/jboss-ews-2.0.
- From /opt/jboss-ews-2.0, 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
# useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r tomcat
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - From /opt/jboss-ews-2.0, run the following command to assign the ownership of the tomcat directories to the
tomcat
user and allow the user to run the tomcat service:chown -R tomcat:tomcat tomcat<VERSION>
# chown -R tomcat:tomcat tomcat<VERSION>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Substitute <VERSION> with the respective tomcat version number (6
or7
). - From /opt/jboss-ews-2.0, issue the command
ls -l
and check if the tomcat user is the owner of the Tomcat directory. - Make sure that the
tomcat
user 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
# groupadd -g 48 -r apache
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 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
# useradd -c "Apache" -u 48 -g apache -s /bin/sh -r apache
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Change to
/opt/jboss-ews-2.0
and run the following command to assign the ownership of the apache directories to theapache
user and allow the user to runhttpd
:chown -R apache:apache httpd
# chown -R apache:apache httpd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - From /opt/jboss-ews-2.0, issue the command
ls -l
and check that theapache
user 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
drwxrwxr-- 11 apache apache 4096 Feb 14 06:52 httpd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 2.9. Removing SSL
- Go to the
/opt/jboss-ews-2.0/httpd/conf.d/
directory. - Rename the SSL configuration file:
- To remove SSL, rename
ssl.conf
tossl.conf.disabled
. - To re-add SSL, rename
ssl.conf.disabled
tossl.conf
.
Procedure 2.10. Configuring log4j
log4j
logging to Tomcat:
- Go to the
/opt/jboss-ews-2.0/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 2.11. Configuring mod_jk
- available workers (JBoss instances) in the
workers.properties
file - the mod_jk configuration file
- In the
/opt/jboss-ews-2.0/httpd/conf/
directory, createworkers.properties
. - In the
/opt/jboss-ews-2.0/httpd/conf.d/
directory, createmod_jk.conf
.Note
You can also use the template files from thejboss-ews-docs-2.0.1.zip
file (the file is available at the Red Hat Customer Portal ): after you have downloaded and unzipped the file, copy the sample filesmod_jk.conf.sample
andworkers.properties.sample
from the /opt/jboss-ews-2.0/doc/mod_jk/ to the locations defined in Step 1 and Step 2. Rename them (drop thesample
extension) and modify their content as needed (to refer to Section 2.5.10, “Additional Resources”).
Procedure 2.12. Configuring mod_cluster
- The mod_cluster configuration can be customized in
/opt/jboss-ews-2.0/httpd/conf.d/mod_cluster.conf
.For further information about customizing mod_cluster, refer to 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.0/httpd
directory. - Run the following command:
./.postinstall
# ./.postinstall
Copy to Clipboard Copied! Toggle word wrap Toggle overflow