Questo contenuto non è disponibile nella lingua selezionata.
Release Notes
for Use with Red Hat JBoss Web Server 1.0.0
Copyright © 2009 Red Hat, Inc
Abstract
1. Introduction Copia collegamentoCollegamento copiato negli appunti!
1.1. Overview Copia collegamentoCollegamento copiato negli appunti!
Apache Tomcat 5.5.23: Apache Tomcat is an implementation of the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process. Apache Tomcat version 5.5 implements the Servlet 2.4 and JavaServer Pages 2.0 specifications.Note
Apache Tomcat 5.5.23 is available within the default Red Hat Enterprise Linux 5 installation.Apache Tomcat 6.0.18: Apache Tomcat is an implementation of the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process. Apache Tomcat version 6.0 implements the Servlet 2.5 and JavaServer Pages 2.1 specifications.Apache Tomcat Native 1.1.16: Tomcat can use the Apache Portable Runtime to provide superior scalability, performance, and better integration with native server technologies. The Apache Portable Runtime is a highly portable library that is at the heart of Apache HTTP Server 2.x. APR has many uses, including access to advanced IO functionality (such as sendfile, epoll and OpenSSL), OS level functionality (random number generation, system status, etc), and native process handling (shared memory, NT pipes and Unix sockets). This package contains the Tomcat native library which provides support for using APR in Tomcat.Apache Tomcat Connector (mod_jk) 1.2.27: Apache Tomcat Connector (mod_jk) is bridge between Apache Httpd and Apache Tomcat using binary AJP protocol. It also contains load balancer providing clustering and fault tolerance.Apache HTTP Server 2.2.10: The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.Note
The Apache HTTP Server 2.2.10 is available within the default Red Hat Enterprise Linux 5 installation.
- Red Hat Enterprise Linux 4 (32-bit systems, 64-bit systems)
- Red Hat Enterprise Linux 5 (32-bit systems, 64-bit systems)
- Solaris 9 (32-bit systems)
- Solaris 10 (32-bit systems, 64-bit systems)
2. Installation Notes Copia collegamentoCollegamento copiato negli appunti!
2.1. Installation Notes for Red Hat Enterprise Linux Copia collegamentoCollegamento copiato negli appunti!
rpm file; however we will also discuss installation via the zip package.
up2date java-<version>-<vendor>
up2date java-<version>-<vendor>
<version> can be 1.5.0 or 1.6.0 and <vendor> can be sun or ibm.
yum install java-<version>-<vendor>
yum install java-<version>-<vendor>
<version> can be 1.5.0 or 1.6.0 and <vendor> can be sun, ibm or openjdk. Please note that OpenJDK is only available for version 1.6.0.
alternatives --config java alternatives --config javac
alternatives --config java
alternatives --config javac
Important
java and javac commands will now be using the same JDK as well.
- If you are subscribed to the
Stackschannel, you will need to disable that channel before installing the JBoss Enterprise Web Server. - Subscribe to the JBoss Enterprise Web Server channel: Red Hat Enterprise Linux 4 ews or Red Hat Enterprise Linux 5 ewsThe avaliable channels for Red Hat Enterprise Linux 4 are:
- jb-ews-1-i386-as-4-rpm
- jb-ews-1-64-bit systems-as-4-rpm
- jb-ews-1-i386-es-4-rpm
- jb-ews-x86_64-es-4-rpm
The avaliable channels for Red Hat Enterprise Linux 5 are:- jb-ews-1-i386-server-5-rpm
- jb-ews-1-x86_64-server-5-rpm
- Install the packages: tomcat5, tomcat6, tomcat-native, httpd22 and mod_jkOn Red Hat Enterprise Linux 4 to install the packages, execute:
up2date tomcat6 tomcat6-webapps tomcat6-admin-webapps tomcat5 tomcat5-webapps tomcat5-admin-webapps ecj tomcat-native httpd22 mod_jk-ap20
up2date tomcat6 tomcat6-webapps tomcat6-admin-webapps tomcat5 tomcat5-webapps tomcat5-admin-webapps ecj tomcat-native httpd22 mod_jk-ap20Copy to Clipboard Copied! Toggle word wrap Toggle overflow - On Red Hat Enterprise Linux 5 check that the Tomcat 5 packages are not already installed, if not then install the packages by executing:
yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps tomcat5 tomcat5-webapps tomcat5-admin-webapps tomcat-native httpd mod_jk-ap20
yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps tomcat5 tomcat5-webapps tomcat5-admin-webapps tomcat-native httpd mod_jk-ap20Copy to Clipboard Copied! Toggle word wrap Toggle overflow Otherwise, in order to install the Tomcat 5 packages, you need to make the following modification to the/etc/yum.conffile. Comment out the option:exactarch=1
exactarch=1Copy to Clipboard Copied! Toggle word wrap Toggle overflow Then install the packages:yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps tomcat5.noarch tomcat5-webapps.noarch tomcat5-admin-webapps.noarch tomcat-native httpd mod_jk-ap20
yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps tomcat5.noarch tomcat5-webapps.noarch tomcat5-admin-webapps.noarch tomcat-native httpd mod_jk-ap20Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
Revert the change in/etc/yum.confonce installation is complete, this returns yum configuration to default settings.
Warning
/var/log/httpd22 directory must be manually created, otherwise the httpd startup script will fail.
- Download the JBoss Enterprise Web Server zip file from the CSP site that is correct for your operating system and architecture.
- Unzip the file.
Important
2.2. Red Hat Enterprise Linux directory structure Copia collegamentoCollegamento copiato negli appunti!
2.3. Running the Installation Copia collegamentoCollegamento copiato negli appunti!
2.3.1. Running a RPM Installation Copia collegamentoCollegamento copiato negli appunti!
Tomcat can be started, stopped, and configured to start automatically at boot time either from the command line or using a graphical tool.
tomcat5 or tomcat6 services can be started and stopped using the service command as root on a console window (as is typical of a network service):
tomcat5 service:
service tomcat5 start
service tomcat5 start
service tomcat5 stop
service tomcat5 stop
tomcat6 service:
service tomcat6 start
service tomcat6 start
service tomcat6 stop
service tomcat6 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/tomcat5 file for Tomcat version 5 and the /etc/sysconfig/tomcat6 file for Tomcat version 6.
The HTTP Server can be started, stopped, and configured to start automatically at boot time either from the command line or using a graphical tool.
service command as root on a console window (as is typical of a network service):
service httpd22 start
service httpd22 start
service httpd22 stop
service httpd22 stop
service httpd start
service httpd start
service httpd stop
service httpd stop
/etc/sysconfig/httpd22 file on Red Hat Enterprise Linux 4 and the /etc/sysconfig/httpd file on Red Hat Enterprise Linux 5.
To load the mod_jk module, the file /etc/httpd22/conf/httpd.conf on Red Hat Enterprise Linux 4 or the file /etc/httpd/conf/httpd.conf on Red Hat Enterprise Linux 5 needs to be updated, and a workers.properties file needs to be added in that directory. See /usr/share/doc/mod_jk-ap20-1.2.27/mod_jk.conf.sample and /usr/share/doc/mod_jk-ap20-1.2.27/workers.properties.sample for examples of how this can be achieved.
log4j for logging in Tomcat 6
In order to use log4j for logging in Tomcat 6, install the tomcat6-log4j rpm file.
Edit /etc/sysconfig/tomcat5 file for Tomcat 5 or /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.3.2. Running a ZIP Installation Copia collegamentoCollegamento copiato negli appunti!
After extracting the zip file, check to see if a user called tomcat exists on the system by running the following command:
id tomcat
id tomcat
groupadd -g 91 -r tomcat useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r -d /home/tomcat tomcat
groupadd -g 91 -r tomcat
useradd -c "Tomcat" -u 91 -g tomcat -s /bin/sh -r -d /home/tomcat tomcat
tomcat user will be running Tomcat, then the ownership of the tomcat directories will need to be changed to reflect this:
chown -R tomcat:tomcat tomcat5
chown -R tomcat:tomcat tomcat5
chown -R tomcat:tomcat tomcat6
chown -R tomcat:tomcat tomcat6
tomcat user has execution permission to the tomcat install path.
JAVA_HOME and CATALINA_HOME variables will now need to be set and this can be achieved by either modifying your .bashrc file or by modifying the Tomcat catalina.sh file.
.bashrc file, add the following line with the correct path to suit your systems configuration (a path is provided here as an example only):
export JAVA_HOME=/usr/lib/jvm/java export CATALINA_HOME=<insert_install_path>/tomcat5 #(or tomcat6)
export JAVA_HOME=/usr/lib/jvm/java
export CATALINA_HOME=<insert_install_path>/tomcat5 #(or tomcat6)
tomcat5/bin/catalina.sh or tomcat6/bin/catalina.sh file (depending on the version of Tomcat installed), add the following line with the correct path to suit your systems configuration (a path is provided here as an example only):
JAVA_HOME=/usr/lib/jvm/java CATALINA_HOME=<insert_install_path>/tomcat5 #(or tomcat6)
JAVA_HOME=/usr/lib/jvm/java
CATALINA_HOME=<insert_install_path>/tomcat5 #(or tomcat6)
tomcat:
sh startup.sh
sh startup.sh
sh shutdown.sh
sh shutdown.sh
In order to run the HTTP Server, the distcache and pcre rpm packages must be installed as they are a requirement of mod_ssl. To check if these dependencies are already installed, execute the following in a command prompt:
rpm -q distcache pcre
rpm -q distcache pcre
up2date distcache up2date pcre
up2date distcache
up2date pcre
yum install distcache yum install pcre
yum install distcache
yum install pcre
y key.
rpm -q distcache rpm -q pcre
rpm -q distcache
rpm -q pcre
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
groupadd -g 91 -r apache 2> /dev/null || : useradd -c "Apache" -u 91 -g apache -s /bin/sh -r -d /home/apache apache 2> /dev/null || :
groupadd -g 91 -r apache 2> /dev/null || :
useradd -c "Apache" -u 91 -g apache -s /bin/sh -r -d /home/apache 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.
sbin directory and executing:
LD_LIBRARY_PATH=<insert_install_path>/httpd/lib ./httpd -f install_path/httpd/conf/httpd.conf -E install_path/httpd/logs/httpd.log -k start
LD_LIBRARY_PATH=<insert_install_path>/httpd/lib ./httpd -f install_path/httpd/conf/httpd.conf -E install_path/httpd/logs/httpd.log -k start
LD_LIBRARY_PATH=<insert_install_path>/httpd/lib ./httpd -f install_path/httpd/conf/httpd.conf -E install_path/httpd/logs/httpd.log -k stop
LD_LIBRARY_PATH=<insert_install_path>/httpd/lib ./httpd -f install_path/httpd/conf/httpd.conf -E install_path/httpd/logs/httpd.log -k stop
To load the mod_jk module, the file httpd/conf/httpd.conf needs to be updated, and a workers.properties file needs to be added in that directory. See doc/mod_jk/mod_jk.conf.sample and doc/mod_jk//workers.properties.sample for examples of how this can be achieved.
The native library for Tomcat 6 is setup to be used by default, with the LD_LIBRARY_PATH and -Djava.library.path having been set accordingly within the catalina.sh file.
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path
In order to use log4j logging in Tomcat 6, copy the content of the extras/ directory into the lib/ directory and restart Tomcat.
2.4. Installation Notes for Solaris Copia collegamentoCollegamento copiato negli appunti!
package file; however we will also discuss installation via the zip package.
Note
srpms.
2.4.1. Installation using the Solaris package Copia collegamentoCollegamento copiato negli appunti!
gunzip and pkgadd commands. The commands will be:
gunzip RHATews-1.0.0*-solaris10-i386.package.gz
gunzip RHATews-1.0.0*-solaris10-i386.package.gz
pkgadd -d RHATews-1.0.0*-solaris10-i386.package
pkgadd -d RHATews-1.0.0*-solaris10-i386.package
The following packages are available: 1 RHATews Red Hat Enterprise Web Server (i386) 1.0.0,REV=2.el5 Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]:
The following packages are available:
1 RHATews Red Hat Enterprise Web Server (i386) 1.0.0,REV=2.el5
Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]:
1 or just press enter. The following information will now appear:
y and press enter.
/opt/redhat/ews directory.
pkginfo -l RHATews
pkginfo -l RHATews
Note
JAVA_HOME environment variable was not set. Configuring this is discussed later in the Section 2.6, “Running on a Solaris Installation” section.
2.4.2. Installation using the zip package Copia collegamentoCollegamento copiato negli appunti!
zip package requires root access and the GNU version of tar.
/opt directory since the post installation script will not run if installation occurs within a different location.
cd /opt unzip -q RHATews-1.0.0*-solaris10-i386.zip
cd /opt
unzip -q RHATews-1.0.0*-solaris10-i386.zip
cd /opt/redhat/ews/etc sh .postinstall
cd /opt/redhat/ews/etc
sh .postinstall
apache with an ID of 48 and tomcat with an ID of 91, will have been created. The apache user will be used to run httpd, while the tomcat user will be used to run tomcat.
tomcat group has write permission to:
/var/logs/tomcat5/var/logs/tomcat6
2.5. Solaris directory structure Copia collegamentoCollegamento copiato negli appunti!
- 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-saslto name a few.
2.6. Running on a Solaris Installation Copia collegamentoCollegamento copiato negli appunti!
In order to run Tomcat on Solaris, some service configuration files will need manual editing.
JAVA_HOME variable to the desired JDK in the configuration file. The configuration file can be found at:
/opt/redhat/ews/etc/sysconfig/tomcat5
/opt/redhat/ews/etc/sysconfig/tomcat5
/opt/redhat/ews/etc/sysconfig/tomcat6
/opt/redhat/ews/etc/sysconfig/tomcat6
sbin/tomcat5 start
sbin/tomcat5 start
sbin/tomcat6 start
sbin/tomcat6 start
catalina.sh script is executed.
catalina.sh script file can be found within:
/opt/redhat/ews/share/tomcat5/bin
/opt/redhat/ews/share/tomcat5/bin
/opt/redhat/ews/share/tomcat6/bin
/opt/redhat/ews/share/tomcat6/bin
sbin/tomcat5 stop
sbin/tomcat5 stop
sbin/tomcat6 stop
sbin/tomcat6 stop
tomcat-native is automatically added to the LD_LIBRARY_PATH and -Djava.library.path during Tomcat startup. The catalina.sh script detects the running JVM version and adds the /opt/redhat/ews/lib path (/opt/redhat/ews/lib64 for 64 bit JVM) to the library path.
/opt/redhat/ews/etc/init.d directory. The following commands can be used to copy the necessary scripts:
cp /opt/redhat/ews/etc/init.d/tomcat6 /etc/rc3.d/S70tomcat5 cp /opt/redhat/ews/etc/init.d/tomcat6 /etc/rcS.d/K20tomcat5
cp /opt/redhat/ews/etc/init.d/tomcat6 /etc/rc3.d/S70tomcat5
cp /opt/redhat/ews/etc/init.d/tomcat6 /etc/rcS.d/K20tomcat5
cp /opt/redhat/ews/etc/init.d/tomcat6 /etc/rc3.d/S70tomcat6 cp /opt/redhat/ews/etc/init.d/tomcat6 /etc/rcS.d/K20tomcat6
cp /opt/redhat/ews/etc/init.d/tomcat6 /etc/rc3.d/S70tomcat6
cp /opt/redhat/ews/etc/init.d/tomcat6 /etc/rcS.d/K20tomcat6
init level numbers, consult your Solaris documentation. The preferred method of service management is through the Solaris Service Management Facility. In order to read more about this facility, consult the smf(5) manual.
Apache httpd configuration files are located inside the /opt/redhat/ews/etc/httpd directory. By default all supported modules are loaded and enabled, so it is advised that you edit the httpd.conf file and disable the modules you don't need.
apachectl script located inside the /opt/redhat/ews/sbin directory. The apachectl script uses the configuration script, where you can edit and select various startup parameters, including the running of mpm. The file used is /opt/redhat/ews/etc/sysconfig/httpd
sbin/apachectl start
sbin/apachectl start
sbin/apachectl stop
sbin/apachectl stop
apachectl script should be added to your system startup files.
Note
docs/httpd/invoking.html and docs/httpd/stopping.html respectively.
Running mod_jk on Solaris is the same as running the package on Red Hat Enterprise Linux installed via zip. For detailed instructions see Running the mod_jk
2.7. Uninstalling the package in Solaris Copia collegamentoCollegamento copiato negli appunti!
pkgrm RHATews
pkgrm RHATews
/opt/redhat/ews/var/run/tomcat5/var/run/tomcat6/var/cache/tomcat5/var/cache/tomcat6/var/log/httpd/var/cache/mod_ssl/var/cache/mod_proxy
2.8. Source Files Copia collegamentoCollegamento copiato negli appunti!
2.9. Building Tomcat from source Copia collegamentoCollegamento copiato negli appunti!
In order to compile Tomcat 5 from source the following commands will need to be executed in sequence:
cd servletapi/jsr154
cd servletapi/jsr154
export CLASSPATH=servletapi4.jar
export CLASSPATH=servletapi4.jar
ant -Dbuild.compiler=modern dist
ant -Dbuild.compiler=modern dist
cd ../../servletapi/jsr152
cd ../../servletapi/jsr152
ant -Dbuild.compiler=modern dist
ant -Dbuild.compiler=modern dist
cd ../../build
cd ../../build
sed -i -e 's:INSTALL_DIR:<install_directory>/jboss-ews-1.0-src/tomcat5:g' build.properties
sed -i -e 's:INSTALL_DIR:<install_directory>/jboss-ews-1.0-src/tomcat5:g' build.properties
export CLASSPATH=../servletapi/jsr154/dist/lib/servlet-api.jar:../servletapi/jsr152/dist/lib/jsp-api.jar:../jakarta-taglibs-core.jar:../jakarta-taglibs-standard.jar:../struts.jar:../struts-taglib.jar:../ant.jar:../build/build/server/lib/tomcat-apr.jar
export CLASSPATH=../servletapi/jsr154/dist/lib/servlet-api.jar:../servletapi/jsr152/dist/lib/jsp-api.jar:../jakarta-taglibs-core.jar:../jakarta-taglibs-standard.jar:../struts.jar:../struts-taglib.jar:../ant.jar:../build/build/server/lib/tomcat-apr.jar
ant -Dbuild.compiler=modern build-jasper-compiler-jdt release
ant -Dbuild.compiler=modern build-jasper-compiler-jdt release
In order to compile Tomcat 6 from source the following command will need to be executed:
ant -Dbase.path="." -Dbuild.compiler="modern" -Dcommons-collections.jar="commons-collections.jar" -Dcommons-daemon.jar="commons-daemon.jar" -Dcommons-daemon.jsvc.tar.gz="jsvc.tar.gz" -Djasper-jdt.jar="jasper-jdt.jar" -Djdt.jar="jasper-jdt.jar" -Dtomcat-dbcp.jar="tomcat-dbcp.jar" -Dtomcat-native.tar.gz=""
ant -Dbase.path="." -Dbuild.compiler="modern" -Dcommons-collections.jar="commons-collections.jar" -Dcommons-daemon.jar="commons-daemon.jar" -Dcommons-daemon.jsvc.tar.gz="jsvc.tar.gz" -Djasper-jdt.jar="jasper-jdt.jar" -Djdt.jar="jasper-jdt.jar" -Dtomcat-dbcp.jar="tomcat-dbcp.jar" -Dtomcat-native.tar.gz=""
3. Excluded, Removed and Deprecated Items Copia collegamentoCollegamento copiato negli appunti!
Note
3.1. Excluded Items Copia collegamentoCollegamento copiato negli appunti!
Tomcat Clusteringhas been excluded from theApache Tomcat 6component. Specifically thecatalina-tribes.jarfile has been removed. This has occurred to eliminate any possibility of session replication and because Red Hat does not believe this feature is suitable for medium or large scale production deployments.
3.2. Deprecated Items Copia collegamentoCollegamento copiato negli appunti!
- The
Tomcat Clusteringfeature ofApache Tomcat 5is marked as deprecated for this release. Specifically thecatalina-cluster.jarfile has been deprecated.
3.3. Removed Items Copia collegamentoCollegamento copiato negli appunti!
4. Product Support and License Website Links Copia collegamentoCollegamento copiato negli appunti!
5. Known Issues with this release Copia collegamentoCollegamento copiato negli appunti!
- JBPAPP-1809: A warning may occur in the log files for the
tomcatuser, which informs that there are no write permissions on the directory. A workaround currently exists for this issue that involves adding write permission to thetomcatgroup directorytomcat/conf. - JBPAPP-1837: Following RPM installation on Red Hat Enterprise Linux 4, the
/var/log/httpd22directory is not automatically created, forcing thehttpdstartup script to fail. The current workaround is to manually create this directory. - JBPAPP-1838: Once installation of the Enterprise Web Server has been completed via
zip, a bug exists where thehttpd/.postinstallscript does not modify theconf/httpd.conffile to point to the correctServerRootdirectory. A workaround which exists for this involves replacing the reference to the/etc/httpddirectory within thehttpd/.postinstallscript with the/etc/httpd22directory. - JBPAPP-1788: Tomcat 6 on Solaris is stopped by the use of the command
ews/etc/init.d/tomcat6 stopand though the server is successfully terminated, the output displays command usage errors. This is an issue withCATALINA_PIDnot being propagated for Tomcat 6 and will be fixed in a future release.
Security Known Issues
- CVE-2010-2086
- JBoss Enterprise Web Server 1.0.0 ships with Apache MyFaces 1.1.0. Apache MyFaces 1.1.0 does not support encrypted view state. When the application's view state is not encrypted, it is possible for an attacker to supply a new or modified view object as part of a request. This allows remote attackers to conduct cross-site scripting (XSS) attacks or execute arbitrary Expression Language (EL) statements via vectors that involve modifying the serialized view object.JBoss Enterprise Web Server 1.0.1 and later does not ship with Apache MyFaces. Upgrading to JBoss Enterprise Web Server 1.0.1 or later is recommended to mitigate this issue.
A. Revision History Copia collegamentoCollegamento copiato negli appunti!
| Revision History | |||
|---|---|---|---|
| Revision 1.0.0-1.1 | Wed Feb 11 2015 | ||
| |||
| Revision 1.0.0-1 | Thu Oct 07 2010 | ||
| |||