Install the latest Jetty 9 on Ubuntu 12.04 - lifuzu/cafe GitHub Wiki

  1. Download the latest Jetty package from: http://download.eclipse.org/jetty/stable-9/dist/;
  2. Run the command:

cd /usr/local; sudo tar -zxf ~/Downloads/jetty-distribution-9*.gz; \   
sudo ln -s /usr/local/jetty-distribution-9* /usr/local/jetty; \
sudo cp /usr/local/jetty/bin/jetty.sh /etc/init.d/jetty
  1. Add jetty default configuration file: /etc/default/jetty as the below content:

JAVA_HOME=/usr/lib/jvm/java-7-sun
NO_START=0
JETTY_HOST=0.0.0.0
JETTY_USER=jetty
JETTY_ARGS=jetty.port=8080
JETTY_HOME=/usr/local/jetty
  1. Create jetty user:

sudo useradd jetty -U -s /bin/false
  1. Change jetty folder to jetty user:

sudo chown -R jetty:jetty /usr/local/jetty
  1. Let jetty automatically start on reboot execute:

sudo update-rc.d jetty defaults
  1. Start jetty service:

sudo service jetty start
  1. Check the jetty started at log file: /usr/local/jetty/logs/2013_05_23.stderrout.log, as:

2013-05-23 17:49:12.807:INFO:oejs.ServerConnector:main: Started ServerConnector@1589471a{HTTP/1.1}{0.0.0.0:8080}
  1. Open the following URL in browser to verify the installation:

http://localhost:8080

###References:

  1. http://pietervogelaar.nl/ubuntu-12-04-install-jetty-9/
  2. http://bugsdaily.com/java/how-to-install-jetty-web-server-on-ubuntu-12-04-lts.html
⚠️ **GitHub.com Fallback** ⚠️