Skip to content

Instantly share code, notes, and snippets.

@ViniFKroth
Last active September 26, 2018 16:29
Show Gist options
  • Select an option

  • Save ViniFKroth/ad76e8a1b2157f88751a918be55e458f to your computer and use it in GitHub Desktop.

Select an option

Save ViniFKroth/ad76e8a1b2157f88751a918be55e458f to your computer and use it in GitHub Desktop.
Fisrt things first, we need to install Jetty using the commands below:
wget -c http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.3.12.v20160915/jetty-distribution-9.3.12.v20160915.tar.gz
tar xzf jetty-distribution-9.3.12.v20160915.tar.gz
mv jetty-distribution-9.3.12.v20160915 jetty9
sudo mv jetty9 /opt
then, we configure the jetty acording to our desired settings
sudo addgroup --quiet --system jetty
sudo adduser --quiet --system --ingroup jetty --no-create-home --disabled-password jetty
sudo usermod -c "Jetty 9" -d /opt/jetty9 -g jetty jetty
sudo chown -R jetty:jetty /opt/jetty9
sudo chmod u=rwx,g=rxs,o= /opt/jetty9
Finally, all we needed to do was to put our .war file in the opt/jetty9/webapps/ directory,
and use the following commands to run the the server on the 8080 port:
cd opt/jetty9
sudo java -jar start.jar
and then your application should be running in localhost:8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment