Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Tomcat 4.1.27 Standalone Jpackage RPMs

Tomcat 4.1.27 Standalone Jpackage RPMs

2003-10-17       - By Randy Watler

 Back
How To Install Tomcat 4.1.27 Standalone using Jpackage RPMs
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------

The Tomcat Team no longer generates monolithic RPMs for the
full or LE version of Tomcat after 4.1.24. Instead, RPMs
can be obtained from www.jpackage.org. Jpackage's apparent
goal is to generate RPMs for common Java based packages and
to standardize the installed directory structure and
environment.

Because Jpackage manages many RPMs, (at least one for each
Java library/tool), there are over 20 RPMs that make up
a working Tomcat 4.1 installation. This includes RPMs for the
j2sdk and its extensions. As with other RPM managed products,
future upgrades to Tomcat may only include one or a handfull
of RPMs to be updated. If this sounds daunting or difficult
to manage, remember that RPMs make the whole process fairly
easy.

As mentioned above, Jpackage attempts to unify the Java install
environment by repackaging JVMs/JREs into a consistent form
that allows multiple versions of Sun, Blackdown, and IBM
product RPMs to be plug compatible with other Jpackage
components like Tomcat. This eliminates many configuration
problems and makes user and service environments generally
stable. To realize this goal, some Jpackage RPM installation
scripts require that the JVM and related components be
installed using Jpackage RPMs; this includes the Tomcat 4.1
RPM. Also, there is also a Jpackage utilities RPM that must
be installed to support this install architecture.

For many reasons, (see the site FAQ for details), Jpackage
cannot distribute binary RPMs for many vendor's products or
components. However, Jpackage has created "nosrc" RPMs that
you manually compose, (only once), after pulling the products
binary "sources" from the vendor's web sites. The "nosrc"
designation can be misleading: by building RPMs from these
templates, downloaded binary components are not rebuilt
from Java or other sources, they are simply repackaged as
Jpackage compatible binary RPMs! For a Tomcat 4.1 install,
this process must be done for only the JVM and a few of its
extensions. Don't let this extra step color your opinion of
the Jpackage RPMs!

Here are the steps I used to install Tomcat 4.1.27 using the
Sun 1.4.2_01 j2sdk on a RedHat 8.0 server, (YMMV):

-- ---- ---- --

1. Erase any j2sdk and obsolete Tomcat RPM installs. For
example, these were the commands I used after saving any
Tomcat configuration files or webapps:

> su -
Password:
> rpm -e j2sdk-1 (See http://sdk-1.ora-code.com).4.2_01-fcs
> rpm -e tomcat4-4.1.24-full.2jpp
> rm -rf /var/tomcat4
> rm -rf /etc/tomcat4
> rm -rf /var/log/tomcat4
> exit

-- ---- ---- --

2. Download the following RPMs from www.jpackage.org:

ant-1 (See http://ant-1.ora-code.com).5.4-2jpp.noarch.rpm      
jaf-1 (See http://jaf-1.ora-code.com).0.2-3jpp.nosrc.rpm    
jakarta-commons-beanutils-1 (See http://ils-1.ora-code.com).6.1-4jpp.noarch.rpm
jakarta-commons-collections-2 (See http://ons-2.ora-code.com).1-4jpp.noarch.rpm
jakarta-commons-daemon-1 (See http://mon-1.ora-code.com).0.cvs20030227-6jpp.noarch.rpm
jakarta-commons-dbcp-1 (See http://bcp-1.ora-code.com).0-4jpp.noarch.rpm  
jakarta-commons-digester-1 (See http://ter-1.ora-code.com).5-3jpp.noarch.rpm
jakarta-commons-fileupload-1 (See http://oad-1.ora-code.com).0-1jpp.noarch.rpm
jakarta-commons-logging-1 (See http://ing-1.ora-code.com).0.3-4jpp.noarch.rpm
jakarta-commons-modeler-1 (See http://ler-1.ora-code.com).1-2jpp.noarch.rpm  
jakarta-commons-pool-1 (See http://ool-1.ora-code.com).0.1-5jpp.noarch.rpm
java-1 (See http://ava-1.ora-code.com).4.2-sun-1 (See http://sun-1.ora-code.com).4.2.01-7jpp.nosrc.rpm
javamail-1 (See http://ail-1.ora-code.com).3.1-1jpp.nosrc.rpm
jpackage-utils-1 (See http://ils-1.ora-code.com).5.27-1jpp.noarch.rpm
jta-1 (See http://jta-1.ora-code.com).0.1-0.b.3jpp.nosrc.rpm      
mx4j-1.1.1-5jpp.noarch.rpm
regexp-1 (See http://exp-1.ora-code.com).3-1jpp.noarch.rpm
servletapi4-4.0.4-3jpp.noarch.rpm
tomcat4-4.1.27-2jpp.noarch.rpm
tyrex-1 (See http://rex-1.ora-code.com).0-3jpp.noarch.rpm        
xalan-j2-2.5.1-1jpp.noarch.rpm
xerces-j2-2.4.0-3jpp.noarch.rpm          
xml-commons-1 (See http://ons-1.ora-code.com).0-0.b2.6jpp.noarch.rpm
xml-commons-apis-1 (See http://pis-1.ora-code.com).0-0.b2.6jpp.noarch.rpm

If you wish to use an older JVM version, choose the nosrc RPM
that you wish to use; you may also need to include the following
nosrc RPMs for required extensions and libraries depending on
the JVM version:

jaas-ext-1 (See http://ext-1.ora-code.com).0.1-2jpp.nosrc.rpm
jdbc-stdext-ext-2 (See http://ext-2.ora-code.com).0-12jpp.nosrc.rpm
jndi-ext-1 (See http://ext-1.ora-code.com).2.1-10jpp.nosrc.rpm
jsse-ext-1 (See http://ext-1.ora-code.com).0.3.01-5jpp.nosrc.rpm
ldapjdk-4 (See http://jdk-4.ora-code.com).1-5jpp.noarch.rpm
oro-2 (See http://oro-2.ora-code.com).0.7-1jpp.noarch.rpm

-- ---- ---- --

3. Download the following binary sources from the Sun j2sdk
and appropriate product web sites:

j2sdk-1 (See http://sdk-1.ora-code.com)_4_2_01-linux-i586.bin
jaf-1 (See http://jaf-1.ora-code.com)_0_2.zip
javamail-1 (See http://ail-1.ora-code.com)_3_1.zip
jta-1 (See http://jta-1.ora-code.com)_0_1B-classes.zip

Again, you may also need to download these if you are using
older JVM versions:

jaas-1 (See http://aas-1.ora-code.com)_0_01.zip
jdbc2_0-stdext.jar
jndi-1 (See http://ndi-1.ora-code.com)_2_1.zip
jsse-1 (See http://sse-1.ora-code.com)_0_3_02-do.zip, (or jsse-1 (See http://sse-1.ora-code.com)_0_3_02-gl.zip)

-- ---- ---- --

4. Install the require Jpackage utility RPM:

> su -
Password:
> rpm -U jpackage-utils-1 (See http://ils-1.ora-code.com).5.27-1jpp.noarch.rpm
> exit

-- ---- ---- --

5. Because we are going to build binary RPMs using the nosrc
RPMs and the downloaded binary sources, we need a standard
host RPM directory structure. Note that the following RPM
building steps should be done in a user directory and not as
root on your machine! More details for these steps can be
found on the www.jpackage.org web site. Here are the commands
to prepare the RPM environment:

> mkdir ~/rpm
> mkdir ~/rpm/BUILD
> mkdir ~/rpm/RPMS
> mkdir ~/rpm/RPMS/i386
> mkdir ~/rpm/RPMS/i586
> mkdir ~/rpm/RPMS/noarch
> mkdir ~/rpm/SOURCES
> mkdir ~/rpm/SPECS
> mkdir ~/rpm/SRPMS
> mkdir ~/rpm/tmp

Create the ~/.rpmmacros file with the following lines, (do
substitute your name and email address in the place of
the template values):

%_topdir        %(echo ${HOME}/rpm)
%_tmppath       %{_topdir}/tmp

%packager       Firstname Lastname <your.address@(protected)>

-- ---- ---- --

6. Install all of the nosrc RPMs into the RPM directories:

> rpm -i jaf-1 (See http://jaf-1.ora-code.com).0.2-3jpp.nosrc.rpm    
> rpm -i java-1 (See http://ava-1.ora-code.com).4.2-sun-1 (See http://sun-1.ora-code.com).4.2.01-7jpp.nosrc.rpm
> rpm -i javamail-1 (See http://ail-1.ora-code.com).3.1-1jpp.nosrc.rpm
> rpm -i jta-1 (See http://jta-1.ora-code.com).0.1-0.b.3jpp.nosrc.rpm

You should see RPM spec files for each in the ~/rpm/SPECS
directory.

And continue with these for older JVM versions:      

> rpm -i jaas-ext-1 (See http://ext-1.ora-code.com).0.1-2jpp.nosrc.rpm
> rpm -i jdbc-stdext-ext-2 (See http://ext-2.ora-code.com).0-12jpp.nosrc.rpm
> rpm -i jndi-ext-1 (See http://ext-1.ora-code.com).2.1-10jpp.nosrc.rpm
> rpm -i jsse-ext-1 (See http://ext-1.ora-code.com).0.3.01-5jpp.nosrc.rpm

Note that the ~/rpm/SPECS/jsse.spec file needs to be edited
to reflect the downloaded version of the JSSE package. I
edited the spec file replacing '1.0.3.01' with '1.0.3.02'
and 'gl' with 'do'.

-- ---- ---- --

7. Copy the downloaded binary sources into the user
~/rpm/SOURCES directory:

> cp j2sdk-1 (See http://sdk-1.ora-code.com)_4_2_01-linux-i586.bin ~/rpm/SOURCES/
> cp jaf-1 (See http://jaf-1.ora-code.com)_0_2.zip ~/rpm/SOURCES/
> cp javamail-1 (See http://ail-1.ora-code.com)_3_1.zip ~/rpm/SOURCES/
> cp jta-1 (See http://jta-1.ora-code.com)_0_1B-classes.zip ~/rpm/SOURCES/

And for older JVM versions:

> cp jaas-1 (See http://aas-1.ora-code.com)_0_01.zip ~/rpm/SOURCES/
> cp jdbc2_0-stdext.jar ~/rpm/SOURCES/
> cp jndi-1 (See http://ndi-1.ora-code.com)_2_1.zip ~/rpm/SOURCES/
> cp jsse-1 (See http://sse-1.ora-code.com)_0_3_02-do.zip ~/rpm/SOURCES/

-- ---- ---- --

8. Build the corresponding binary RPMs using rpmbuild,
(see www.jpackage.org if you have an older version of
rpm that does not use rmpbuild):

> rpmbuild -ba ~/rpm/SPECS/jaf.spec
> rpmbuild -ba ~/rpm/SPECS/java-1 (See http://ava-1.ora-code.com).4.2-sun.spec
> rpmbuild -ba ~/rpm/SPECS/javamail.spec
> rpmbuild -ba --without javadoc ~/rpm/SPECS/jta.spec

And for older JVM versions:
                                 
> rpmbuild -ba --without javadoc ~/rpm/SPECS/jaas-ext.spec
> rpmbuild -ba --without javadoc ~/rpm/SPECS/jdbc-stdext-ext.spec
> rpmbuild -ba ~/rpm/SPECS/jndi.spec
> rpmbuild -ba ~/rpm/SPECS/jsse.spec

-- ---- ---- --

9. Extract only the required new binary RPMs from the RPM
directories:

> cp ~/rpm/RPMS/i586/java-1 (See http://ava-1.ora-code.com).4.2-sun-1 (See http://sun-1.ora-code.com).4.2.01-7jpp.i586.rpm .
> cp ~/rpm/RPMS/i586/java-1 (See http://ava-1.ora-code.com).4.2-sun-devel-1 (See http://vel-1.ora-code.com).4.2.01-7jpp.i586.rpm .
> cp ~/rpm/RPMS/i586/java-1 (See http://ava-1.ora-code.com).4.2-sun-fonts-1 (See http://nts-1.ora-code.com).4.2.01-7jpp.i586.rpm .
> cp ~/rpm/RPMS/noarch/jaf-1 (See http://jaf-1.ora-code.com).0.2-3jpp.noarch.rpm .
> cp ~/rpm/RPMS/noarch/javamail-1 (See http://ail-1.ora-code.com).3.1-1jpp.noarch.rpm .
> cp ~/rpm/RPMS/noarch/jta-1 (See http://jta-1.ora-code.com).0.1-0.b.3jpp.noarch.rpm .

And continuing only for older JVM versions:

> cp ~/rpm/RPMS/noarch/jaas-ext-1 (See http://ext-1.ora-code.com).0.1-2jpp.noarch.rpm .
> cp ~/rpm/RPMS/noarch/jdbc-stdext-ext-2 (See http://ext-2.ora-code.com).0-12jpp.noarch.rpm .
> cp ~/rpm/RPMS/noarch/jndi-ext-1 (See http://ext-1.ora-code.com).2.1-10jpp.noarch.rpm .
> cp ~/rpm/RPMS/noarch/jsse-ext-1 (See http://ext-1.ora-code.com).0.3.02-5jpp.noarch.rpm .

-- ---- ---- --

10. Install all of the downloaded and built RPMs in order
of their dependencies, (not into the local user RPM
directories, but as root as done for other RPM installs):

> su -
Password:
> rpm -U java-1 (See http://ava-1.ora-code.com).4.2-sun-1 (See http://sun-1.ora-code.com).4.2.01-7jpp.i586.rpm
> rpm -U java-1 (See http://ava-1.ora-code.com).4.2-sun-devel-1 (See http://vel-1.ora-code.com).4.2.01-7jpp.i586.rpm
> rpm -U java-1 (See http://ava-1.ora-code.com).4.2-sun-fonts-1 (See http://nts-1.ora-code.com).4.2.01-7jpp.i586.rpm
> rpm -U jaf-1 (See http://jaf-1.ora-code.com).0.2-3jpp.noarch.rpm .
> rpm -U jta-1 (See http://jta-1.ora-code.com).0.1-0.b.3jpp.noarch.rpm .
> rpm -U javamail-1 (See http://ail-1.ora-code.com).3.1-1jpp.noarch.rpm .
> rpm -U xml-commons-1 (See http://ons-1.ora-code.com).0-0.b2.6jpp.noarch.rpm
> rpm -U xml-commons-apis-1 (See http://pis-1.ora-code.com).0-0.b2.6jpp.noarch.rpm
> rpm -U xerces-j2-2.4.0-3jpp.noarch.rpm          
> rpm -U ant-1 (See http://ant-1.ora-code.com).5.4-2jpp.noarch.rpm      
> rpm -U xalan-j2-2.5.1-1jpp.noarch.rpm
> rpm -U mx4j-1.1.1-5jpp.noarch.rpm
> rpm -U regexp-1 (See http://exp-1.ora-code.com).3-1jpp.noarch.rpm
> rpm -U servletapi4-4.0.4-3jpp.noarch.rpm
> rpm -U jakarta-commons-collections-2 (See http://ons-2.ora-code.com).1-4jpp.noarch.rpm
> rpm -U jakarta-commons-logging-1 (See http://ing-1.ora-code.com).0.3-4jpp.noarch.rpm
> rpm -U jakarta-commons-beanutils-1 (See http://ils-1.ora-code.com).6.1-4jpp.noarch.rpm
> rpm -U jakarta-commons-daemon-1 (See http://mon-1.ora-code.com).0.cvs20030227-6jpp.noarch.rpm
> rpm -U jakarta-commons-pool-1 (See http://ool-1.ora-code.com).0.1-5jpp.noarch.rpm
> rpm -U jakarta-commons-dbcp-1 (See http://bcp-1.ora-code.com).0-4jpp.noarch.rpm  
> rpm -U jakarta-commons-digester-1 (See http://ter-1.ora-code.com).5-3jpp.noarch.rpm
> rpm -U jakarta-commons-fileupload-1 (See http://oad-1.ora-code.com).0-1jpp.noarch.rpm
> rpm -U jakarta-commons-modeler-1 (See http://ler-1.ora-code.com).1-2jpp.noarch.rpm  
> rpm -U tyrex-1 (See http://rex-1.ora-code.com).0-3jpp.noarch.rpm        
> rpm -U tomcat4-4.1.27-2jpp.noarch.rpm
> exit

Note that for the older JVM versions, these may be
installed immediately before the Tomcat4-4.1.27-2jpp
RPM in sequence:

> rpm -U jaas-ext-1 (See http://ext-1.ora-code.com).0.1-2jpp.noarch.rpm .
> rpm -U jdbc-stdext-ext-2 (See http://ext-2.ora-code.com).0-12jpp.noarch.rpm .
> rpm -U jndi-ext-1 (See http://ext-1.ora-code.com).2.1-10jpp.noarch.rpm .
> rpm -U jsse-ext-1 (See http://ext-1.ora-code.com).0.3.02-5jpp.noarch.rpm
> rpm -U oro-2 (See http://oro-2.ora-code.com).0.7-1jpp.noarch.rpm
> rpm -U ldapjdk-4 (See http://jdk-4.ora-code.com).1-5jpp.noarch.rpm

-- ---- ---- --

Here are a few other notes about this Jpackage RPM
installation:

Java JVM/JRE components can be found in /usr/lib/jvm. Other
Jpackage Java library JARs and their alias links live in
/usr/share/java.

As with most Linux system RPMs, Jpackage also adds links
to the JVM/JRE executable in /usr/bin. The installation of
the JVM, compiler, and tools can be checked using the
following and similar commands:

> /usr/bin/java -version

Remember to also validate your user PATH settings to these!

Jpackage tends to make heavy use of the /etc/java/java.conf
setup. That is a good place to look for any Java environment
issues, (i.e. JAVA_HOME settings).

The Tomcat installation now lives in /usr/share/tomcat4
instead of the old /var/tomcat4. As before, most of the
real directories are scattered around in /etc/tomcat4,
/var/lib/tomcat4, /var/cache/tomcat4, and /var/log/tomcat4.

As with the old Tomcat 4.1.24 RPMs, the Jpackage RPMs use
the /etc/tomcat4/tomcat4.conf configuration file. Because
Jpackage assumes a homogenous RPM installation, this file
is slightly modified over the old RPM version. Note that
CATALINA_TMPDIR is explicitly set, so that can cause some
issues if CATALINA_BASE is being used and the
/usr/bin/dtomcat4 script is being used to launch Tomcat.

Believe it or not, this Jpackage install "just worked" for
for us!


©2008 junlu.com - Jax Systems, LLC, U.S.A.