Questo contenuto non è disponibile nella lingua selezionata.

2.5.2. Configuring the Environment


Before running JBoss Enterprise Web Server, the JAVA_HOME variable needs to be set (refer to Procedure 2.6, “Setting JAVA_HOME”).
Optionally, you can also:
Run the post-installation script once you have set up the environment (refer to Procedure 2.13, “Running the Post-Installation Script”).

Procedure 2.6. Setting JAVA_HOME

  1. In the bin directory of your Tomcat (either $EWS_HOME/tomcat6/bin or $EWS_HOME/tomcat7/bin), create the setenv.sh file.
    For example, run the command vim tomcat<VERSION>/bin/setenv.sh
  2. 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

Follow this procedure to create the tomcat user and its parent group:
  1. At the shell prompt, become the root user.
  2. Run the following command to create the tomcat user group:
    # groupadd -g 91 -r tomcat
    Copy to Clipboard Toggle word wrap
  3. Go to /opt/jboss-ews-2.0.
  4. 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
    Copy to Clipboard Toggle word wrap
  5. 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> 
    Copy to Clipboard Toggle word wrap
    Substitute <VERSION> with the respective tomcat version number (6 or 7).
  6. From /opt/jboss-ews-2.0, issue the command ls -l and check if the tomcat user is the owner of the Tomcat directory.
  7. Make sure that the tomcat user has the execution permission to all parent directories.

Procedure 2.8. Setting the apache User

Follow this procedure to set up the apache user:
  1. Run the following commands as the root user to create the apache user group:
    # groupadd -g 48 -r apache
    Copy to Clipboard Toggle word wrap
  2. 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
    Copy to Clipboard Toggle word wrap
  3. Change to /opt/jboss-ews-2.0 and run the following command to assign the ownership of the apache directories to the apache user and allow the user to run httpd:
    # chown -R apache:apache httpd
    Copy to Clipboard Toggle word wrap
  4. From /opt/jboss-ews-2.0, issue the command ls -l and check that the apache 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
    Copy to Clipboard Toggle word wrap

Procedure 2.9. Removing SSL

JBoss Enterprise Web Server supports SSL by default, but it can be removed.
Follow this procedure to remove or re-add SSL:
  1. Go to the /opt/jboss-ews-2.0/httpd/conf.d/ directory.
  2. Rename the SSL configuration file:
    • To remove SSL, rename ssl.conf to ssl.conf.disabled.
    • To re-add SSL, rename ssl.conf.disabled to ssl.conf.

Procedure 2.10. Configuring log4j

Follow this procedure to add log4j logging to Tomcat:
  1. Go to the /opt/jboss-ews-2.0/extras/ directory.
  2. Copy the log4j.jar and log4j.properties files to the lib directory of the Tomcat directory:
    • If using Tomcat 6, run the following commands:
      extras]# cp log4j.properties ../tomcat6/lib/
      Copy to Clipboard Toggle word wrap
      extras]# cp log4j.jar ../tomcat6/lib/
      Copy to Clipboard Toggle word wrap
    • If using Tomcat 7, run the following commands:
      extras]# cp log4j.properties ../tomcat7/lib/
      Copy to Clipboard Toggle word wrap
      extras]# cp log4j.jar ../tomcat7/lib/
      Copy to Clipboard Toggle word wrap

Procedure 2.11. 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
Follow this procedure to configure the HTTP Server to use mod_jk as its load balancer:
  1. In the /opt/jboss-ews-2.0/httpd/conf/ directory, create workers.properties.
  2. In the /opt/jboss-ews-2.0/httpd/conf.d/ directory, create mod_jk.conf.

    Note

    You can also use the template files from the jboss-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 files mod_jk.conf.sample and workers.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 the sample 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

Follow this procedure to run the post-installation script:
  1. At the shell prompt, become the root user.
  2. Change to the /opt/jboss-ews-2.0/httpd directory.
  3. Run the following command:
    # ./.postinstall
    Copy to Clipboard Toggle word wrap
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat