Installation Guide
Install and Configure Red Hat JBoss Web Server 2.0.1
Edition 2
Abstract
Chapter 1. Introduction Copy linkLink copied to clipboard!
1.1. Components Copy linkLink copied to clipboard!
- Apache Tomcat is a servlet container in accordance with Java Servlet Specification. JBoss Enterprise Web Server contains Apache Tomcat 6 and Apache Tomcat 7.
- 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 mod_cluster is a 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
The delivered Apache HTTP Server by default provides the support for the Secure Socket Layer (SSL) protocol. To remove it, refer to the section on removing SSL for your installation. - Hibernate is an object-relational mapping framework. The delivered Hibernate contains Hibernate Core, Hibernate Annotations, Hibernate EntityManager with JPA 2.0 APIs.
Important
1.2. Supported Operating Systems and Configurations Copy linkLink copied to clipboard!
1.3. Installation and Upgrade Copy linkLink copied to clipboard!
Warning
yum update command.
1.4. Product Documentation Locations Copy linkLink copied to clipboard!
- The JBoss Enterprise Web Server Product Documentation. This documentation is available at the Red Hat Customer Support Portal's JBoss Enterprise Web Server page.
- The
jboss-ews-docs-2.0.1.zipfile contains documentation about the following:- httpd
- mod_auth_kerb
- mod_cluster
- mod_jk
- openssl
- tomcat6
- tomcat7
- tomcat-native
- mod_ssl documentation is also available at the location
doc/httpd/mod/mod_ssl.html.
Part I. Installation Copy linkLink copied to clipboard!
- for Red Hat Enterprise Linux Chapter 2, Installing Enterprise Web Server on Red Hat Enterprise Linux
Chapter 2. Installing Enterprise Web Server on Red Hat Enterprise Linux Copy linkLink copied to clipboard!
- ZIP files.
- RPM files.
2.1. ZIP Installation Files Copy linkLink copied to clipboard!
jboss-ews-application-servers-2.0.1-<platform>-<architecture>.zipwhich contains:- Tomcat 6
- Tomcat 7
- Platform specific utilities
jboss-ews-httpd-2.0.1-<platform>-<architecture>.zip, which contains:- Apache http server.
- All http modules.
2.2. RPM Installation Files Copy linkLink copied to clipboard!
service command and installs its resources into absolute paths. The RPM installation option is only available for Red Hat Enterprise Linux 5 and 6.
Warning
2.3. Prerequisites Copy linkLink copied to clipboard!
- Sufficient disk space for your JBoss Enterprise Web Server installation.
- Sufficient disk space for your applications.
2.3.1. RPM Installation Prerequisites Copy linkLink copied to clipboard!
- A supported version of Java is installed (refer to Procedure 2.2, “Installing Java”).
- An updated version of the
elinkspackage installed.
2.3.2. ZIP Installation Prerequisites Copy linkLink copied to clipboard!
- A supported version of Java is installed (refer to Procedure 2.2, “Installing Java”).
- The following required packages are installed: (refer to Procedure 2.1, “Installing Required Packages”).
- krb5-workstation
- mod_auth_kerb
- elinks (required for the apachectl functionality)
- One of the following packages must be installed as a prerequisite:
apr-develorapr-util-devel.
Procedure 2.1. Installing Required Packages
- Depending on your operating system version, run the respective installation command as the root user:
- On Red Hat Enterprise Linux 6 and 5:
yum install krb5-workstation mod_auth_kerb elinks
# yum install krb5-workstation mod_auth_kerb elinksCopy to Clipboard Copied! Toggle word wrap Toggle overflow
- When prompted, press y to proceed.
- When the installation is complete, run the following command to check that the packages are installed:
rpm -q krb5-workstation mod_auth_kerb elinks
# rpm -q krb5-workstation mod_auth_kerb elinksCopy to Clipboard Copied! Toggle word wrap Toggle overflow If the packages are installed, the command output shows the package names with their version numbers. - Install JBoss Enterprise Web Server either from a ZIP file (Section 2.5, “Installing Enterprise Web Server from a ZIP File”) or from RPMs (Section 2.6, “Installing Enterprise Web Server from RPM Packages”).
2.3.3. Installation Procedures Copy linkLink copied to clipboard!
Procedure 2.2. Installing Java
- Subscribe your system to the appropriate channel:
- Red Hat Enterprise Linux Server Supplementary for Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux Supplementary for Red Hat Enterprise Linux 5
- On the command line, as the root user run the command to install Java 1.6 or 1.7:
- On Red Hat Enterprise Linux 5 and Red Hat Enterprise Linux 6, execute the
yum installcommand to install Java 1.6:yum install java-1.6.0-<VENDOR>-devel
# yum install java-1.6.0-<VENDOR>-develCopy to Clipboard Copied! Toggle word wrap Toggle overflow Execute the following variation of the listed command to install Java 1.7:yum install java-1.7.0-<VENDOR>-devel
# yum install java-1.7.0-<VENDOR>-develCopy to Clipboard Copied! Toggle word wrap Toggle overflow Substitute <VENDOR> withsun,ibm, oropenjdk.
- Run the following commands as the root user (if switching from another user, make sure to run the command
su -) to make sure 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 version in use marked with a plus (+) sign. If the set JDK is not the desired option, switch to the right JDK as instructed on the command line.Important
Any software that makes use of thejavaandjavaccommands is using the JDK set by alternatives. Switching java alternatives may negatively influence running of such software. - Install the required packages (refer to Procedure 2.1, “Installing Required Packages”)
2.4. Download JBoss Operations Network (JON) Plugin Copy linkLink copied to clipboard!
Procedure 2.3. Download Installation Files
- Open http://access.redhat.com in a web browser.
- Click in the menu across the top of the page.
- Click in the list under JBoss Enterprise Middleware.
- Enter your login information.You are taken to the Software Downloads page.
Download the JBoss Operations Network Plugin
If you intend to use the JBoss Operations Network plugin for JBoss Enterprise Web Server, selectJBoss ON for EWSfrom either the Software Downloads drop-down box, or the menu on the left.- Click the
JBoss Operations Network VERSION Base Distributiondownload link. - Click the link to start the Base Distribution download.
- Repeat the steps to download the
EWS Plugin Pack for JBoss ON VERSION
2.5. Installing Enterprise Web Server from a ZIP File Copy linkLink copied to clipboard!
2.5.1. Downloading and Extracting the ZIP File Copy linkLink copied to clipboard!
Procedure 2.4. Downloading the Enterprise Web Server ZIP File
jboss-ews-application-servers-2.0.1-<platform>-<architecture>.zip and jboss-ews-httpd-2.0.1-<platform>-<architecture>.zip) from the Red Hat Customer Portal site:
- Open http://access.redhat.com in your web browser.
- In the upper right corner, click the button.
- Enter your login information and click .
- Hover over the option in the menu bar at the top of the page and under JBoss Enterprise Middleware in the displayed menu, click Downloads.
- In the Product drop-down box column, click .
- On the Software Downloads page, select the product version in the Version drop-down box and in the Releases tab below, click the
JBoss EWSlink with the correct version. - On the Software Details page, click the button next to the File drop-down box for the
jboss-ews-application-servers-2.0.1-<platform>-<architecture>.zipandjboss-ews-httpd-2.0.1-<platform>-<architecture>.zipfiles.Note
Download the appropriate versions for the target platform and architecture. - Confirm the file downloads have successfully completed.
- Follow Procedure 2.5, “Extracting the ZIP File” to extract the JBoss Enterprise Web Server ZIP files.
Procedure 2.5. Extracting the ZIP File
- On the command line, change to the directory with the ZIP files.
- Run the following
unzipcommand, once for each ZIP file:Substitute FILE_NAME with the name of each downloaded file and TARGET_DIRECTORY with the path to the target directory. After the ZIP files are extracted, configure the environment before running JBoss Enterprise Web Server (refer to Section 2.5.2, “Configuring the Environment”).unzip <FILE_NAME> -d <TARGET_DIRECTORY>
unzip <FILE_NAME> -d <TARGET_DIRECTORY>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.5.2. Configuring the Environment Copy linkLink copied to clipboard!
- create apache and tomcat users to allow a secure and simple user management (refer to Procedure 2.8, “Setting the apache User” and Procedure 2.7, “Creating tomcat User”);
- remove the SSL support (refer to Procedure 2.9, “Removing SSL”);
- add log4j logging (refer to Procedure 2.10, “Configuring log4j”);
- enable mod_jk or mod_cluster (refer to Procedure 2.11, “Configuring mod_jk” and Procedure 2.12, “Configuring mod_cluster”).
Procedure 2.6. Setting JAVA_HOME
- In the
bindirectory of your Tomcat (either$EWS_HOME/tomcat6/binor$EWS_HOME/tomcat7/bin), create thesetenv.shfile.For example, run the commandvim tomcat<VERSION>/bin/setenv.sh - Add the JAVA_HOME path definition into the file.For example
export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64
Procedure 2.7. Creating tomcat User
- At the shell prompt, become the root user.
- Run the following command to create the tomcat user group:
groupadd -g 91 -r tomcat
# groupadd -g 91 -r tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Go to /opt/jboss-ews-2.0.
- From /opt/jboss-ews-2.0, run the following command to create the tomcat user in the tomcat 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 tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow - From /opt/jboss-ews-2.0, run the following command to assign the ownership of the tomcat directories to the
tomcatuser and 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 Substitute <VERSION> with the respective tomcat version number (6or7). - From /opt/jboss-ews-2.0, issue the command
ls -land check if the tomcat user is the owner of the Tomcat directory. - Make sure that the
tomcatuser has the execution permission to all parent directories.
Procedure 2.8. Setting the apache User
- Run the following commands as the root user to create the apache user 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 apache user in the apache 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 apacheCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Change to
/opt/jboss-ews-2.0and run the following command to assign the ownership of the apache directories to theapacheuser and allow the user to runhttpd:chown -R apache:apache httpd
# chown -R apache:apache httpdCopy to Clipboard Copied! Toggle word wrap Toggle overflow - From /opt/jboss-ews-2.0, issue the command
ls -land check that theapacheuser has execution permission to the respective Apache install path. Output is similar to the following:drwxrwxr-- 11 apache apache 4096 Feb 14 06:52 httpd
drwxrwxr-- 11 apache apache 4096 Feb 14 06:52 httpdCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 2.9. Removing SSL
- Go to the
/opt/jboss-ews-2.0/httpd/conf.d/directory. - 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. Configuring log4j
log4j logging to Tomcat:
- Go to the
/opt/jboss-ews-2.0/extras/directory. - Copy the
log4j.jarandlog4j.propertiesfiles to thelibdirectory of the Tomcat directory:- If using Tomcat 6, run the following commands:
extras]# cp log4j.properties ../tomcat6/lib/
extras]# cp log4j.properties ../tomcat6/lib/Copy to Clipboard Copied! Toggle word wrap Toggle overflow extras]# cp log4j.jar ../tomcat6/lib/
extras]# cp log4j.jar ../tomcat6/lib/Copy to Clipboard Copied! Toggle word wrap Toggle overflow - If using Tomcat 7, run the following commands:
extras]# cp log4j.properties ../tomcat7/lib/
extras]# cp log4j.properties ../tomcat7/lib/Copy to Clipboard Copied! Toggle word wrap Toggle overflow extras]# cp log4j.jar ../tomcat7/lib/
extras]# cp log4j.jar ../tomcat7/lib/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 2.11. Configuring mod_jk
- available workers (JBoss instances) in the
workers.propertiesfile - the mod_jk configuration file
- In the
/opt/jboss-ews-2.0/httpd/conf/directory, createworkers.properties. - In the
/opt/jboss-ews-2.0/httpd/conf.d/directory, createmod_jk.conf.Note
You can also use the template files from thejboss-ews-docs-2.0.1.zipfile (the file is available at the Red Hat Customer Portal ): after you have downloaded and unzipped the file, copy the sample filesmod_jk.conf.sampleandworkers.properties.samplefrom the /opt/jboss-ews-2.0/doc/mod_jk/ to the locations defined in Step 1 and Step 2. Rename them (drop thesampleextension) and modify their content as needed (to refer to Section 2.5.10, “Additional Resources”).
Procedure 2.12. Configuring mod_cluster
- The mod_cluster configuration can be customized in
/opt/jboss-ews-2.0/httpd/conf.d/mod_cluster.conf.For further information about customizing mod_cluster, refer to the JBoss HTTP Connector section of the HTTP Connectors and Load Balancing Guide.
Procedure 2.13. Running the Post-Installation Script
- At the shell prompt, become the root user.
- Change to the
/opt/jboss-ews-2.0/httpddirectory. - Run the following command:
./.postinstall
# ./.postinstallCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.5.3. Starting and Stopping Tomcat Copy linkLink copied to clipboard!
tomcat6 or tomcat7 services can be started and stopped using the service command as root on a console window (as is typical of a network service):
tomcat6 service:
service tomcat6 start
service tomcat6 start
service tomcat6 stop
service tomcat6 stop
tomcat7 service:
service tomcat7 start
service tomcat7 start
service tomcat7 stop
service tomcat7 stop
su -s /bin/bash tomcat system command to deploy the application under the webapps directory. Alternatively, a developer can be listed in the tomcat user group by the system administrator. The best approach is to use the Web Console (URL above) to deploy the application.
chkconfig command (see the chkconfig man page for further details).
/etc/sysconfig/tomcat6 file for Tomcat version 6 and the /etc/sysconfig/tomcat7 file for Tomcat version 7.
2.5.4. Running Tomcat Copy linkLink copied to clipboard!
Procedure 2.14. Running Tomcat on Red Hat Enterprise Linux
- After extracting the zip file, check to see if a user called
tomcatexists on the system by running the following command:id tomcat
id tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow - If the user does not exist, use the following command to add it:
groupadd -g 91 -r tomcat useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r tomcat
groupadd -g 91 -r tomcat useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow - If the
tomcatuser will be running Tomcat, change the ownership of the tomcat directories.- Use the following command for Tomcat 6:
chown -R tomcat:tomcat tomcat6
chown -R tomcat:tomcat tomcat6Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the following command for Tomcat 7:
chown -R tomcat:tomcat tomcat7
chown -R tomcat:tomcat tomcat7Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Test that the
tomcatuser has execution permission to the tomcat install path. - Set the
JAVA_HOMEvariable. Use one of the following approaches to set this variable.- Provide the value for
JAVA_HOMEexternally by setting the value prior to starting Tomcat.- Set the value for
JAVA_HOMEin thesetenv.shfile. In Tomcat 6, this file is available attomcat6/bin/and in Tomcat 7, this file is available attomcat7/bin/. This value is loaded fromcatalina.shand overrides all other set values forJAVA_HOME.
To start Tomcat, execute the following script as the user tomcat:
sh startup.sh
sh startup.sh
To stop Tomcat, execute the following script as the user tomcat:
sh shutdown.sh
sh shutdown.sh
2.5.5. Starting and Stopping the HTTP Server Copy linkLink copied to clipboard!
service command as root on a console terminal (as is typical of a network service):
service httpd start
service httpd start
service httpd stop
service httpd stop
/etc/sysconfig/httpd file on Red Hat Enterprise Linux 5 and 6.
2.5.6. Running the HTTP Server Copy linkLink copied to clipboard!
httpd directory and run the post install script by executing the following:
./.postinstall
./.postinstall
apache exists on the system by running the following command:
id apache
id apache
/usr/sbin/groupadd -g 91 -r apache 2> /dev/null || :
/usr/sbin/useradd -c "Apache" -u 48 \ -s /sbin/nologin -r -d %{contentdir} apache 2> /dev/null || :
/usr/sbin/groupadd -g 91 -r apache 2> /dev/null || :
/usr/sbin/useradd -c "Apache" -u 48 \ -s /sbin/nologin -r -d %{contentdir} apache 2> /dev/null || :
apache user will be running the httpd service, then the ownership of the HTTP directories will need to be changed to reflect this:
chown -R apache:apache httpd
chown -R apache:apache httpd
apache user has execution permission to the HTTP server install path.
httpd directory and executing:
su -m -c "./sbin/apachectl start"
su -m -c "./sbin/apachectl start"
su -m -c "./sbin/apachectl stop"
su -m -c "./sbin/apachectl stop"
2.5.7. Running Tomcat Native Copy linkLink copied to clipboard!
/etc/sysconfig/tomcat6 for Tomcat 6 and add the LD_LIBRARY_PATH variable so that it points to the library correct library:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/
2.5.8. Running Enterprise Web Server Copy linkLink copied to clipboard!
- Tomcat (6 or 7, refer to Section 2.5.8.1, “Running Tomcat”)
- HTTP server (Section 2.5.8.2, “Running HTTP”)
2.5.8.1. Running Tomcat Copy linkLink copied to clipboard!
Important
- The tomcat user is created (refer to Procedure 2.7, “Creating tomcat User”).
- JAVA_HOME is set correctly (refer to Procedure 2.6, “Setting JAVA_HOME”).
2.5.8.1.1. Running Tomcat as a Program Copy linkLink copied to clipboard!
startup.shscriptRun the following command as the root user with the respective Tomcat version (6or7):The system reads the configuration file and changes to the user and group to the tomcat user account (that is, Tomcat is always run under the tomcat user). By default,sh /opt/jboss-ews-2.0/tomcat<VERSION>/bin/startup.sh
# sh /opt/jboss-ews-2.0/tomcat<VERSION>/bin/startup.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow tomcat-nativeis automatically added to theLD_LIBRARY_PATHand-Djava.library.pathduring Tomcat startup.catalina.shscriptRun the following command with the respective Tomcat version (6or7) :sh /opt/jboss-ews-2.0/tomcat<VERSION>/bin/catalina.sh
# sh /opt/jboss-ews-2.0/tomcat<VERSION>/bin/catalina.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow - custom script, which calls
catalina.sh
2.5.8.1.2. Running Tomcat as a Service Copy linkLink copied to clipboard!
2.5.8.2. Running HTTP Copy linkLink copied to clipboard!
/opt/jboss-ews-2.0/httpd/sbin/ and run the following command as the root user:
./apachectl start
# ./apachectl start
2.5.9. Stopping Enterprise Web Server Copy linkLink copied to clipboard!
2.5.9.1. Stopping Tomcat Copy linkLink copied to clipboard!
sh /opt/jboss-ews-2.0/tomcat<VERSION>/bin/shutdown.sh
# sh /opt/jboss-ews-2.0/tomcat<VERSION>/bin/shutdown.sh
2.5.9.2. Stopping HTTP Copy linkLink copied to clipboard!
/opt/jboss-ews-2.0/httpd/sbin/ and run the following command as the root user:
apachectl stop
# apachectl stop
2.5.10. Additional Resources Copy linkLink copied to clipboard!
jboss-ews-docs-2.0.1.zip and jboss-ews-2.0.1-<platform>.src.zip files available at the Red Hat Customer Portal and extract them to /opt/jboss-ews-2.0.1. On extraction, doc and src directories are created, which contain the documentation and examples, and source code.
2.6. Installing Enterprise Web Server from RPM Packages Copy linkLink copied to clipboard!
2.6.1. RPM Installation Methods Copy linkLink copied to clipboard!
- Using the
groupinstallcommand. This option installs all the packages required by JBoss Enterprise Web Server or JBoss Enterprise Web Server Plus. This option is recommended for new users. - Installing packages individually using the
yumcommand. This option allows the user to select which packages to install and allows the user to exclude packages that are not required for their specific installation. This option is not recommended for new users.
2.6.2. RPM Packages Copy linkLink copied to clipboard!
RPM Packages for Red Hat Enterprise Linux 5 and 6
- Tomcat 7:
- tomcat7tomcat7-webappstomcat7-admin-webapps
- Tomcat 6:
- tomcat6tomcat6-webappstomcat6-admin-webapps
- Tomcat Native:
- tomcat-native
- HTTP Server:
- httpd
- mod_jk:
- mod_jk
- mod_cluster:
- mod_clustermod_cluster-nativemod_cluster-tomcat6mod_cluster-tomcat7
- mod_rt:
- mod_rt
- mod_snmp:
- mod_snmp
- mod_auth_kerb:
- mod_auth_kerb
2.6.3. RHN Channels for JBoss Enterprise Web Server Installation Packages Copy linkLink copied to clipboard!
- on Red Hat Enterprise Linux 6:
- jb-ews-2-i386-server-6-rpm
- jb-ews-2-x86_64-server-6-rpm
- on Red Hat Enterprise Linux 5:
- jb-ews-2-i386-server-5-rpm
- jb-ews-2-x86_64-server-5-rpm
2.6.4. Installing Enterprise Web Server from RPM Files Copy linkLink copied to clipboard!
Procedure 2.15. Subscribing to Red Hat Network Enterprise Channels
- Go to Red Hat Network Enterprise.
- Unsubscribe your system from the
Red Hat Application Stackchannel. - Subscribe to the JBoss Enterprise Web Server channels (refer to Section 2.6.3, “RHN Channels for JBoss Enterprise Web Server Installation Packages”).
Procedure 2.16. Installing Enterprise Web Server from RPM Packages
- At the shell prompt, become the root user.
- To install JBoss Enterprise Web Server as a group of packages, run the installation command:
yum groupinstall jboss-ews2
# yum groupinstall jboss-ews2Copy to Clipboard Copied! Toggle word wrap Toggle overflow - To install all packages in the group individually, on Red Hat Enterprise Linux 6 and Red Hat Enterprise Linux 5:
yum install <LIST_OF_PACKAGES>
# yum install <LIST_OF_PACKAGES>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Substitute the <LIST_OF_PACKAGES> with names of the packages separated with spaces.To install all JBoss Enterprise Web Server packages, run this command:yum install httpd mod_auth_kerb mod_cluster mod_cluster-native mod_jk-ap22 mod_rt mod_snmp mod_cluster-tomcat6 mod_cluster-tomcat7 tomcat6 tomcat6-admin-webapps tomcat6-webapps tomcat7 tomcat7-admin-webapps tomcat7-webapps tomcat-native
# yum install httpd mod_auth_kerb mod_cluster mod_cluster-native mod_jk-ap22 mod_rt mod_snmp mod_cluster-tomcat6 mod_cluster-tomcat7 tomcat6 tomcat6-admin-webapps tomcat6-webapps tomcat7 tomcat7-admin-webapps tomcat7-webapps tomcat-nativeCopy to Clipboard Copied! Toggle word wrap Toggle overflow
- Verify the system is using the correct javac and java (for details refer to Procedure 2.2, “Installing Java”).
Run the following command to install the listed optional packages with the JBoss Enterprise Web Server packages:
yum install httpd-manual mod_jk-manual mod_ssl tomcat6-docs-webapp tomcat7-docs-webapp tomcat6-log4j tomcat7-log4j mod_jk-ap22 mod_cluster-demo hibernate3-commons-annotations-javadoc hibernate-jpa-2.0-api-javadoc tomcat6-javadoc tomcat7-javadoc apache-commons-daemon-jsvc-eap6 hibernate4-javadoc
# yum install httpd-manual mod_jk-manual mod_ssl tomcat6-docs-webapp tomcat7-docs-webapp tomcat6-log4j tomcat7-log4j mod_jk-ap22 mod_cluster-demo hibernate3-commons-annotations-javadoc hibernate-jpa-2.0-api-javadoc tomcat6-javadoc tomcat7-javadoc apache-commons-daemon-jsvc-eap6 hibernate4-javadoc
2.6.5. Install the JBoss Enterprise Web Server Plus Group Copy linkLink copied to clipboard!
Procedure 2.17. Installing the JBoss Enterprise Web Server Plus Group of Packages
- At the shell prompt, become the root user.
- To install JBoss Enterprise Web Server Plus group of packages, run the installation command:
yum groupinstall jboss-ews2plus
# yum groupinstall jboss-ews2plusCopy to Clipboard Copied! Toggle word wrap Toggle overflow - To install all packages in the group individually, on Red Hat Enterprise Linux 6 and Red Hat Enterprise Linux 5:
yum install <LIST_OF_PACKAGES>
# yum install <LIST_OF_PACKAGES>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Substitute the <LIST_OF_PACKAGES> with names of the packages separated with spaces.To install all JBoss Enterprise Web Server Plus packages, run this command:yum install hibernate-jpa-2.0-api hibernate3-commons-annotations hibernate4 hibernate4-core hibernate4-envers hibernate4-entitymanager hibernate4-c3p0
# yum install hibernate-jpa-2.0-api hibernate3-commons-annotations hibernate4 hibernate4-core hibernate4-envers hibernate4-entitymanager hibernate4-c3p0Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.6.6. Configuring the Environment Copy linkLink copied to clipboard!
- remove SSL (refer to Procedure 2.18, “Removing SSL”);
- add log4j logging (refer to Procedure 2.19, “Removing log4j From Tomcat 6”);
- enable mod_jk or mod_cluster (refer to Procedure 2.20, “Configuring mod_jk” and Procedure 2.21, “Configuring mod_cluster”)
Procedure 2.18. Removing SSL
- At the shell prompt, become the root user.
- Run the respective uninstall command:
- on Red Hat Enterprise Linux 6 and Red Hat Enterprise Linux 5:
yum remove mod_ssl
# yum remove mod_sslCopy to Clipboard Copied! Toggle word wrap Toggle overflow
For tomcat6, the log4j support is provided by the tomcat6-log4j package and is enabled on package installation (refer to Procedure 2.16, “Installing Enterprise Web Server from RPM Packages”).
Procedure 2.19. Removing log4j From Tomcat 6
- At the shell prompt, become the root user.
- Run the respective uninstall command:
- on Red Hat Enterprise Linux 6 and Red Hat Enterprise Linux 5:
yum remove tomcat6-log4j
# yum remove tomcat6-log4jCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 2.20. Configuring mod_jk
- Install the template
mod_jkconfiguration file:cp /usr/share/doc/mod_jk-ap22-*/mod_jk.conf.sample /etc/httpd/conf.d/mod_jk.conf
# cp /usr/share/doc/mod_jk-ap22-*/mod_jk.conf.sample /etc/httpd/conf.d/mod_jk.confCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Install the template
workers.propertiesfile:cp /usr/share/doc/mod_jk-ap22-*/workers.properties.sample /etc/httpd/conf/workers.properties
# cp /usr/share/doc/mod_jk-ap22-*/workers.properties.sample /etc/httpd/conf/workers.propertiesCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Add worker mappings to
workers.properties. For example:# Mount the Servlet context to the ajp20 worker /jmx-console=loadbalancer /jmx-console/*=loadbalancer /web-console=loadbalancer /web-console/*=loadbalancer
# Mount the Servlet context to the ajp20 worker /jmx-console=loadbalancer /jmx-console/*=loadbalancer /web-console=loadbalancer /web-console/*=loadbalancerCopy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The default configuration is adequate for low-traffic web sites. For optimization information for moderate and high-load web sites, refer to http://kbase.redhat.com/faq/docs/DOC-15836.
Procedure 2.21. Configuring mod_cluster
- In the
/etc/httpd/conf/httpd.conffile, add the hash (#) sign at the beginning of the following line to disable mod_proxy_balancer.so:This module is incompatible with the JBoss HTTP Connector.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 JBoss HTTP Connector modules:
- Create the file
/etc/httpd/conf.d/JBoss_HTTP.conf. - Add the following lines to the
JBoss_HTTP.conffile:LoadModule slotmem_module modules/httpd/modules/mod_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 slotmem_module modules/httpd/modules/mod_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.6.7. Setting the Service Boot Behavior Copy linkLink copied to clipboard!
- From the command line, issue the following command with the <SERVICE_NAME> replaced with the respective service name (
tomcat6ortomcat7, andhttpdorhttpd22)For details refer to the chkconfig man page.chkconfig <SERVICE_NAME> on
chkconfig <SERVICE_NAME> onCopy to Clipboard Copied! Toggle word wrap Toggle overflow - To use the Service Configuration tool, issue the command
system-config-servicesand change the service setting in the displayed window.
2.6.8. Running Enterprise Web Server Copy linkLink copied to clipboard!
- Tomcat (6 or 7, refer to Procedure 2.22, “Running Tomcat”)
- HTTP server (Procedure 2.23, “Running HTTP”)
Procedure 2.22. Running Tomcat
Important
tomcat:
- At the shell prompt, become the root user.
- Run the following
startcommand with the <VERSION> substituted with the correct Tomcat version (6or7):service tomcat<VERSION> start
# service tomcat<VERSION> startCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Go to http://localhost:8080 in your web browser to verify that Tomcat is running. The Apache Software Foundation page appears.
Note
In JBoss Enterprise Web Server installations from the RPM packages, the only supported way of running Tomcat is the running described in this section.
Procedure 2.23. Running HTTP
httpd:
- At the shell prompt, become the root user.
- Run the following
startcommand:- On Red Hat Enterprise Linux 6 or Red Hat Enterprise Linux 5:
service httpd start
# service httpd startCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.6.9. Stopping Enterprise Web Server Copy linkLink copied to clipboard!
Procedure 2.24. Stopping Tomcat
tomcat:
- At the shell prompt, become the root user.
- Run the following service command with the <VERSION> substituted with the correct Tomcat version (
6or7):service tomcat<VERSION> stop
# service tomcat<VERSION> stopCopy 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.25. Stopping HTTP
httpd:
- At the shell prompt, become the root user.
- Run the following
stopcommand:- On Red Hat Enterprise Linux 6 or Red Hat Enterprise Linux 5:
service httpd stop
# service httpd stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.6.10. Additional Documentation Copy linkLink copied to clipboard!
yum install in Red Hat Enterprise Linux 5 and Red Hat Enterprise Linux 6 followed by the list of required documentation packages.
- The following documentation packages are available for Red Hat Enterprise Linux 6 and Red Hat Enterprise Linux 5:
- mod_jk-manual
- httpd-manual
- tomcat6-docs-webapp
- tomcat7-docs-webapp
2.7. SELinux Policies 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. |
| mod_snmp | The installed mod_snmp policy allows httpd processes to bind to snmp_port_t ports. This allows httpd to use port 161 and 162 (used with both UDP and TCP). | A post installation script configures the context mapping for /var/cache/mod_snmp 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 ths 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.7.1. Default SELinux Policies for a ZIP Installation Copy linkLink copied to clipboard!
httpd and Tomcat processes run in httpd_t or unconfined_java_t domains. These domains do not confine the processes, therefore the administrator must take the following security precautions:
- Run
httpdusing theapachectlscript. This ensures that the userapacheowns the processed instead of the userroot. - Confine file access for users
tomcatandapacheto files and directories that are not necessary to the JBoss Enterprise Web Server runtime. - Do not run Tomcat as the user
root.
Chapter 3. Installing Enterprise Web Server on Windows Copy linkLink copied to clipboard!
Important
3.1. Prerequisites Copy linkLink copied to clipboard!
- Sufficient disk space for your JBoss Enterprise Web Server installation.
- Sufficent disk space for your applications.
Procedure 3.1. Installing Java
- Download JDK 1.6 or 1.7 for your operating system and architecture from the web site. (Download JDK)
- Double-click the downloaded file to start the Java installation.
- Proceed as instructed in the displayed installation window.
3.2. Downloading and Extracting Installation File Copy linkLink copied to clipboard!
jboss-ews-application-servers-2.0.1-<platform>.<architecture>.zip file contains Tomcat 6 and 7, as well as other platform utilities. The jboss-ews-httpd-2.0.1-<platform>.<architecture>.zip file contains the Apache http server and other http modules.
Procedure 3.2. Downloading the Enterprise Web Service ZIP File
- Open http://access.redhat.com in your web browser.
- In the right upper corner, click the button.
- Enter your login information and click .
- Hover over the option in the menu bar at the top of the page and click Downloads under JBoss Enterprise Middleware in the displayed menu.
- In the Product drop-down menu, click .
- On the Releases tab, click the
JBoss EWSlink for Windows with the correct architecture and version. - On the Software Details page, click the button next to the File drop-down box.
Note
Make sure the file is intended for your operating system and architecture. - Confirm the file download.
Procedure 3.3. Extracting the ZIP File
- Right-click the file and select
Extract All.... - Click .
- When prompted for the extract location, click and navigate to
C:\Program Files. - Click .
Note
Files are extracted inC:\Program Files\jboss-ews-2.0. If you wish to change the httpd configuration (for example, add mod_cluster), edit thehttpd.conffile in theC:\Program Files\jboss-ews-2.0\etc\httpd\folder.
3.3. Configuring the Environment 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.
- Enter the required
JAVA_HOME,TMPandTEMPname-value pairs. - You will also need to add
C:\Program Files\jboss-ews-2.0\binto the PATH environment variable of the user the service runs under. This is SYSTEM by default. Without this, the SSL Connector will fail to work.
Procedure 3.5. Running the Post-Installation Script
- Run the Command Prompt as administrator even if you are logged in as the administrator:
- Click the button.
- Go to → .
- Right-click the Command Prompt and select
Run as administrator.
- In the Command Prompt, type the following to change to the
etcfolder of your Enterprise Web Server installation:cd /D "C:\Program Files\jboss-ews-2.0\etc"
C:\> cd /D "C:\Program Files\jboss-ews-2.0\etc"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Issue the command
call postinstall.httpd.batand then the commandcall postinstall.tomcat.batto run the post-installation script.The script creates the required symbolic links (Junction Points) for temporary logging and configuration directories.
Procedure 3.6. Installing Tomcat
- Run the Command Prompt as administrator:
- Click the button.
- Go to → .
- Right-click the Command Prompt and select
Run as administrator.Note
On 64-bit Windows, you need to use the 64-bit version of the Command Prompt (cmd.exe). Running thecmdcommand from a 32-bit application launches a 32-bit Command Prompt instance. This causes the service setup script to fail with a File Not Found warning. - Change to the
binfolder in the JBoss Enterprise Web Server installation folder.For Tomcat 6
For Tomcat 6, the command is:cd /D "C:\Program Files\jboss-ews-2.0\share\tomcat6\bin"
C:\> cd /D "C:\Program Files\jboss-ews-2.0\share\tomcat6\bin"Copy to Clipboard Copied! Toggle word wrap Toggle overflow For Tomcat 7
For Tomcat 7, the command is:cd /D "C:\Program Files\jboss-ews-2.0\share\tomcat7\bin"
C:\> cd /D "C:\Program Files\jboss-ews-2.0\share\tomcat7\bin"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- In the Command Prompt, run the following command :
call service.bat install
call service.bat installCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 3.7. Installing HTTP
- Run the Command Prompt as administrator:
- Click the button.
- Go to → .
- Right-click the Command Prompt and select
Run as administrator.
- Change to the
binfolder of your new installation:cd /D "C:\Program Files\jboss-ews-2.0\bin"
C:\> cd /D "C:\Program Files\jboss-ews-2.0\bin"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - In the Command Prompt, run the
installcommand:A Firewall security dialog prompt demanding networking access for the Apache HTTP Server service appears. Click if you wish to access this service from the network.httpd -k install
httpd -k installCopy to Clipboard Copied! Toggle word wrap Toggle overflow Note
By default, Apache HTTP Server is configured to listen on port 80. If you have Microsoft IIS installed, ensure the following:World Wide Web...service is stopped and the Startup Type is set toManualWorld Wide Web...service is configured to listen on a different port
Alternatively, you can edit thehttpd.conffile before installing the service and change theListendirective to a port that does not collide with the Internet Information Service listening ports.
Procedure 3.8. Configuring log4j
log4j logging in Tomcat:
- Change to
C:\Program Files\jboss-ews-2.0\share\extras\ - Copy the respective log4j files to the Tomcat folder:
- If using Tomcat 6, run the following commands:
copy log4j.jar log4j.properties ..\tomcat6\lib
copy log4j.jar log4j.properties ..\tomcat6\libCopy to Clipboard Copied! Toggle word wrap Toggle overflow - If using Tomcat 7, run the following commands:
copy log4j.jar log4j.properties ..\tomcat7\lib
copy log4j.jar log4j.properties ..\tomcat7\libCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 3.9. Removing SSL
- Go to
C:\Program Files\jboss-ews-2.0\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
- available workers (JBoss instances) in the
workers.propertiesfile - the mod_jk configuration file
mod_jk.conf
- In
C:\Program Files\jboss-ews-2.0\etc\httpd\conf\create workers.properties (refer to http://tomcat.apache.org/connectors-doc/reference/apache.html). - In
C:\Program Files\jboss-ews-2.0\etc\httpd\conf.d\create mod_jk.conf (refer to http://tomcat.apache.org/connectors-doc/reference/apache.html)Note
You can also use the sample filesmod_jk.conf.sampleandworkers.properties.sampleavailable inC:\Program Files\jboss-ews-2.0\etc\httpd\conf: modify their content as needed and rename them tomod_jk.confandworkers.properties.
Procedure 3.11. Configuring mod_cluster
- In the
C:\Program Files\jboss-ews-2.0\etc\httpd\conf\httpd.conffile, add the hash (#) sign at the beginning of the following line to disable mod_proxy_balancer.so:This module is incompatible with the JBoss HTTP Connector.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 JBoss HTTP Connector modules:
- Create the file
C:\Program Files\jboss-ews-2.0\etc\httpd\conf.d\mod_cluster-native.conf. - Add the following lines to the
mod_cluster-native.conffile:LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule slotmem_module modules/mod_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 slotmem_module modules/mod_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. Setting Security
C:\Program Files\jboss-ews-2.0 folder and all of its subfolders:
- Right-click the
C:\Program Files\jboss-ews-2.0folder and clickProperties. - Select the
Securitytab. - Click the button.
- Click the button.
- In the text box, enter
LOCAL SERVICE. - Select the
Full Controlcheck box for the newLOCAL 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 .
- Click again.
- Click a third time to apply the settings.
3.4. Running Enterprise Web Server Copy linkLink copied to clipboard!
Procedure 3.13. Running Enterprise Web Server from the Command Prompt
- Run the Command Prompt as administrator:
- Click the button.
- Go to → .
- Right-click the Command Prompt and select
Run as administrator.
- On the Command Prompt, issue the following command to run the tomcat service:
net start tomcat<VERSION>
net start tomcat<VERSION>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - On the Command Prompt, run the following command to run the httpd service:Right click to select the name of the desired service in the Services Menu. Options include Apache 2.2, Apache Tomcat 6 and Apache Tomcat 7.
net start Apache2.2
net start Apache2.2Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 3.14. Running Enterprise Web Server from the Computer Management Tool
- Run the Command Prompt as administrator:
- Click the button.
- Go to → .
- Right-click the Command Prompt and select
Run as administrator.
- Go to → →
- In the Services dialog, right-click the name of the service (
httpdortomcat) and click or .
Note
catalina.bat run.
C:\windows\System32\ directory and PATH directories, and check for DLLs library conflicting with those shipped with Enterprise Web Server. In particular, look for libeay32.dil, ssleay32.dll, and libssl32.dll.
3.5. Stopping Enterprise Web Server Copy linkLink copied to clipboard!
Procedure 3.15. Stopping Enterprise Web Server from the Command Prompt
- Run the Command Prompt as administrator:
- Click the button.
- Go to → .
- Right-click the Command Prompt and select
Run as administrator.
- On the Command Prompt, issue the following command to run the tomcat service:
net stop tomcat<VERSION>
net stop tomcat<VERSION>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - On the Command Prompt, run the following command to run the httpd service:Right click to select the name of the desired service in the Services Menu. Options include Apache 2.2, Apache Tomcat 6 and Apache Tomcat 7.
net stop Apache2.2
net stop Apache2.2Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 3.16. Stopping Enterprise Web Server from the Computer Management Tool
- Run the Command Prompt as administrator:
- Click the button.
- Go to → .
- Right-click the Command Prompt and select
Run as administrator.
- Go to → →
- In the Services dialog, right-click the name of the service (
httpdortomcat) and click .
3.6. Directory Structure Copy linkLink copied to clipboard!
postinstall.tomcat.bat postinstall.http.bat) run after a successful installation:
- The
etcfolder contains configuration files for Apache HTTP Server and the post-installation script. - The
sharefolder contains Apache Tomcat 6 and 7 installations and shared Java JARs.
Chapter 4. Installing Enterprise Web Server on Solaris Copy linkLink copied to clipboard!
4.1. Prerequisites Copy linkLink copied to clipboard!
- Sufficient disk space for your JBoss Enterprise Web Server installation.
- Sufficent disk space for your applications.
Procedure 4.1. Installing Java
- Download JDK 1.6 or 1.7 and the corresponding architecture from the web site (Download JDK).
- Go to the download location.
- Run the Java installation file.
- Go to
usr. - Issue 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 JDK 1.6.0:
ln -sf /usr/jdk/<JDK>
ln -sf /usr/jdk/<JDK>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.2. Downloading Installation Files Copy linkLink copied to clipboard!
jboss-ews-application-servers-2.0.1-<platform>.<architecture>.zip file contains Tomcat 6 and 7, as well as other platform utilities. The jboss-ews-httpd-2.0.1-<platform>.<architecture>.zip file contains the Apache http server and other http modules.
Procedure 4.2. Downloading ZIP Files for Solaris
- Open https://access.redhat.com in your web browser.
- In the right upper corner, click the button.
- Enter your login information and click .
- Hover over the option in the menu bar at the top of the page and click Downloads under JBoss Enterprise Middleware in the displayed menu.
- In the Product drop-down box column of the displayed page, select wait for the page to refresh.
- On the Releases tab, click the JBoss EWS link for your operating system and architecture.
- On the Software Details page, click the button next to the File drop-down box.
Note
Make sure the file is intended for your operating system and architecture. - Confirm the file download.
4.3. Extracting and Installing Enterprise Web Server Copy linkLink copied to clipboard!
Procedure 4.3. Extracting and Installing EWS from a ZIP File
- At the shell prompt, become the root user.
- Change to the directory with the ZIP file.
- Run the following command to extract the package to
opt:Substitute the <FILE_NAME> with the name of the downloaded ZIP file.unzip <FILE_NAME> -d /opt
# unzip <FILE_NAME> -d /optCopy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The system uses theoptdirectory as a default directory for installing JBoss Enterprise Web Server on Solaris. Make sure theoptdirectory is present during installation. - Issue the following commands to run the post-installation scripts:The post-installation process creates the tomcat and apache users and groups, and directories:
cd /opt/jboss-ews-2.0/etc sh .postinstall.httpd sh .postinstall.tomcat
cd /opt/jboss-ews-2.0/etc sh .postinstall.httpd sh .postinstall.tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow - The users and groups
apachewith an ID of 48 andtomcatwith an ID of 91. Theapacherunshttpd, while thetomcatuser runstomcat. - Additional directories the
tomcatgroup has write permissions to:/var/logs/tomcat7/var/logs/tomcat6
4.4. Configuring the Environment Copy linkLink copied to clipboard!
- remove SSL (refer to Procedure 4.5, “Removing SSL”);
- add log4j logging (refer to Procedure 4.6, “Configuring log4j”);
- enable mod_jk or mod_cluster (refer to Procedure 4.7, “Configuring mod_jk” and Procedure 4.8, “Configuring mod_cluster”).
Procedure 4.4. Configuring Tomcat
JAVA_HOME variable to point to a supported JDK (1.6.0):
- Locate the
tomcatconfiguration file:- For Tomcat 7:
/opt/jboss-ews-2.0/etc/sysconfig/tomcat7 - For Tomcat 6:
/opt/jboss-ews-2.0/etc/sysconfig/tomcat6
- Open the configuration file and delete 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.5. Removing SSL
- Go to
/opt/jboss-ews-2.0/etc/httpd/conf.d - Rename the SSL configuration file:
- To remove SSL, rename
ssl.conftossl.conf.disabled. - To re-enable the SSL, rename
ssl.conf.disabledtossl.conf.
Procedure 4.6. Configuring log4j
log4j logging to Tomcat:
- Go to the
/opt/jboss-ews-2.0/share/extrasdirectory. - Copy the
log4j.jarandlog4j.propertiesfiles to thelibdirectory of the Tomcat directory:- If using Tomcat 6, run the following commands:
extras]# cp log4j.properties ../tomcat6/lib/
extras]# cp log4j.properties ../tomcat6/lib/Copy to Clipboard Copied! Toggle word wrap Toggle overflow extras]# cp log4j.jar ../tomcat6/lib/
extras]# cp log4j.jar ../tomcat6/lib/Copy to Clipboard Copied! Toggle word wrap Toggle overflow - If using Tomcat 7, run the following commands:
extras]# cp log4j.properties ../tomcat7/lib/
extras]# cp log4j.properties ../tomcat7/lib/Copy to Clipboard Copied! Toggle word wrap Toggle overflow extras]# cp log4j.jar ../tomcat7/lib/
extras]# cp log4j.jar ../tomcat7/lib/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 4.7. Configuring mod_jk
- available workers (JBoss instances) in the
workers.propertiesfile - the mod_jk configuration file mod_jk.conf
- Create a workers.properties file in
/opt/jboss-ews-2.0/etc/httpd/conf(refer to http://tomcat.apache.org/connectors-doc/reference/workers.html). - Create a mod_jk.conf in
/opt/jboss-ews-2.0/etc/httpd/conf.d/, (refer to http://tomcat.apache.org/connectors-doc/reference/apache.html).Note
You can also copy and modify the sample filesmod_jk.conf.sampleandworkers.properties.sampleavailable in /opt/jboss-ews-2.0/etc/httpd/conf/: modify their content as needed and rename them tomod_jk.confandworkers.properties.
Procedure 4.8. Configuring mod_cluster
- Mod_cluster is part of the JBoss Enterprise Web Server 2.0 installation.
- In
/opt/jboss-ews-2.0/httpd/conf/httpd.confadd a hash (#) sign at the beginning of the following line to disable the mod_proxy_balancer module:This module is incompatible with the JBoss HTTP Connector.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 JBoss HTTP Connector modules:
- Create the file
/opt/jboss-ews-2.0/httpd/conf.d/mod_cluster-native.conf. - Add the following lines to the file
/opt/jboss-ews-2.0/httpd/conf.d/mod_cluster-native.conf:LoadModule slotmem_module modules/mod_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 slotmem_module modules/mod_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
4.5. Running Enterprise Web Server Copy linkLink copied to clipboard!
4.5.1. Running Tomcat Copy linkLink copied to clipboard!
Important
4.5.1.1. Running Tomcat as a Program Copy linkLink copied to clipboard!
tomcat[6,7] script in the sbin directory or the catalina script in the lib directory:
- To start Tomcat with the tomcat script, run the following command as the root user with the respective Tomcat version (
6or7):The system reads the configuration file and changes to the user and group of the tomcat user account (that is, Tomcat is always run under the tomcat user). By default,/opt/jboss-ews-2.0/sbin/tomcat<VERSION> start
/opt/jboss-ews-2.0/sbin/tomcat<VERSION> startCopy to Clipboard Copied! Toggle word wrap Toggle overflow tomcat-nativeis automatically added to theLD_LIBRARY_PATHand-Djava.library.pathduring Tomcat startup. - To start Tomcat with the
catalina.shscript, run the following command with the respective Tomcat version (6or7) :The/opt/jboss-ews-2.0/share/tomcat<VERSION>/bin/catalina.sh
/opt/jboss-ews-2.0/share/tomcat<VERSION>/bin/catalina.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow catalina.shscript detects the running JVM version and adds the/opt/jboss-ews-2.0/lib/path (/opt/jboss-ews-2.0/lib64for 64 bit JVM) to the library path.
4.5.1.2. Running Tomcat as a Service Copy linkLink copied to clipboard!
jsvc:
- In Tomcat 6, use the script located in the
init.dfile or create and use a customized system daemon script withjsvc. - In Tomcat 7, use the script
daemon.shlocated in/opt/jboss-ews-2.0/share/apache-tomcat-7.x/bin/.
scm as follows:
Procedure 4.9. Use SCM to Run Tomcat as a Service
- At the shell prompt, become the
rootuser. - Create a new file named
tomcat.xmlat the location/var/svc/manifest/application/web/. - Copy and paste the following contents into the newly created
tomcat.xmlfile.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the following command to import the new file:
/usr/sbin/svccfg import /var/svc/manifest/application/web/tomcat.xml
# /usr/sbin/svccfg import /var/svc/manifest/application/web/tomcat.xmlCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the following command to start tomcat:
/usr/sbin/svcadm enable tomcat6
# /usr/sbin/svcadm enable tomcat6Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.5.2. Running HTTP Server Copy linkLink copied to clipboard!
apachectl script, which is located inside the /opt/jboss-ews-2.0/sbin directory. The apachectl script uses the configuration file /opt/jboss-ews-2.0/etc/sysconfig/httpd. In this file you can edit and select startup parameters, such as the running of mpm.
httpd configuration files are located inside the /opt/jboss-ews-2.0/etc/httpd directory. By default all supported modules are loaded and enabled (refer to Appendix A, Supported HTTP Modules). To disable some of the modules, comment out the respective modules in the httpd.conf file (for module description refer to http://httpd.apache.org/docs/2.2/mod/).
Procedure 4.10. Running HTTP Server
- Run the command line as the root user.
- Run the following command to start the HTTP Server:
sbin/apachectl start
sbin/apachectl startCopy to Clipboard Copied! Toggle word wrap Toggle overflow If you want your server to continue running automatically after a system reboot, add a call to theapachectlscript to your system startup files.Note
For complete documentation on how to start and stop the HTTP Server, refer to the files,http://localhost/manual/invoking.htmlandhttp://localhost/manual/stopping.htmlrespectively.
4.6. Stopping Enterprise Web Server Copy linkLink copied to clipboard!
Procedure 4.11. Stopping Tomcat Running a Service
- At the shell prompt, become the root user.
- Execute the following command with the respective Tomcat version (
6or7) to stop Tomcat started from with the Tomcat script in thebindirectory:sbin/tomcat<VERSION> stop
sbin/tomcat<VERSION> stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 4.12. Stopping Tomcat Running a Program
- At the shell prompt, change to
/opt/jboss-ews-2.0/share/tomcat<VERSION>/bin. - Execute the following command with the respective Tomcat version (
6or7) to stop Tomcat started from with the Tomcat script in thebindirectory:sh shutdown.sh
sh shutdown.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 4.13. Stopping HTTP Server
- Run the command line as the root user.
- Run the following command to stop the HTTP Server:
sbin/apachectl stop
sbin/apachectl stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.7. Solaris Directory Structure Copy linkLink copied to clipboard!
- Native Solaris packages require the absolute location
- Solaris (and other non-Red Hat Enterprise Linux platforms) must ship and build all the dependent components such as
openldap,openssl,db4andcyrus-sasl.
Chapter 5. Hibernate on Enterprise Web Server Copy linkLink copied to clipboard!
context.xml). However, persistence.xml and web.xml are required. The example below shows a setting with tomcat connection pooling mechanism.
/META-INF/context.xmldefines the connection pools Tomcat should create.Example 5.1. context.xml
Copy 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 Hibernate API directly, use a similar configuration inhibernate.cfg.xml.Example 5.2. persistence.xml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow /WEB-INF/web.xmlis a regular web application deployment file, which tells Tomcat which datasource it consumes. In Example 5.3, “web.xml” the datasource isjdbc/DsWebAppDB.Example 5.3. web.xml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 6. Monitoring Enterprise Web Server with JBoss Operations Network Copy linkLink copied to clipboard!
Procedure 6.1. Configuring User Permissions on a Unix Operating System
Note
httpd and Tomcat directories.
- At the shell prompt, become the root user.
- Run the following command to add the user, under which JON Agent runs to the tomcat and apache user groups:
usermod -aG tomcat,apache <RHQ_AGENT_USER>
# usermod -aG tomcat,apache <RHQ_AGENT_USER>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 6.2. Configuring Monitoring
- Open the
startupfile of the respective JBoss Enterprise Web Server instance for editing:- on Red Hat Enterprise Linux installed from a ZIP file open
/opt/jboss-ews-2.0/tomcat<VERSION>/bin/startup.sh - on Red Hat Enterprise Linux installed from a RPM files open
/usr/sbin/tomcat<VERSION> - on Solaris open
/opt/jboss-ews-2.0/tomcat<VERSION>/bin/startup.sh - on Windows open
$TOMCAT_HOME\bin\catalina.bat. Adjust the value of $TOMCAT_HOME based on the version of Tomcat being set up.
- Define an available port for JMX monitoring. Make sure it is not blocked by any firewall. To do so, to the JAVA_OPTS variable in the startup file, add the following line and substitute PORT_NUMBER with the number of the port dedicated to monitoring:
- 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 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
- Direct the JBoss Operations Network agent to locate the JMX port defined.
- Click in the JBoss Operations Network interface.
- Set the value of the Manager URL property to the RMI URL at which Tomcat is available. An example for this value is as follows:
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 - Save the new value. The Tomcat resource now appears as fully available for JBoss Operations Network.
- 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 Important
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=/opt/jboss-ews-2.0/jmxremote.access" JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.password.file=/opt/jboss-ews-2.0/jmxremote.password"JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.access.file=/opt/jboss-ews-2.0/jmxremote.access" JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.password.file=/opt/jboss-ews-2.0/jmxremote.password"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - on Windows:
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.access.file=C:\Program Files\jboss-ews-2.0\jmxremote.access" set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.password.file=C:\Program Files\jboss-ews-2.0\jmxremote.password"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.access.file=C:\Program Files\jboss-ews-2.0\jmxremote.access" set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.password.file=C:\Program Files\jboss-ews-2.0\jmxremote.password"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Appendix A. Supported HTTP Modules Copy linkLink copied to clipboard!
- core_module (static)
- mpm_prefork_module (static)
- http_module (static)
- so_module (static)
- auth_basic_module (shared)
- auth_digest_module (shared)
- authn_file_module (shared)
- authn_alias_module (shared)
- authn_anon_module (shared)
- authn_dbm_module (shared)
- authn_default_module (shared)
- authz_host_module (shared)
- authz_user_module (shared)
- authz_owner_module (shared)
- authz_groupfile_module (shared)
- authz_dbm_module (shared)
- authz_default_module (shared)
- ldap_module (shared)
- authnz_ldap_module (shared)
- include_module (shared)
- log_config_module (shared)
- logio_module (shared)
- env_module (shared)
- ext_filter_module (shared)
- mime_magic_module (shared)
- mime_magic_module (shared)
- expires_module (shared)
- deflate_module (shared)
- headers_module (shared)
- usertrack_module (shared)
- setenvif_module (shared)
- mime_module (shared)
- dav_module (shared)
- status_module (shared)
- autoindex_module (shared)
- info_module (shared)
- dav_fs_module (shared)
- negotiation_module (shared)
- dir_module (shared)
- actions_module (shared)
- speling_module (shared)
- userdir_module (shared)
- alias_module (shared)
- rewrite_module (shared)
- proxy_module (shared)
- proxy_ftp_module (shared)
- proxy_http_module (shared)
- proxy_connect_module (shared)
- cache_module (shared)
- suexec_module (shared)
- disk_cache_module (shared)
- cgi_module (shared)
- auth_kerb_module (shared)
- proxy_cluster_module (shared)
- slotmem_module (shared)
- manager_module (shared)
- advertise_module (shared)
- rt_module (shared)
- snmpcommon_module (shared)
- snmpagt_module (shared)
- proxy_ajp_module (shared)
- ssl_module (shared)
Appendix B. Revision History Copy linkLink copied to clipboard!
| Revision History | ||||
|---|---|---|---|---|
| Revision 3.0.1-18.1 | Wed Feb 11 2015 | |||
| ||||
| Revision 3.0.1-18 | Tue Sep 24 2013 | |||
| ||||
| Revision 3.0.1-17 | Mon Jun 17 2013 | |||
| ||||
| Revision 3.0.1-16 | Mon Jun 10 2013 | |||
| ||||
| Revision 3.0.1-15 | Fri Jun 7 2013 | |||
| ||||
| Revision 3.0.1-14 | Fri Jun 7 2013 | |||
| ||||
| Revision 3.0.1-13 | Thur Jun 6 2013 | |||
| ||||
| Revision 3.0.1-12 | Thur Jun 6 2013 | |||
| ||||
| Revision 3.0.1-11 | Wed Jun 5 2013 | |||
| ||||
| Revision 2.0.2-12 | Mon Nov 6 2012 | |||
| ||||