Forked from franciscocpg/jetty-install-debian.sh
Last active
September 17, 2018 17:57
-
-
Save rodolfojnn/39dfcde74ec6bacd2b5a357b4cfc448c 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://archive.eclipse.org/jetty/9.3.3.v20150827/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 /etc/init.d/jetty start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment