-
Language:
English
-
Language:
English
Red Hat Training
A Red Hat training course is available for Red Hat JBoss Web Server
2.3. RPM Installation
Installing JBoss Web Server from RPM packages installs Tomcat and Apache HTTP Server as services, and installs its resources into absolute paths. The RPM installation option is only available for Red Hat Enterprise Linux 6 and Red Hat Enterprise Linux 7.
RPM installation packages for JBoss Web Server are available from Red Hat Subscription Management.
Note
For users wanting to manage JBoss Web Server installations using Red Hat Satellite: although Red Hat Satellite 6 is recommended for managing JBoss Web Server 3 installations, the following Red Hat Network (RHN) channels are also provided specifically for Satellite 5 users:
- 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
Red Hat Satellite 6 users can use the repositories shown in Section 2.3.1, “Installing JBoss Web Server from RPM Packages”.
Warning
Installing JBoss Web Server from RPM packages shares Java library files with other applications. Library version conflicts occur when using RPM packages to install both JBoss Web Server 3 and JBoss EAP 6 on the same machine. To workaround the issue, you can install either JBoss Web Server 3 or JBoss EAP 6 using the RPM installation method, and the other using the ZIP installation method.
2.3.1. Installing JBoss Web Server from RPM Packages
Prerequisites
- Ensure that the tomcatjss package is removed. See Section 2.1.2, “Red Hat Enterprise Linux Package Prerequisites”
Before downloading and installing the RPM packages, you must register your system with Red Hat Subscription Management and subscribe to the respective Content Delivery Network (CDN) repositories.
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
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
The JBoss Web Server Plus group contains additional packages mainly for the addition of Hibernate and its dependencies.
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
2.3.3. Configuring the JBoss Web Server Installation (RPM Installation)
Before starting an RPM installation of Red Hat JBoss Web Server, there are some optional configurations you can perform. This section includes the following configuration procedures:
Procedure 2.20. Removing SSL Support
JBoss Web Server supports SSL by default, but it can be removed. To remove SSL support, remove the mod_ssl package.
- At a shell prompt, run the following command as the root user:
# yum remove mod_ssl24
Procedure 2.21. Configuring mod_jk
If required, you can configure Apache HTTP Server to use mod_jk as its load balancer.
The steps below list the locations of the mod_jk configuration files. For detailed mod_jk configuration instructions, see the Configure Load Balancing Using Apache HTTP Server and mod_jk section of the HTTP Connectors and Load Balancing Guide.
Note
Sample configuration files are provided for mod_jk, and are located in
/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
The mod_cluster load balancer is optional. Follow this procedure to configure Apache HTTP Server to use mod_cluster as its load balancer.
- 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:LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
This module is incompatible with mod_cluster. - 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
2.3.4. Starting JBoss Web Server
To start Red Hat JBoss Web Server, you must start the following:
- 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 (
7
or8
):- For Red Hat Enterprise Linux 6:
# service tomcat<VERSION> start
- For Red Hat Enterprise Linux 7:
# systemctl start tomcat<VERSION>.service
- 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
- For Red Hat Enterprise Linux 7:
# systemctl start httpd24.service
2.3.5. Stopping JBoss Web Server
To stop Red Hat JBoss Web Server, stop the Tomcat and Apache HTTP Server services.
Procedure 2.25. Stopping Tomcat
- In a shell prompt as the root user, stop the Tomcat service. Replace <VERSION> with the desired Tomcat version (
7
or8
):- For Red Hat Enterprise Linux 6:
# service tomcat<VERSION> stop
- For Red Hat Enterprise Linux 7:
# systemctl stop tomcat<VERSION>.service
- 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
- For Red Hat Enterprise Linux 7:
# systemctl stop httpd24.service
2.3.6. Configuring JBoss Web Server Services to Start at Boot
You can configure JBoss Web Server (the Tomcat and Apache HTTP Server services) to start at boot.
Use the following command to enable the JBoss Web Server services to start at boot, using the name of your desired Tomcat (either
tomcat7
or tomcat8
) and Apache HTTP Server (httpd24
) services.
- For Red Hat Enterprise Linux 6:
# chkconfig <SERVICE_NAME> on
- For Red Hat Enterprise Linux 7:
# systemctl enable <SERVICE_NAME>.service