Ce contenu n'est pas disponible dans la langue sélectionnée.
2.2. ZIP Installation
2.2.1. Download and Extract JBoss Web Server Copier lienLien copié sur presse-papiers!
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.
- Click for 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 Copier lienLien copié sur presse-papiers!
- 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
bindirectory of Tomcat (eitherJWS_HOME/tomcat7/binorJWS_HOME/tomcat8/bin), create a file namedsetenv.sh, and insert theJAVA_HOMEpath 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
tomcatuser group:groupadd -g 91 -r tomcat
# groupadd -g 91 -r tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the following command to create the
tomcatuser in thetomcatuser group:useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r tomcat
# useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow - From
JWS_HOME, run the following command to assign the ownership of the Tomcat directories to thetomcatuser 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 (7or8).You can usels -lto verify that thetomcatuser is the owner of the directory. - Ensure that the
tomcatuser 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
apacheuser group:groupadd -g 48 -r apache
# groupadd -g 48 -r apacheCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the following command to create the
apacheuser in theapacheuser group:useradd -c "Apache" -u 48 -g apache -s /bin/sh -r apache
# useradd -c "Apache" -u 48 -g apache -s /bin/sh -r apacheCopy to Clipboard Copied! Toggle word wrap Toggle overflow - From
JWS_HOME, run the following command to assign the ownership of the Apache directories to theapacheuser to allow the user to runhttpd:chown -R apache:apache httpd
# chown -R apache:apache httpdCopy to Clipboard Copied! Toggle word wrap Toggle overflow You can usels -lto verify that theapacheuser 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.conftossl.conf.disabled. - To re-add SSL, rename
ssl.conf.disabledtossl.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.jarfiles to thelibdirectory 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 (7or8). - Replace
tomcat-juli.jarfile in your Tomcatbindirectory with thetomcat-juli.jarfile 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
# ./.postinstallCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2.3. Starting JBoss Web Server Copier lienLien copié sur presse-papiers!
- 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_HOMEEnvironment Variable”.
Procedure 2.14. Starting Tomcat
- Run the following command as the
tomcatuser with your respective Tomcat version (7or8):sh JWS_HOME/tomcat<VERSION>/bin/startup.sh
$ sh JWS_HOME/tomcat<VERSION>/bin/startup.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow Important
Although there are multiple methods of starting Tomcat, it is recommended that you use thestartup.shscript. 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 startCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2.4. Stopping JBoss Web Server Copier lienLien copié sur presse-papiers!
- 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 (
7or8):sh JWS_HOME/tomcat<VERSION>/bin/shutdown.sh
# sh JWS_HOME/tomcat<VERSION>/bin/shutdown.shCopy 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 stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow