How to install the Java server in CentOS 7 jetty

Source: Internet
Author: User
Tags centos centos server

Typically, in a larger network framework, jetty is often used for communication between devices, while other Web servers typically deliver file:D to "humans." Jetty is a free open source project for the Eclipse Foundation. This Web server is used for Apache ActiveMQ, Alfresco, Apache Geronimo, Apache Maven, Apache Spark, Google App Engine, Eclipse, FUSE, Twitte R's streaming API and Zimbra.

This article describes ' How to install a jetty server in a CentOS server '.

First we need to install the JDK with the following command:

The code is as follows Copy Code
Yum-y Install JAVA-1.7.0-OPENJDK wget



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

The code is as follows Copy Code
wget http://download.eclipse.org/jetty/stable-9/dist/jetty-distribution-9.2.5.v20141112.tar.gz



Extract and move downloaded packages to/OPT:

The code is as follows Copy Code
Tar zxvf jetty-distribution-9.2.5.v20141112.tar.gz-c/opt/



Rename the folder named Jetty:

The code is as follows Copy Code
mv/opt/jetty-distribution-9.2.5.v20141112//opt/jetty



Create a jetty User:

The code is as follows Copy Code
Useradd-m Jetty



Change the owning user of the Jetty folder:

The code is as follows Copy Code
Chown-r jetty:jetty/opt/jetty/



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

The code is as follows Copy Code
Ln-s/opt/jetty/bin/jetty.sh/etc/init.d/jetty



To add a script:

The code is as follows Copy Code
Chkconfig--add Jetty



Jetty is started when the system starts:

The code is as follows Copy Code
Chkconfig--level 345 Jetty on



Use your favorite text editor to open the/etc/default/jetty and modify the port and listener address:

The code is as follows Copy Code
Vi/etc/default/jetty

Jetty_home=/opt/jetty
Jetty_user=jetty
jetty_port=8080
jetty_host=50.116.24.78
jetty_logs=/opt/jetty/logs/



* We have completed the installation, now we can start the jetty service *

The code is as follows Copy Code
Service Jetty Start



It's done!

Now you can access the http://< your IP address >:8080

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.