Install multiple different jetty containers under the same server

Source: Internet
Author: User

First we will install the JDK with the following command:

Yum-y Install JAVA-1.7.0-OPENJDK wget (Installation of Oracle JDK)

After the JDK is installed, we can download the latest version of jetty:

wget http://download.eclipse.org/jetty/stable-9/dist/jetty-distribution-9.2.5.v20141112.tar.gz

Unzip and move the downloaded package to/OPT:

Tar zxvf jetty-distribution-9.2.5.v20141112.tar.gz-c/opt/

Rename the folder named Jetty:

mv/opt/jetty-distribution-9.2.5.v20141112//opt/jetty is where, if you want to create multiple jetty services, you must differentiate between different jetty service names, such as Jetty_pushmv/opt /jetty-distribution-9.2.5.v20141112/opt/jetty_push (provided that the above must also be decompressed once)

Create a jetty User:

Useradd-m jettyuseradd-m Jetty_push (username and service with the same name for easy administration)

To change the user who owns the jetty folder:

Chown-r Jetty:jetty/opt/jetty/chown-r Jetty_push:jetty_push/opt/jetty_push

Create a soft link to jetty.sh to/ETC/INIT.D directory to create a startup script file:

Ln-s/opt/jetty/bin/jetty.sh/etc/init.d/jettyln-s/opt/jetty_push/bin/jetty.sh/etc.init.d/jetty_push

To add a script:

Chkconfig--add Jetty Add Jetty_push at the same time

Jetty is started when the system starts:

Chkconfig--level 345 Jetty on

Use your favorite text editor to open the/opt/jetty/start.ini and modify the port and listening address:

The default is 8080 ports, you can give different services, modify the different ports

* We have completed the installation and can now start the jetty service *

Service Jetty Start

It's done!

Now you can http://< your IP address in the port: access the

That's it.

Note that the jetty service is the default system memory, that is, if you want to hot deployment (non-stop state), the system memory consumption will become more and more high, must stop the service, so that the memory will be freed, then replace the project, and then restart the service


Install multiple different jetty containers under the same server

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.