Skip to content

Instantly share code, notes, and snippets.

@franciscocpg
Last active May 21, 2020 14:51
Show Gist options
  • Save franciscocpg/6160d8ac4192b64230c1 to your computer and use it in GitHub Desktop.
Save franciscocpg/6160d8ac4192b64230c1 to your computer and use it in GitHub Desktop.
Install jetty on debian
#!/bin/bash
# do in tmp
cd /tmp
JETTY_FILE='jetty-distribution-9.3.3.v20150827.tar.gz'
JETTY_FOLDER=${JETTY_FILE:0:-7}
# Download
wget http://download.eclipse.org/jetty/stable-9/dist/$JETTY_FILE
# Extract
sudo tar zxvf $JETTY_FILE -C /opt/
# Move
sudo mv /opt/$JETTY_FOLDER/ /opt/jetty
# Add user and create service
sudo addgroup --system jetty
sudo adduser --system --home /opt/jetty/ --ingroup jetty jetty
sudo chown -R jetty:jetty /opt/jetty/
sudo ln -s /opt/jetty/bin/jetty.sh /etc/init.d/jetty
# init config
sudo sh -c 'echo "JETTY_HOME=/opt/jetty
JETTY_USER=jetty
JETTY_PORT=8080
JETTY_HOST=127.0.0.1
JETTY_LOGS=/opt/jetty/logs/" > /etc/default/jetty'
sudo service jetty start
@franciscocpg
Copy link
Author

For remote install use

bash <(curl -s https://gist.githubusercontent.com/franciscocpg/6160d8ac4192b64230c1/raw/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment