One-click installation of Jetty on Debian7.2

Source: Internet
Author: User

First check the installed version: Debian 7.2

The rest came from the open-source sharing of @ huazai, a fellow who rarely made any improvements. I am sorry for your respect for rewriting.

First create an automatic installation script install. sh:
#! /Bin/bash
JETTY_VERSION = 7.6.12.v20130726
Wget requests
Tar xfz jetty-distribution-$JETTY_VERSION.tar.gz-C/opt
Ln-fs/opt/jetty-distribution-$ JETTY_VERSION/opt/jetty
Cp/opt/jetty/bin/jetty. sh/etc/init. d
The update-rc.d jetty. sh defaults.

I have never learned bash scripts, but I have to figure out the code.
#! In/bin/bash linux, the script file starts with this to point out the shell for interpreting the script. bash is used here.
Defines a variable JETTY_VERSION that specifies the jetty version to be downloaded and used.
Wget uses http or ftp protocol to download files from the Internet to the current directory
Tar decompress the file to the/opt directory
After the ln link is decompressed, go to/opt/jetty. If the target directory exists, delete it first.
Cp copies the jetty. sh file to the/etc/init. d directory.
The update-rc.d sets it to boot by default

Then add the execution permission to the document owner:

Sudo chmod u + x install. sh

Run:

Sudo./install. sh

OK. After a while, you 'd better restart your computer.

We access the IP address + port 8080 of the installation HOST: http: // 192.168.1.116: 8080/

The problems found are:
1. This method fails when a newer jetty version is used. Therefore, an old version is installed.
2. Debian6 and later versions use insserv to replace the update-rc.d and have more strict format requirements for the command script.

Jetty details: click here
Jetty's: click here

Recommended reading:

Use Jetty as an Embedded Server

Jetty source code analysis

Debian 7.0 Wheezy test experience

Debian 7.0 Wheezy released!

Install Debian 7.0 Wheezy on a USB flash drive

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.