此内容没有您所选择的语言版本。
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
# yum groupinstall jws3
Copy 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 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
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
# yum groupinstall jws3plus
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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
# yum remove mod_ssl24
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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:This module is incompatible with mod_cluster.LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
Copy 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.so
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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
# service tomcat<VERSION> start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - For Red Hat Enterprise Linux 7:
systemctl start tomcat<VERSION>.service
# systemctl start tomcat<VERSION>.service
Copy 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 start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - For Red Hat Enterprise Linux 7:
systemctl start httpd24.service
# systemctl start httpd24.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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
# service tomcat<VERSION> stop
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - For Red Hat Enterprise Linux 7:
systemctl stop tomcat<VERSION>.service
# systemctl stop tomcat<VERSION>.service
Copy 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 stop
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - For Red Hat Enterprise Linux 7:
systemctl stop httpd24.service
# systemctl stop httpd24.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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
# chkconfig <SERVICE_NAME> on
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - For Red Hat Enterprise Linux 7:
systemctl enable <SERVICE_NAME>.service
# systemctl enable <SERVICE_NAME>.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow