private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
Using the Jetty RPMs
Overview
RPM (RedHat Package Manager) is a popular way of distributing applications on RedHat Linux Derived Distros. Here is a step on how to make a RPM package for Jetty6,
Note: this one is only for RedHat Based Distros like CentOS, Feodora, Redhat and etc, as for Debian Based distros like Ubunto deb packages will be comming soon
The steps to use RPMS are
- Obtain the Jetty RPMs. These are build and distributed with each Jetty release since 6.1.5. You can also build the jetty RPMS from source.
- Install the prerequisits RPMs and packages (eg java and ant).
- Install the Jetty RPMs.
- Configure and run
Installing web applications
once your jetty6 rpm is installed you can deploy your webapps at /var/jetty6/webapps
Starting and Stopping Jetty
The jetty start script is installed in /etc/init.d and linked to the /etc/rc3.d directory so that it is started at boot time. It can also be manually started and stopped:
Starting Jetty
sudo service jetty start
stopping Jetty
sudo service jetty stop
Jetty Logs
- jetty logs are found at /var/log/jetty6
- you can view the logs on runtime by using tail -f, this will enable you to view the logs, on realtime
tail -f yourjetty.log
Jetty RPM File Structures
jetty6-6.1-*.noarch.rpm - Jetty RPM Package
Requires: jetty6-lib
Output Files:
- /etc/init.d/jetty - Jetty6 Startup Script for Redhat Based Linux Service Daemon, this file is added in chkconfig so that this will automatically start jetty as a service
- jetty-home (located at /usr/share/jetty6) - contains start.jar, Licences, README.txt, resources and VERSIONS.txt
- jetty-conf (located at /etc/jetty6) - contains jetty configuration files
- /etc/jetty6/contexts - where you will add your contexts
- jetty-webapps (located at /var/jetty6/webapps) - where you will deploy your web-applications
- jetty-logs (located at /var/log/jetty6) - where log files are located
jetty6-lib-6.1-*.noarch.rpm - Jetty Library RPM Package
Requires: jetty6-jsp-2.0-api, jetty6-jsp-2.1-api and jetty6-servlet-2.1-api, mx4j >= 3.0
Output Files:
- jetty6-lib (located at /usr/share/java/jetty6-lib) - jetty jar libraries namely, jetty, jetty-util annotations, jetty-management, jetty-setuid and libsetuid.so
jetty6-jsp-2.0-api-6.1-*.noarch.rpm - Jetty JSP 2.0 API RPM Package
Requires: jakarta-commons-el, xerces-j2, ant
Output Files:
- /usr/share/java/jetty6-jsp-2.0-api - jsp 2.0 jar libraries and other libraries
jetty6-jsp-2.1-api-6.1-*.noarch.rpm - Jetty JSP 2.1 API RPM Package
Requires: ant
Output Files:
- /usr/share/java/jetty6-jsp-2.1-api - jsp 2.1 jar libraries and other libraries
jetty6-servlet-2.5-api-6.1-*.noarch.rpm - Jetty Servlet 2.5 API RPM Package
Requires: none
Output Files:
- /usr/share/java/jetty6-servlet-2.5-api - contains servlet 2.5 jar library
jetty6-samples-6.1-*.noarch.rpm - Jetty Samples RPM Package
Requires: jetty
Output Files:
- installs sample web-app in /var/jetty6/webapps, namely: test and test-jaas sample web-apps