Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Jetty 9 on Ubuntu 14.10 Server

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to install Jetty 9 on Ubuntu 14.10 Server. It has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.

Jetty characteristics

Fully functional and standards-based

Open source and commercial

Flexible and scalable

Small footprint

Embeddable

Asynchronous support

Enterprise elastic expansion

Dual license for Apache and Eclipse

Prerequisites for installing Jetty 9 on ubuntu 14.10 server

Before installing the Jetty server, you need to install Java with the following command

Sudo apt-get install openjdk-8-jdk

Java will be installed to / usr/lib/jvm/java-8-openjdk-i386, and a symbolic link called java-8-openjdk-i386 will be created in this directory, and a symbolic link will be created accordingly under / usr/bin/java.

Now you need to download Jetty9 from here, and after the download is complete, you need to unzip it using the following command

$tar-xvf jetty-distribution-9.2.5.v20141112.tar.gz

This will extract it to jetty-distribution-9.2.5.v20141112, and you need to move the archive to / opt/jetty using the following command

$mv jetty-distribution-9.2.5.v20141112 / opt/jetty

You need to create a jetty user and set it as the owner of the / opt/jetty directory

Sudo useradd jetty-U-s / bin/falsesudo chown-R jetty:jetty / opt/jetty

Use the following command to copy the Jetty script to the startup directory so that it runs as a service

$cp / opt/jetty/bin/jetty.sh / etc/init.d/jetty

Now, you need to create the Jetty settings file using the following

Sudo vi / etc/default/jetty

Add the following lines

JAVA_HOME=/usr/bin/javaJETTY_HOME=/opt/jettyNO_START=0JETTY_ARGS=jetty.port=8085JETTY_HOST=0.0.0.0JETTY_USER=jetty

Save and exit the file

You need to start the Jetty service with the following command

Sudo service jetty start

You should see output similar to the following

Starting Jetty: OK Mon Nov 24 11:55:48 GMT 2014

If you see the following error

* * ERROR: JETTY_HOME not set, you need to set it or install in a standard location

You need to make sure that the correct Jetty home directory path is set in the / etc/default/jetty file, and you can use the following URL to test jetty.

Jetty should now be running on port 8085, open a browser and access the http:// server IP:8085, and you should see the Jetty screen.

Jetty service check

Use the following command to verify and check the configuration

Sudo service jetty check

Use the following command to enable Jetty to start automatically after restart

Sudo update-rc.d jetty defaults

Restart the server and test if Jetty starts automatically.

To check on which port Jetty is running, or if that port conflicts with other programs, you can run netstat-tln

Thank you for reading this article carefully. I hope the article "how to install Jetty 9 on Ubuntu 14.10 Server" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report