Install the latest Jetty 9 on Ubuntu 12.04 - lifuzu/cafe GitHub Wiki
- Download the latest Jetty package from: http://download.eclipse.org/jetty/stable-9/dist/;
- 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
- 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
- Create jetty user:
sudo useradd jetty -U -s /bin/false
- Change jetty folder to jetty user:
sudo chown -R jetty:jetty /usr/local/jetty
- Let jetty automatically start on reboot execute:
sudo update-rc.d jetty defaults
- Start jetty service:
sudo service jetty start
- 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}
- Open the following URL in browser to verify the installation:
http://localhost:8080
###References: