Last active
May 21, 2020 14:51
-
-
Save franciscocpg/6160d8ac4192b64230c1 to your computer and use it in GitHub Desktop.
Install jetty on debian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For remote install use
bash <(curl -s https://gist.githubusercontent.com/franciscocpg/6160d8ac4192b64230c1/raw/)