My experience installing jetty 6.1.5 on centos5.
Java is already installed, there is a symlink /usr/java/jdk and
#java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
The older HOWTO is here:
http://rimuhosting.com/jetty.jspFirst, download and unzip jetty:
{
VERSION=6.1.5
cd /opt
if [ -e jetty ]; then
mv jetty jetty.old
fi
wget "http://dist.codehaus.org/jetty/jetty-$VERSION/jetty-$VERSION.zip"
unzip jetty-$VERSION.zip
ln -sf /opt/jetty-$VERSION /opt/jetty
adduser -s /sbin/nologin -d /opt/jetty jetty
chown -R jetty:jetty /opt/jetty
rm -rf /opt/jetty/logs
mkdir -p /var/log/jetty
ln -s /var/log/jetty /opt/jetty/logs
mv /opt/jetty/etc /etc/jetty
ln -s /etc/jetty /opt/jetty/etc
}Next, test that jetty runs correctly:
cd /opt/jetty
java -jar start.jar etc/jetty.xml
Jetty should start on port 8080, connect with your browser and check it out. If there are errors at this point, read them carefully. Hit
Ctrl-C to quit.
Next, we need to make jetty start up nicely as a service. It comes with a script, bin/jetty.sh Try:
/opt/jetty/bin/jetty.sh check
/opt/jetty/bin/jetty.sh start
Startup script (usually /etc/init.d/jetty):
#!/bin/shexec su - -c "/opt/jetty/bin/jetty.sh $1"
However, it really doesn't look like the developers intend for you to run jetty as non-root, or at least I can't figure out how. You can chmod -R root: /opt/jetty but…