In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to install a Jetty server on a CentOS system". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to install a Jetty server on a CentOS system.
Jetty is a pure Java HTTP (Web) server and Java Servlet container. Usually in a larger network framework, Jetty is often used for communication between devices, while other Web servers usually pass files to "humans": D. Jetty is a free open source project of the Eclipse Foundation. This Web server is used in Streaming API and Zimbra such as Apache ActiveMQ, Alfresco, Apache Geronimo, Apache Maven, Apache Spark, Google App Engine, Eclipse, FUSE, and Twitter.
This article describes how to install a Jetty server in a CentOS server.
First, we will install JDK with the following command:
The code is as follows:
Yum-y install java-1.7.0-openjdk wget
After JDK is installed, we can download the latest version of Jetty:
The code is as follows:
Wget http://download.eclipse.org/jetty/stable-9/dist/jetty-distribution-9.2.5.v20141112.tar.gz
Extract and move the downloaded package to / opt:
The code is as follows:
Tar zxvf jetty-distribution-9.2.5.v20141112.tar.gz-C / opt/
Rename the folder to jetty:
The code is as follows:
Mv / opt/jetty-distribution-9.2.5.v20141112/ / opt/jetty
Create a jetty user:
The code is as follows:
Useradd-m jetty
Change the user of the jetty folder:
The code is as follows:
Chown-R jetty:jetty / opt/jetty/
Create a soft link to / etc/init.d directory for jetty.sh to create a startup script file:
The code is as follows:
Ln-s / opt/jetty/bin/jetty.sh / etc/init.d/jetty
Add a script:
The code is as follows:
Chkconfig-add jetty
It is jetty that starts when the system starts:
The code is as follows:
Chkconfig-level 345 jetty on
Use your favorite text editor to open / etc/default/jetty and modify the port and listening address:
The code is as follows:
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, and now we can start the jetty service *
The code is as follows:
Service jetty start
It's done!
Now you can visit it in http://:8080
Thank you for your reading, the above is the content of "how to install Jetty server on CentOS system". After the study of this article, I believe you have a deeper understanding of how to install Jetty server on CentOS system, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.