Installation Guide
Install and Configure Red Hat JBoss Web Server 3.
Abstract
Chapter 1. Introduction Copy linkLink copied to clipboard!
1.1. Introduction Copy linkLink copied to clipboard!
1.2. Components Copy linkLink copied to clipboard!
- Apache Tomcat is a servlet container in accordance with Java Servlet Specification. JBoss Web Server contains Apache Tomcat 7 and Apache Tomcat 8.
- Apache Native is a Tomcat library, which improves Tomcat scalability, performance, and integration with native server technologies. It also contains an implementation of APR (Apache Portable Runtime). APR is a binary protocol for communication of Apache HTTP Server and Apache Tomcat.
- Apache Tomcat Connectors (mod_jk, mod_cluster) are connectors between Apache HTTP Server and Apache Tomcat. Note that the default is mod_cluster, as it is the JBoss native load balancer and is more efficient, reliable, and scalable than mod_jk.
- Apache HTTP Server is an open source web server developed by the Apache Software Foundation. The implementation follows the current HTTP standards.
Note
By default, the delivered Apache HTTP Server provides support for Secure Socket Layer (SSL). To remove it, see the procedure on removing SSL in the Configuring the JBoss Web Server Installation section for your installation platform. - Hibernate is an object-relational mapping framework. The delivered Hibernate contains Hibernate Core, Hibernate Annotations, Hibernate EntityManager with JPA 1.0 APIs.
Note
1.3. Supported Operating Systems and Configurations Copy linkLink copied to clipboard!
1.4. Installation Methods Copy linkLink copied to clipboard!
jws-application-servers-3.0.0-<platform>-<architecture>.zip- Tomcat 7
- Tomcat 8
- Platform-specific utilities
jws-httpd-3.0.0-<platform>-<architecture>.zip- Apache HTTP Server
- Apache HTTP Server modules
1.5. Upgrading JBoss Web Server Copy linkLink copied to clipboard!
Important
1.6. Migrating from Apache HTTP Server 2.2 to Apache HTTP Server 2.4 Copy linkLink copied to clipboard!
1.7. Component Documentation Bundle Copy linkLink copied to clipboard!
jws-docs-3.0.0.zip, is available at the Red Hat Customer Portal, and contains additional documentation for the following:
- httpd
- mod_auth_kerb
- mod_cluster
- mod_jk
- openssl
- tomcat7
- tomcat8
- tomcat-native
- mod_ssl documentation is also available at the location
doc/httpd/mod/mod_ssl.html.
Chapter 2. Installing JBoss Web Server on Red Hat Enterprise Linux Copy linkLink copied to clipboard!
- ZIP files
- RPM packages
2.1. Prerequisites Copy linkLink copied to clipboard!
2.1.1. Installing a Java Development Kit (JDK) Copy linkLink copied to clipboard!
Procedure 2.1. Installing a Java Development Kit (JDK)
- Subscribe your Red Hat Enterprise Linux system to the appropriate supplementary channel:
- Red Hat Enterprise Linux Server Supplementary for Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux Server Supplementary for Red Hat Enterprise Linux 7
- As the root user, execute the command to install a 1.7 or 1.8 JDK:
yum install java-1.7.0-<VENDOR>-devel
# yum install java-1.7.0-<VENDOR>-develCopy to Clipboard Copied! Toggle word wrap Toggle overflow Replace <VENDOR> withoracle,ibm, oropenjdk.yum install java-1.8.0-<VENDOR>-devel
# yum install java-1.8.0-<VENDOR>-develCopy to Clipboard Copied! Toggle word wrap Toggle overflow Replace <VENDOR> withoracle,ibm, oropenjdk.
- Run the following commands as the root user to ensure the correct JDK is in use:
alternatives --config java
# alternatives --config javaCopy to Clipboard Copied! Toggle word wrap Toggle overflow alternatives --config javac
# alternatives --config javacCopy to Clipboard Copied! Toggle word wrap Toggle overflow These commands return lists of available JDK versions with the selected version marked with a plus (+) sign. If the selected JDK is not the desired one, change to the desired JDK as instructed in the shell prompt.Important
All software that use thejavaandjavaccommands uses the JDK set byalternatives. Changing Java alternatives may impact on the running of other software.
2.1.2. Red Hat Enterprise Linux Package Prerequisites Copy linkLink copied to clipboard!
- A supported version of Java is installed. See Section 2.1.1, “Installing a Java Development Kit (JDK)”.
- The following required packages are installed for Red Hat Enterprise Linux 6:
- krb5-workstation
- elinks
- mailcap. The mailcap package contains
/etc/mime.types, which is used by httpd for MIME type mapping extensions. This package is not included in Red Hat Enterprise Linux and must be included.
- The following required packages are installed for Red Hat Enterprise Linux 7:
- apr
- apr-devel
- apr-util
- apr-util-devel
- apr-util-ldap
- elinks
- krb5-workstation
- mailcap
- You must remove the tomcatjss package before installing the tomcat-native package. The tomcatjss package uses an underlying NSS security model rather than the OpenSSL security model.
Procedure 2.2. Removing the tomcatjss Package
- As the root user, run the following command to remove tomcatjss:
yum remove tomcatjss
# yum remove tomcatjssCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 2.3. Installing Required Packages
- For your version of Red Hat Enterprise Linux, run the install command below as the root user:
- For Red Hat Enterprise Linux 6:
yum install krb5-workstation elinks mailcap
# yum install krb5-workstation elinks mailcapCopy to Clipboard Copied! Toggle word wrap Toggle overflow - For Red Hat Enterprise Linux 7:
yum install apr apr-devel apr-util apr-util-devel apr-util-ldap elinks krb5-workstation mailcap
# yum install apr apr-devel apr-util apr-util-devel apr-util-ldap elinks krb5-workstation mailcapCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2. ZIP Installation Copy linkLink copied to clipboard!
2.2.1. Download and Extract JBoss Web Server Copy linkLink copied to clipboard!
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 Copy linkLink copied to clipboard!
- 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 Copy linkLink copied to clipboard!
- 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 Copy linkLink copied to clipboard!
- 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
2.3. RPM Installation Copy linkLink copied to clipboard!
Note
- For Red Hat Enterprise Linux 6:
- jws-3-x86_64-server-6-rpm
- jws-3-i386-server-6-rpm
- For Red Hat Enterprise Linux 7:
- jws-3-x86_64-server-7-rpm
Warning
2.3.1. Installing JBoss Web Server from RPM Packages Copy linkLink copied to clipboard!
Prerequisites
- Ensure that the tomcatjss package is removed. See Section 2.1.2, “Red Hat Enterprise Linux Package Prerequisites”
Procedure 2.18. Installing JBoss Web Server from RPM Packages
- Log in to Red Hat Subscription Manager.
- Click on Systems in the Subscriber Inventory.
- Subscribe to the JBoss Web Server CDN repositories for your operating system version and architecture:
- For Red Hat Enterprise Linux 6:
- jws-3-for-rhel-6-server-rpms
- For Red Hat Enterprise Linux 7:
- jws-3-for-rhel-7-server-rpms
- Run the following command as the root user to install JBoss Web Server:
yum groupinstall jws3
# yum groupinstall jws3Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
Although not recommended, instead of using the group install, you can install each of the packages and their dependencies individually.
2.3.2. Installing the JBoss Web Server Plus Group Copy linkLink copied to clipboard!
Procedure 2.19. Installing the Red Hat JBoss Web Server Plus Group of Packages
- To install the JBoss Web Server Plus group of packages, run the following command as the root user:
yum groupinstall jws3plus
# yum groupinstall jws3plusCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3.3. Configuring the JBoss Web Server Installation (RPM Installation) Copy linkLink copied to clipboard!
Procedure 2.20. Removing SSL Support
- At a shell prompt, run the following command as the root user:
yum remove mod_ssl24
# yum remove mod_ssl24Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 2.21. Configuring mod_jk
Note
/etc/httpd24/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
/etc/httpd24/conf.d/, create a file namedworkers.properties.This file should contain the available workers (JBoss instances). - In
/etc/httpd24/conf.d/, create a file namedmod_jk.conf.This file contains general mod_jk configuration. - In
/etc/httpd24/conf.d/, create a file nameduriworkermap.properties.This file contains request mapping rules that map requests to workers.
Procedure 2.22. Configuring Apache HTTP Server to Use mod_cluster
- In
/etc/httpd24/conf.modules.d/00-proxy.conf, ensure that there is a#at the beginning of the following line to disable mod_proxy_balancer.so:This module is incompatible with mod_cluster.LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.soCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the server to load the mod_cluster modules:
- Create the file
/etc/httpd24/conf.d/mod_cluster.conf. - Add the following lines to
mod_cluster.conf:LoadModule cluster_slotmem_module modules/mod_cluster_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule advertise_module modules/mod_advertise.so
LoadModule cluster_slotmem_module modules/mod_cluster_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule advertise_module modules/mod_advertise.soCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3.4. Starting JBoss Web Server Copy linkLink copied to clipboard!
- Tomcat (7 or 8). See Procedure 2.23, “Starting Tomcat”.
- Apache HTTP Server. See Procedure 2.24, “Starting Apache HTTP Server”.
Procedure 2.23. Starting Tomcat
- In a shell prompt as the root user, start the Tomcat service. Replace <VERSION> with the desired Tomcat version (
7or8):- For Red Hat Enterprise Linux 6:
service tomcat<VERSION> start
# service tomcat<VERSION> startCopy to Clipboard Copied! Toggle word wrap Toggle overflow - For Red Hat Enterprise Linux 7:
systemctl start tomcat<VERSION>.service
# systemctl start tomcat<VERSION>.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow
- Go to http://localhost:8080 in your web browser to verify that Tomcat is running.
Note
The only supported method of starting Tomcat is using the services shown above.
Procedure 2.24. Starting Apache HTTP Server
- In a shell prompt as the root user, start the Apache HTTP Server service:
- For Red Hat Enterprise Linux 6:
service httpd24 start
# service httpd24 startCopy to Clipboard Copied! Toggle word wrap Toggle overflow - For Red Hat Enterprise Linux 7:
systemctl start httpd24.service
# systemctl start httpd24.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3.5. Stopping JBoss Web Server Copy linkLink copied to clipboard!
Procedure 2.25. Stopping Tomcat
- In a shell prompt as the root user, stop the Tomcat service. Replace <VERSION> with the desired Tomcat version (
7or8):- For Red Hat Enterprise Linux 6:
service tomcat<VERSION> stop
# service tomcat<VERSION> stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow - For Red Hat Enterprise Linux 7:
systemctl stop tomcat<VERSION>.service
# systemctl stop tomcat<VERSION>.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow
- Go to http://localhost:8080 in your web browser to verify that Tomcat is no longer running.
Procedure 2.26. Stopping Apache HTTP Server
- In a shell prompt as the root user, stop the Apache HTTP Server service:
- For Red Hat Enterprise Linux 6:
service httpd24 stop
# service httpd24 stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow - For Red Hat Enterprise Linux 7:
systemctl stop httpd24.service
# systemctl stop httpd24.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3.6. Configuring JBoss Web Server Services to Start at Boot Copy linkLink copied to clipboard!
tomcat7 or tomcat8) and Apache HTTP Server (httpd24) services.
- For Red Hat Enterprise Linux 6:
chkconfig <SERVICE_NAME> on
# chkconfig <SERVICE_NAME> onCopy to Clipboard Copied! Toggle word wrap Toggle overflow - For Red Hat Enterprise Linux 7:
systemctl enable <SERVICE_NAME>.service
# systemctl enable <SERVICE_NAME>.serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.4. SELinux Policies Copy linkLink copied to clipboard!
2.4.1. Default SELinux Policies for an RPM Installation Copy linkLink copied to clipboard!
| Name | Port Information | Policy Information |
|---|---|---|
| mod_cluster | Two ports (6666 for TCP and 23364 for UDP) are added for httpd_port_t to allow the httpd process to use them. | A post installation script configures the context mapping for /var/cache/mod_cluster to enable the httpd process to write at this location. |
| tomcat | Four ports are added to http_port_t (TCP ports 8080, 8005, 8009 and 8443) to allow the httpd process to use them. | The Tomcat<VERSION> policy is installed, which sets the appropriate SELinux domain for the process when Tomcat executes. It also sets the appropriate contexts to allow tomcat to write to /var/lib/tomcat<VERSION>, /var/log/tomcat<VERSION>, /var/cache/tomcat<VERSION> and /var/run/tomcat<VERSION>.pid. |
2.4.1.1. Compile SELinux Policies Copy linkLink copied to clipboard!
Before compiling SELinux policies ensure the following prerequisites:
selinux-policy-develpackage is installed.- Tomcat 7 or 8 is installed using the RPM installation method.
2.4.2. SELinux Policies for a ZIP Installation Copy linkLink copied to clipboard!
httpd_t or unconfined_java_t domains. These domains do not confine the processes, and it is recommended that you undertake the following security precautions:
- Always start
httpdusing theapachectlscript. This ensures that theapacheuser owns the process instead of therootuser . - Restrict file access for the
tomcatandapacheusers to only the files and directories that are necessary to the JBoss Web Server runtime. - Do not run Tomcat as the
rootuser.
Chapter 3. Installing JBoss Web Server on Microsoft Windows Copy linkLink copied to clipboard!
3.1. Installing a Java Development Kit (JDK) Copy linkLink copied to clipboard!
Important
Procedure 3.1. Installing Java Development Kit (JDK) for Microsoft Windows
- Download the Oracle JDK 1.7 or 1.8 for your operating system and architecture. You can download the JDK installation file from the Oracle website: http://www.oracle.com/technetwork/java/javase/downloads/index.html.
- Double-click the downloaded file to start the Java installation.
- Proceed as instructed in the installation window.
3.2. Download and Extract JBoss Web Server Copy linkLink copied to clipboard!
Procedure 3.2. 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 3.3. Extract JBoss Web Server
- Unzip the downloaded ZIP files to your installation directory.
Note
We recommend that you install JBoss Web Server inC:\Program Files.
3.3. Configuring the JBoss Web Server Installation Copy linkLink copied to clipboard!
Procedure 3.4. Setting Environment Variables
- Log in to an account with local administrator permissions.
- Go to → .
- Click on the Advanced tab.
- Click the button.
- Click the for System Variables.
- For
JAVA_HOME,TMPandTEMP, enter the appropriate name-value pairs for your system. - For the SSL Connector to work, you will also need to add
JWS_HOME\binto the PATH environment variable of the user that the services will run under. This is SYSTEM by default.
Procedure 3.5. Running the Post-Installation Scripts
- Open a Command Prompt with administrator privileges.
- Change to the
etcfolder of your JBoss Web Server installation:cd /D "JWS_HOME\etc"
cd /D "JWS_HOME\etc"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the Apache HTTP Server and Tomcat post-installation scripts with the following commands:
call postinstall.httpd.bat
call postinstall.httpd.batCopy to Clipboard Copied! Toggle word wrap Toggle overflow call postinstall.tomcat.bat
call postinstall.tomcat.batCopy to Clipboard Copied! Toggle word wrap Toggle overflow The scripts create the required symbolic links (Junction Points) for temporary logging and configuration directories.
Procedure 3.6. Installing the Tomcat Service
- Open a Command Prompt with administrator privileges.
- Change to the
binfolder for your Tomcat version:cd /D "JWS_HOME\share\tomcat<VERSION>\bin"
cd /D "JWS_HOME\share\tomcat<VERSION>\bin"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Install the Tomcat service with the following command:
call service.bat install
call service.bat installCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 3.7. Installing the Apache HTTP Server Service
Note
- Stop the
World Wide Web...service, and change the Startup Type toManual - Configure IIS to use different ports.
httpd.conf before installing the Apache HTTP Server service and change Listen to a port that does not conflict with the IIS ports.
- Open a Command Prompt with administrator privileges.
- Change to the
binfolder of your JBoss Web Server installation:cd /D "JWS_HOME\bin"
cd /D "JWS_HOME\bin"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Install the Apache HTTP Server service with the following command:
httpd -k install
httpd -k installCopy to Clipboard Copied! Toggle word wrap Toggle overflow A Firewall security dialog prompt may appear asking for networking access for the Apache HTTP Server. Click to access this service from the network.
Procedure 3.8. Enabling log4j Logging for Tomcat
- Open a Command Prompt with administrator privileges.
- Change to
JWS_HOME\share\extras\ - Copy the log4j files to the
libfolder for your Tomcat version:copy log4j-eap6.jar log4j.properties tomcat-juli-adapters.jar ..\tomcat<VERSION>\lib
copy log4j-eap6.jar log4j.properties tomcat-juli-adapters.jar ..\tomcat<VERSION>\libCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Replace
tomcat-juli.jarfile in your Tomcatbindirectory with thetomcat-juli.jarfile fromJWS_HOME\share\extras\:copy tomcat-juli.jar ..\tomcat<VERSION>\bin
copy tomcat-juli.jar ..\tomcat<VERSION>\binCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 3.9. Removing/Re-Adding SSL Support
- Open a file browser and go to
JWS_HOME\etc\httpd\conf.d. - Rename the SSL configuration file:
- To remove SSL, rename
ssl.conftossl.conf.disabled. - To re-add SSL rename
ssl.conf.disabledtossl.conf.
Procedure 3.10. Configuring mod_jk
Note
JWS_HOME\etc\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\etc\httpd\conf.d\, create a file namedworkers.properties.This file should contain the available workers (JBoss instances). - In
JWS_HOME\etc\httpd\conf.d\, create a file namedmod_jk.conf.This file contains general mod_jk configuration. - In
JWS_HOME\etc\httpd\conf.d\, create a file nameduriworkermap.properties.This file contains request mapping rules that map requests to workers.
Procedure 3.11. Configuring mod_cluster
- In
JWS_HOME\etc\httpd\conf.modules.d\00-proxy.conf, ensure that there is a#at the beginning of the following line to disable mod_proxy_balancer.so:LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.soCopy to Clipboard Copied! Toggle word wrap Toggle overflow This module is incompatible with mod_cluster. - Configure the server to load the mod_cluster modules:
- Create the file
JWS_HOME\etc\httpd\conf.d\mod_cluster.conf. - Add the following lines to
mod_cluster.conf:LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule cluster_slotmem_module modules/mod_cluster_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule advertise_module modules/mod_advertise.so
LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule cluster_slotmem_module modules/mod_cluster_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule advertise_module modules/mod_advertise.soCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 3.12. Configuring Folder Permissions for JBoss Web Server Services
JWS_HOME folder and all of its subfolders:
- Right-click the
JWS_HOMEfolder and clickProperties. - Select the
Securitytab. - Click the button.
- Click the button.
- In the text box, enter
LOCAL SERVICE. - Select the
Full Controlcheck box for theLOCAL SERVICEaccount. - Click
OK. - Click the button.
- Inside the Advanced Security Settings dialog, select
LOCAL SERVICEand click . - Select the check box next to the Replace all existing inheritable permissions on all descendants with inheritable permissions from this object option.
- Click through all the open folder property windows to apply the settings.
3.4. Starting JBoss Web Server Copy linkLink copied to clipboard!
- Tomcat
- Apache HTTP Server
Procedure 3.13. Starting JBoss Web Server from the Command Prompt
- Open a Command Prompt with administrator privileges.
- Start the Tomcat service:
net start tomcat<VERSION>
net start tomcat<VERSION>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Start the Apache HTTP Server (httpd) service:
net start Apache2.4
net start Apache2.4Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 3.14. Starting JBoss Web Server from the Computer Management Tool
- Go to → →
- In the Services list, right-click the name of each service (
httpdandtomcat) and click .
Note
catalina.bat run.
C:\windows\System32\ directory and other PATH directories, and ensure that there are no DLLs conflicting with those delivered with JBoss Web Server. In particular, look for libeay32.dll, ssleay32.dll, and libssl32.dll.
3.5. Stopping JBoss Web Server Copy linkLink copied to clipboard!
- Tomcat
- Apache HTTP Server
Procedure 3.15. Stopping JBoss Web Server from the Command Prompt
- Open a Command Prompt with administrator privileges.
- Stop the Tomcat service:
net stop tomcat<VERSION>
net stop tomcat<VERSION>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Stop the Apache HTTP Server (httpd) service:
net stop Apache2.4
net stop Apache2.4Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 3.16. Stopping JBoss Web Server from the Computer Management Tool
- Go to → →
- In the Services list, right-click the name of each service (
httpdandtomcat) and click .
Chapter 4. Installing JBoss Web Server on Solaris Copy linkLink copied to clipboard!
4.1. Installing a Java Development Kit (JDK) Copy linkLink copied to clipboard!
Important
Procedure 4.1. Installing Java
- Download the Oracle JDK 1.7 or 1.8 for your operating system and architecture. You can download the JDK installation file from the Oracle website: http://www.oracle.com/technetwork/java/javase/downloads/index.html.
- Run the Java installation file.
- Open
/usrat a shell prompt, and run the following command to display the current Java symbolic link:ls -lad java
ls -lad javaCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Remove the link:
rm java
rm javaCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a Java symbolic link to the newly installed JDK:
ln -sf /usr/jdk/<JDK>
ln -sf /usr/jdk/<JDK>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.2. Download and Extract JBoss Web Server Copy linkLink copied to clipboard!
Procedure 4.2. 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 4.3. 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.
4.3. Configuring the JBoss Web Server Installation Copy linkLink copied to clipboard!
Procedure 4.4. Running the Post-Installation Scripts
- Open a shell prompt, and change directory to
JWS_HOME/etc. - Issue the following commands to run the post-installation scripts:
sh .postinstall.httpd sh .postinstall.tomcat
sh .postinstall.httpd sh .postinstall.tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow The post-installation scripts create the Apache and Tomcat users and groups.
Procedure 4.5. Setting the JAVA_HOME Environment Variable
JAVA_HOME environment variable for Tomcat before running JBoss Web Server.
- Open the Tomcat configuration file:
- For Tomcat 7:
JWS_HOME/etc/sysconfig/tomcat7 - For Tomcat 8:
JWS_HOME/etc/sysconfig/tomcat8
- Remove the hash (#) sign at the beginning of the following line:
JAVA_HOME="/usr/java"
# JAVA_HOME="/usr/java"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 4.6. Removing/Re-Adding SSL Support
- Go to
JWS_HOME/etc/httpd/conf.dand rename the SSL configuration file:- To remove SSL, rename
ssl.conftossl.conf.disabled. - To re-add the SSL, rename
ssl.conf.disabledtossl.conf.
Procedure 4.7. Enabling log4j Logging for Tomcat
- Open a shell prompt and change directory to
JWS_HOME/share/extras/. - Copy the
log4j-eap6.jar,log4j.properties, andtomcat-juli-adapters.jarfiles to thelibdirectory of the Tomcat directory.For example:extras]# cp log4j.properties ../tomcat<VERSION>/lib/
extras]# cp log4j.properties ../tomcat<VERSION>/lib/Copy to Clipboard Copied! Toggle word wrap Toggle overflow extras]# cp log4j-eap6.jar ../tomcat<VERSION>/lib/
extras]# cp log4j-eap6.jar ../tomcat<VERSION>/lib/Copy to Clipboard Copied! Toggle word wrap Toggle overflow extras]# cp tomcat-juli-adapters.jar ../tomcat<VERSION>/lib/
extras]# 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/share/extras/:extras]# cp tomcat-juli.jar ../tomcat<VERSION>/bin/
extras]# cp tomcat-juli.jar ../tomcat<VERSION>/bin/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 4.8. Configuring mod_jk
Note
JWS_HOME/etc/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/etc/httpd/conf.d/, create a file namedworkers.properties.This file should contain the available workers (JBoss instances). - In
JWS_HOME/etc/httpd/conf.d/, create a file namedmod_jk.conf.This file contains general mod_jk configuration. - In
JWS_HOME/etc/httpd/conf.d/, create a file nameduriworkermap.properties.This file contains request mapping rules that map requests to workers.
Procedure 4.9. Configuring Apache HTTP Server to Use 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.
4.4. Starting JBoss Web Server Copy linkLink copied to clipboard!
- Tomcat (7 or 8).
- Apache HTTP Server.
Procedure 4.10. Starting Tomcat
- Run the following command with your respective Tomcat version (
7or8):sh JWS_HOME/share/apache-tomcat-<VERSION>/bin/daemon.sh
$ sh JWS_HOME/share/apache-tomcat-<VERSION>/bin/daemon.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow Important
Although there are multiple methods of starting Tomcat, it is recommended that you use thedaemon.shscript. To start Tomcat as a service using Jsvc, see Chapter 5, Using Jsvc to Start Tomcat.
Procedure 4.11. Starting Apache HTTP Server
- To start Apache HTTP Server (httpd), in a terminal as the root, change to
JWS_HOME/sbin/and run the following command:./apachectl start
# ./apachectl startCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.5. Stopping JBoss Web Server Copy linkLink copied to clipboard!
- Tomcat (7 or 8).
- Apache HTTP Server.
Procedure 4.12. Stopping Tomcat
- To stop Tomcat, in a shell prompt as the root user change to
JWS_HOME/sbin/and run the following command with your respective Tomcat version (7or8):tomcat<VERSION> stop
tomcat<VERSION> stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 4.13. Stopping Apache HTTP Server
- To stop Apache HTTP Server, in a shell prompt as the root user change to
JWS_HOME/sbin/and run the following command:apachectl stop
apachectl stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 5. Using Jsvc to Start Tomcat Copy linkLink copied to clipboard!
For Red Hat Enterprise Linux:
JWS_HOME/extras/jsvcJWS_HOME/tomcat<VERSION>/bin/jsvc
Note
JWS_HOME/tomcat<VERSION>/bin/jsvc is a symlink to JWS_HOME/extras/jsvc.
For Solaris:
JWS_HOME/sbin/jsvcJWS_HOME/share/apache-tomcat-<VERSION>/bin/jsvc
Note
JWS_HOME/share/apache-tomcat-<VERSION>/bin/jsvc is a symlink to JWS_HOME/sbin/jsvc.
5.1. Starting Tomcat Using Jsvc Copy linkLink copied to clipboard!
Procedure 5.1. Start Tomcat Using Jsvc on Red Hat Enterprise Linux
- Run the following command to start Tomcat using Jsvc on Red Hat Enterprise Linux:
JWS_HOME/tomcat<VERSION>/bin/daemon.sh start
JWS_HOME/tomcat<VERSION>/bin/daemon.sh startCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 5.2. Start Tomcat Using Jsvc on Solaris
- Run the following command to start Tomcat using Jsvc on Solaris:
JWS_HOME/share/tomcat<VERSION>/bin/daemon.sh start
JWS_HOME/share/tomcat<VERSION>/bin/daemon.sh startCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2. Stopping Tomcat Using Jsvc Copy linkLink copied to clipboard!
Procedure 5.3. Stop Tomcat Using Jsvc on Red Hat Enterprise Linux
- Run the following command to stop Tomcat that was started using Jsvc on Red Hat Enterprise Linux:
JWS_HOME/tomcat<VERSION>/bin/daemon.sh stop
JWS_HOME/tomcat<VERSION>/bin/daemon.sh stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 5.4. Stop Tomcat Using Jsvc on Solaris
- Run the following command to stop Tomcat that was started using Jsvc on Solaris:
JWS_HOME/share/tomcat<VERSION>/bin/daemon.sh stop
JWS_HOME/share/tomcat<VERSION>/bin/daemon.sh stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.3. Jsvc Parameters Copy linkLink copied to clipboard!
daemon.sh script:
| Parameter Name | Environment Variable | Default Value | Description |
|---|---|---|---|
--java-home | JAVA_HOME | Based on the value of the PATH variable. | The Java home directory location. |
--catalina-home | CATALINA_HOME | Determined by the location of the script. | The Tomcat installation directory location. |
--catalina-base | CATALINA_BASE | Based on the value of the PATH variable. | The directory that contains the specific configuration and set up information if multiple servers are using the same installation. |
--catalina-pid | - | $CATALINA_BASE/logs/catalina-daemon.pid | The file where the process ID (PID) for the running instance of Tomcat is stored. |
--tomcat-user | - | tomcat | The user Tomcat uses. |
--service-start-wait-time | - | This is a wrapper to the --wait parameter. The --wait parameter accepts values in seconds. |
Chapter 6. Hibernate on JBoss Web Server Copy linkLink copied to clipboard!
context.xml. However, persistence.xml and web.xml are also required. The example below shows a configuration with the Tomcat connection pooling mechanism.
/META-INF/context.xmldefines the connection pools Tomcat should create.Example 6.1.
context.xmlCopy to Clipboard Copied! Toggle word wrap Toggle overflow /WEB-INF/classes/META-INF/persistence.xmlis a JPA configuration file. It defines how the application configures Hibernate to consume connections from the Tomcat pool. If you are using the Hibernate API directly, use a similar configuration to that shown inhibernate.cfg.xml.Example 6.2.
persistence.xmlCopy to Clipboard Copied! Toggle word wrap Toggle overflow /WEB-INF/web.xmlis a regular web application deployment file, which instructs Tomcat which datasource to consume. In the example below, the datasource isjdbc/DsWebAppDB.Example 6.3.
web.xmlCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 7. Monitoring JBoss Web Server with JBoss Operations Network (ON) Copy linkLink copied to clipboard!
Web Server Plugin Pack on your JBoss ON server, and then configure Apache HTTP Server and Tomcat in JBoss Web Server to be monitored.
7.1. Download the Web Server Plugin Pack for JBoss ON Copy linkLink copied to clipboard!
Web Server Plugin Pack on your JBoss ON server.
Procedure 7.1. Download the Web Server Plugin Pack for JBoss ON
- Open a web browser, and log in to the Red Hat Customer Portal: http://access.redhat.com
- Click .
- Click Red Hat JBoss Web Server in the Product Downloads list.
- Select JBoss ON for Web Server in the Product drop-down menu.
- Click for each of the following files:
- Web Server Plugin Pack for Red Hat JBoss Operations Network
7.2. Configuring Apache HTTP Server for JBoss ON Monitoring Copy linkLink copied to clipboard!
Procedure 7.2. Configuring Apache HTTP Server for JBoss ON Monitoring
- As the
apacheuser, enable the mod_bmx modules. Create the fileJWS_HOME/httpd/conf.d/mod_bmx.confwith the following contents:LoadModule bmx_module modules/mod_bmx.so LoadModule bmx_status_module modules/mod_bmx_status.so LoadModule bmx_vhost_module modules/mod_bmx_vhost.so
LoadModule bmx_module modules/mod_bmx.so LoadModule bmx_status_module modules/mod_bmx_status.so LoadModule bmx_vhost_module modules/mod_bmx_vhost.soCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Add a handler for mod_bmx. In
JWS_HOME/httpd/conf/httpd.conf, append your handler definition. For example:<Location /bmx> SetHandler bmx-handler </Location>
<Location /bmx> SetHandler bmx-handler </Location>Copy to Clipboard Copied! Toggle word wrap Toggle overflow You may want to restrict access to this URL to a specific virtual host or use password authentication. - Restart the Apache HTTP Server. You can access http://SERVER_ADDRESS:PORT/bmx in a web browser to verify that mod_bmx is working correctly.
- The Apache HTTP Server in your JBoss Web Server installation will now be discoverable for JBoss ON. In JBoss ON, you can import it from the Discovery Queue.Consult the JBoss ON documentation for further details on monitoring and managing Apache HTTP Server.
7.3. Configuring Tomcat for JBoss ON Monitoring Copy linkLink copied to clipboard!
Procedure 7.3. Configuring User Permissions on a Linux Operating System
Note
httpd and Tomcat directories.
- As a user with root privileges, run the following command to add the user which runs the JBoss ON Agent to the
tomcatandapacheuser groups:usermod -aG tomcat,apache <JBOSSON_AGENT_USER>
# usermod -aG tomcat,apache <JBOSSON_AGENT_USER>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 7.4. Configuring Tomcat for JBoss ON Monitoring
- Open the
startupfile of the respective JBoss Web Server instance for editing:- On Red Hat Enterprise Linux installed from a ZIP file, open
JWS_HOME/tomcat<VERSION>/bin/startup.sh - On Red Hat Enterprise Linux installed from RPM, open
/usr/sbin/tomcat<VERSION> - On Microsoft Windows open
JWS_HOME\share\tomcat<VERSION>\bin\startup.bat. - On Solaris using
daemon.shto start Tomcat, openJWS_HOME/tomcat<VERSION>/bin/setenv.sh
- Define an available port for JMX monitoring. Ensure the port is not blocked by any firewall.
- On Red Hat Enterprise Linux and Solaris:
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.port=PORT_NUMBER -Djava.rmi.server.hostname=IP_ADDRESS"JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.port=PORT_NUMBER -Djava.rmi.server.hostname=IP_ADDRESS"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - On Microsoft Windows:
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=PORT_NUMBER -Djava.rmi.server.hostname=IP_ADDRESS"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=PORT_NUMBER -Djava.rmi.server.hostname=IP_ADDRESS"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- In production environments, add the following lines to the JAVA_OPTS variable in the startup file to secure JMX with SSL and restrict the access with a firewall:
- On Red Hat Enterprise Linux and Solaris
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.access.file=JWS_HOME/jmxremote.access" JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.password.file=JWS_HOME/jmxremote.password"JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.access.file=JWS_HOME/jmxremote.access" JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.password.file=JWS_HOME/jmxremote.password"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - On Microsoft Windows:
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.access.file=JWS_HOME\jmxremote.access" set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.password.file=JWS_HOME\jmxremote.password"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.access.file=JWS_HOME\jmxremote.access" set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.password.file=JWS_HOME\jmxremote.password"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Note
If you want to disable authentication and SSL for development purposes, add the following lines to the JAVA_OPTS variable in the startup file:JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false" JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false" JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Once the Tomcat server resource is discovered and imported into the JBoss ON inventory, it may be necessary to update the new resource's connection settings.
- In the JBoss ON interface, click for the newly imported Tomcat server resource.
- Verify the value of the Manager URL property to the RMI URL, to ensure it uses the correct JMX host name and port number as defined in the Tomcat server startup file. An example for this value is shown below:
service:jmx:rmi:///jndi/rmi://$IP_ADDRESS:$PORT/jmxrmi
service:jmx:rmi:///jndi/rmi://$IP_ADDRESS:$PORT/jmxrmiCopy to Clipboard Copied! Toggle word wrap Toggle overflow
7.3.1. Configuring JBoss ON Monitoring for Tomcat Installed from RPMs Copy linkLink copied to clipboard!
Procedure 7.5. Configuring JBoss ON Monitoring for Tomcat Installed from RPMs
- In a shell prompt become the root user.
- Set up JMX JAVA_OPTS properties in the
/usr/sbin/tomcat<VERSION>/startupfile in thestartandstart-securitysections.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - In
/etc/tomcat<VERSION>/tomcat<VERSION>.conf, configure Tomcat to run as the root user.TOMCAT_USER="root"
TOMCAT_USER="root"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the following command to start Tomcat.
service tomcat<VERSION> start
service tomcat<VERSION> startCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Start the JBoss ON agent.
- In the JBoss ON Web UI, import the JBoss ON agent and Tomcat.
- In the JBoss ON Web UI, setup the Tomcat connection configuration (principal and credentials).
- In the JBoss ON Web UI, set the Tomcat Control method configuration to
RPM System V init script.Note
Start and Shutdown script may not be set because the Tomcat plugin always runs theservice tomcat<VERSION> start/stopcommand for theRPM System V init scriptconfiguration setting.
7.3.2. Configuring JBoss ON Monitoring for Tomcat Installed as a Windows Service Copy linkLink copied to clipboard!
Procedure 7.6. Configuring JBoss ON for JBoss Web Server with Tomcat Installed as a Windows Service
- Create the
jmxremote.accessfile withcontrolRole readwritein theC:\jmxdirectory. - Create the
jmxremote.passwordfile withcontrolRole pwdin theC:\jmxdirectory.Note
Set the owner ofjmxremote.accessandjmxremote.passwordto SYSTEM, and restrict the access ofjmxremote.passwordonly to SYSTEM. The SYSTEM user must only have read access. - Enable JMX for the Tomcat Windows service.
JWS_HOME\sbin\tomcat<VERSION>.exe //US//Tomcat<VERSION> ++JvmOptions="-Dcom.sun.management.jmxremote.port=8100;-Dcom.sun.management.jmxremote.access.file="C:\jmx\jmxremote.access";-Dcom.sun.management.jmxremote.password.file="C:\jmx\jmxremote.password";-Dcom.sun.management.jmxremote.ssl=false;-Dcom.sun.management.jmxremote.authenticate=true"
JWS_HOME\sbin\tomcat<VERSION>.exe //US//Tomcat<VERSION> ++JvmOptions="-Dcom.sun.management.jmxremote.port=8100;-Dcom.sun.management.jmxremote.access.file="C:\jmx\jmxremote.access";-Dcom.sun.management.jmxremote.password.file="C:\jmx\jmxremote.password";-Dcom.sun.management.jmxremote.ssl=false;-Dcom.sun.management.jmxremote.authenticate=true"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Start the Tomcat Windows service, and verify that it is running.
- Install and configure the JBoss ON agent. Type
discoveryin the agent prompt to discover the Tomcat Windows service. - In the JBoss ON Web UI, click and then, click and select .
- In the JBoss ON Web UI, go to Platforms and search for the agent name. Click on your agent.
- On the Agent page, Tomcat Servers are listed. Select your Tomcat server by clicking it.
- In the JBoss ON Web UI, click on the tab and then configure the Tomcat Server in Connection Settings.
- Enter the Principal and Credentials information. use the
controlRoleand password set in thejmxremotefiles. - Set the control method to
RPM System V init script.Note
You can not set Start and Shutdown Script fields. - Click .
- Update the connection settings of the Tomcat Server JVM and set Principal and Credentials.
Appendix A. Supported Apache HTTP Server Modules Copy linkLink copied to clipboard!
- Red Hat Enterprise Linux:
JWS_HOME/httpd/modules - Microsoft Windows:
JWS_HOME\lib64\httpd\modules - Solaris:
JWS_HOME/etc/httpd/modules
Appendix B. Revision History Copy linkLink copied to clipboard!
| Revision History | |||||
|---|---|---|---|---|---|
| Revision 3.0.3-22 | Monday 4 July 2016 | ||||
| |||||
| Revision 3.0.1-18 | Tuesday 22 September 2015 | ||||
| |||||
| Revision 3.0.1-17 | Friday 4 September 2015 | ||||
| |||||
| Revision 3.0.0-14 | Tue 28 July 2015 | ||||
| |||||
| Revision 3.0.0-12 | Tue 5 May 2015 | ||||
| |||||