Installing the prerequisites / dependencies
The Jetty RPMs need some prerequisites such as java and ant. These may be included by hand or a tool like yum or up2date may be used.
There are differences between the distributions in the packaging, versioning and availability of these prerequisites and this page is only and indication of some install paths. The documentation for your distro is probably a better place to look. Good resources to read include:
Jetty RPM Dependency Structure
- jetty6-samples RPM: Requires: jetty6
- jetty6 RPM: Requires: jetty6-lib
- jetty6-lib RPM: Requires: jetty6-servlet-2.5-api and jetty6-jsp-2.1-api (optional) and jetty6-jsp-2.0-api (optional)
- jetty6-servlet-2.5-api RPM: Requires: none
- jetty6-jsp-2.0-api RPM: Requires jakarta-commons-el >= 1.0, xerces-j2 >= 2.6.2, ant >=1.6.5
- jetty6-jsp-2.1-api RPM: Requires: ant >= 1.6.5
- ant 1.6.5 RPM: Requires: crimson 1.1.3, xml-commons 1.3, xml-commons-jaxp-1.3 (these RPMs including ant can be found at jpackage repository)
Using Yum for dependencies
Yum is a tool that can find and install dependent RPMs and is used by some distributions like fedora.
First you will need to add JPackage Yum Repo so that 3rd party RPM Dependencies of Jetty can be automatically downloaded and installed, dependencies such as ant, crimson, xml-commons, and xml-commons-jaxp
Note: The http://jpackage.org site is a good source of java RPMs and information.
The dependencies can now be installed with yum commands:
Note it is also possible to create a local yum repository to hold the jetty
RPMs and then a single command can be used to load Jetty and it's dependencies (see below).
If yum (or similar) is not available, the dependencies may be installed manually:
- Download Required RPMs from JPackage Repository
- if there are problems downloading eachRPM file using the wget commands above, download each rpm from http://www.jpackage.org/browser/browse.php manually
- Install the downloaded RPMs
Java is also needed.
Jetty needs at least java 1.4, although java5.0 or greater is recommended.
Jetty may work with the gcj java supplied by default on some distros, but the configuration will need to be changed to avoid add NIO connectors. It is best to get a full jdk.
see http://jpackage.org/installation.php for some instructions on how to do this.
- installing Java 1.5 using yum, execute the code below
- setting up JAVA_HOME, on root account so that jetty will be able to find JAVA_HOME, in your /etc/profile.d/ add a file named java.sh containing the code below
- execute the code below to apply the newly created environment varialbles
Installing Jetty RPMs
The Jetty RPMs may be installed manually using rpm command or by creating a local yum repository that contains the jetty RPMs
- to manuall install jetty using rpm execute the code below
Using Yum to Install Jetty RPMs
- You need to Create a yum repository, so that your yum application could locate your Jetty RPM files, that it needs
- Create a local yum repository, add a repository configuration file in your /etc/yum.repos.d/jetty.repo containing the code below
- execute a createrepo command to add necessary files for your repository
- Jetty and its dependencies may then be installed with
- Optionally you cant install JSP 2.0 and JSP 2.1
- to install JSP 2.0 Jetty RPM execute the code below
- to install JSP 2.1 Jetty RPM execute the code below
Installing Jetty Sample
- Jetty Samples RPM Includes, Test and JNDI Test
- To install these files, you need to install jetty6-sampless RPM, execute the code below to install
- installing manually