Este contenido no está disponible en el idioma seleccionado.
2.2. ZIP Installation
2.2.1. Download and Extract JBoss Web Server Copiar enlaceEnlace copiado en el portapapeles!
Procedure 2.4. Downloading JBoss Web Server
- Open a browser and log in to the Customer Portal at http://access.redhat.com.
- Click.
- Click Red Hat JBoss Web Server in the Product Downloads list.
- Select the correct JBoss Web Server version from the Version drop-down menu.
- Clickfor each of the following files, ensuring that you select the correct platform and architecture for your system:
- Red Hat JBoss Web Server 3.0 Application Server (
jws-application-servers-3.0.0-<platform>-<architecture>.zip
) - Red Hat JBoss Web Server 3.0 Apache HTTP Server (
jws-httpd-3.0.0-<platform>-<architecture>.zip
)
Procedure 2.5. Extract JBoss Web Server
- Unzip the downloaded ZIP files to your installation directory.
Note
We recommend that you install JBoss Web Server in the/opt/
directory.
2.2.2. Configuring the JBoss Web Server Installation Copiar enlaceEnlace copiado en el portapapeles!
- Creating Tomcat and Apache users for simple and secure user management: Procedure 2.7, “Creating a Tomcat User” and Procedure 2.8, “Creating an Apache User”.
Procedure 2.6. Setting the JAVA_HOME
Environment Variable
JAVA_HOME
environment variable for Tomcat before running JBoss Web Server.
- In the
bin
directory of Tomcat (eitherJWS_HOME/tomcat7/bin
orJWS_HOME/tomcat8/bin
), create a file namedsetenv.sh
, and insert theJAVA_HOME
path definition.For example:export JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64
Procedure 2.7. Creating a Tomcat User
tomcat
user and its parent group:
- In a shell prompt as the root user, change directory to
JWS_HOME
. - 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 - Run the following command to create the
tomcat
user in thetomcat
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
JWS_HOME
, run the following command to assign the ownership of the Tomcat directories to thetomcat
user to 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 Replace <VERSION> with the respective Tomcat version number (7
or8
).You can usels -l
to verify that thetomcat
user is the owner of the directory. - Ensure that the
tomcat
user has execute permissions to all parent directories. For example:chmod -R u+X tomcat<VERSION>
# chmod -R u+X tomcat<VERSION>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 2.8. Creating an Apache User
apache
user and its parent group:
- In a shell prompt as the root user, change directory to
JWS_HOME
. - Run the following command 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 theapache
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 - From
JWS_HOME
, run the following command to assign the ownership of the Apache directories to theapache
user to allow the user to runhttpd
:chown -R apache:apache httpd
# chown -R apache:apache httpd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can usels -l
to verify that theapache
user is the owner of the directory.
Procedure 2.9. Removing/Re-Adding SSL Support
- Go to the
JWS_HOME/httpd/conf.d/
directory and 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. Enabling log4j Logging for Tomcat
- Open a shell prompt and change directory to
JWS_HOME/extras/
. - Copy the
log4j-eap6.jar
,log4j.properties
, andtomcat-juli-adapters.jar
files to thelib
directory of the Tomcat directory.For example:cp log4j.properties ../tomcat<VERSION>/lib/
# cp log4j.properties ../tomcat<VERSION>/lib/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow cp log4j-eap6.jar ../tomcat<VERSION>/lib/
# cp log4j-eap6.jar ../tomcat<VERSION>/lib/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow cp tomcat-juli-adapters.jar ../tomcat<VERSION>/lib/
# cp tomcat-juli-adapters.jar ../tomcat<VERSION>/lib/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace <VERSION> with the respective Tomcat version number (7
or8
). - Replace
tomcat-juli.jar
file in your Tomcatbin
directory with thetomcat-juli.jar
file fromJWS_HOME/extras/
:cp tomcat-juli.jar ../tomcat<VERSION>/bin/
# cp tomcat-juli.jar ../tomcat<VERSION>/bin/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 2.11. Configuring mod_jk
Note
JWS_HOME/httpd/conf.d/
. The sample configuration files are: mod_jk.conf.sample
, workers.properties.sample
, and uriworkermap.properties.sample
. To use these samples instead of creating your own configuration files, remove the .sample
extension, and modify their content as needed.
- In
JWS_HOME/httpd/conf.d/
, create a file namedworkers.properties
.This file should contain the available workers (JBoss instances). - In
JWS_HOME/httpd/conf.d/
, create a file namedmod_jk.conf
.This file contains general mod_jk configuration. - In
JWS_HOME/httpd/conf.d/
, create a file nameduriworkermap.properties
.This file contains request mapping rules that map requests to workers.
Procedure 2.12. Configuring mod_cluster
- mod_cluster can be configured in
JWS_HOME/httpd/conf.d/mod_cluster.conf
.For more information about customizing mod_cluster, see the mod_cluster Connector section of the HTTP Connectors and Load Balancing Guide.
Procedure 2.13. Running the Apache HTTP Server Post-Installation Script
- In a shell prompt as the root user, change directory to
JWS_HOME/httpd
. - Run the following command:
./.postinstall
# ./.postinstall
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2.3. Starting JBoss Web Server Copiar enlaceEnlace copiado en el portapapeles!
- Tomcat (7 or 8).
- Apache HTTP Server.
- The Tomcat user is created. See Procedure 2.7, “Creating a Tomcat User”.
- JAVA_HOME is set correctly. See Procedure 2.6, “Setting the
JAVA_HOME
Environment Variable”.
Procedure 2.14. Starting Tomcat
- Run the following command as the
tomcat
user with your respective Tomcat version (7
or8
):sh JWS_HOME/tomcat<VERSION>/bin/startup.sh
$ sh JWS_HOME/tomcat<VERSION>/bin/startup.sh
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Important
Although there are multiple methods of starting Tomcat, it is recommended that you use thestartup.sh
script. To start Tomcat as a service using Jsvc, see Chapter 5, Using Jsvc to Start Tomcat.
Procedure 2.15. Starting Apache HTTP Server
- To start Apache HTTP Server (httpd), in a terminal as the root, change to
JWS_HOME/httpd/sbin/
and run the following command:./apachectl start
# ./apachectl start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2.4. Stopping JBoss Web Server Copiar enlaceEnlace copiado en el portapapeles!
- Tomcat (7 or 8).
- Apache HTTP Server.
Procedure 2.16. Stopping Tomcat
- To stop Tomcat, run the following command as the root user with your respective Tomcat version (
7
or8
):sh JWS_HOME/tomcat<VERSION>/bin/shutdown.sh
# sh JWS_HOME/tomcat<VERSION>/bin/shutdown.sh
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 2.17. Stopping Apache HTTP Server
- To stop Apache HTTP Server (httpd), in a shell prompt as the root user change to
JWS_HOME/httpd/sbin/
, and run the following command:./apachectl stop
# ./apachectl stop
Copy to Clipboard Copied! Toggle word wrap Toggle overflow