How To Install Jetty on Debian 9 Stretch

Install Jetty on Debian 9 Stretch

In this tutorial we will show you how to install Jetty on Debian 9 Stretch. For those of you who didn’t know, 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 and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Jetty webserver on a Debian 9 (Stretch) server.

Install Jetty on Debian 9 Stretch

Step 1. Before we install any software, it’s important to make sure your system is up to date by running these following apt-get commands in the terminal:

Step 2. Installing Java via PPA on Debian 9.

Add the Webupd8 Team PPA repository, run the following commands on your server:

Then, install JDK8 with the following command:

Step 3. Installing Jetty on Debian 9.

First, install some modules that are required by Jetty with the following command:

Next, download latest version of jetty:

We will create a user and group named jetty. First, create the group first:

Change ownership of /opt/jetty directory to user jetty and group jetty:

Next, Symlink the script to the /etc/init.d/ directory to create a startup script file:

Then, add the following information in /etc/default/jetty, replace port and listening address with your value:

Step 4. Access the Jetty Installation.

The Jetty web server runs on port 8080. To access your Jetty installation, you will need to type the following URL in your web browser: http://your-ip-address:8080/

Congratulation’s! You have successfully installed Jetty. Thanks for using this tutorial for installing the latest version of the Jetty webserver on Debian 9 server. For additional help or useful information, we recommend you to check the official Jetty website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get a best deal!