For those of you who didn’t know, Jetty is a pure Java-based HTTP (Web) server and Java Servlet container. Jetty is now often used for machine to machine communications, usually within larger software frameworks. Jetty is developed under open source license,part of Eclipse foundation. Jetty is also the server in open source projects such as Lift, Eucalyptus, Red5, Hadoop and I2P. Jetty supports the latest Java Servlet API (with JSP support) as well as protocols SPDY and WebSocket.
This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation Jetty on ubuntu 14.04.
Step 1. First of all we have to install java JDK.
sudo apt-get install openjdk-8-jdk
Step 2. Download the latest version of Jetty.
tar zxvf jetty-distribution-9.2.11.v20150529.tar.gz -C /opt/
Rename the file name to jetty:
mv /opt/jetty-distribution-9.2.11.v20150529/ /opt/jetty
Step 3. Create Jetty user to run jetty web server on system start-up.
adduser -r -m jetty
chown -R jetty:jetty /opt/jetty/
ln -s /opt/jetty/bin/jetty.sh jetty
chkconfig --add jetty
chkconfig --level 345 jetty on
Step 4. Jetty configuration file.
Add the following information in /etc/default/jetty, replace port and listening address with your value:
Step 5. Start Jetty web server.
You need to start jetty service using the following command:
sudo service jetty start
If all is well, you should see the standard Jetty splash page when you visit the following address in your browser http://your-ip-address:8080
Congratulation’s! You have successfully installed jetty. Thanks for using this tutorial for installing Jetty web server on ubuntu 14.04 systems.