茫茫網海中的冷日 - 對這文章發表回應
茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1672872 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
IMG_60D_00049.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

對這文章發表回應

發表限制: 非會員 可以發表

發表者: 冷日 發表時間: 2016/10/19 4:00:03

Install Jetty Web Server On CentOS 7

By Jijo


Jetty is a pure Java-based HTTP (Web) server and Java Servlet container. Jetty is now often used for machine to machine communications, usually within larger software frameworks. But the other Web Servers are usually associated with serving documents to humans. Jetty is developed as a free and open source project as part of the Eclipse Foundation. The web server is used in products such as Apache ActiveMQ, Alfresco, Apache Geronimo, Apache Maven, Apache Spark, Google App Engine, Eclipse, FUSE, Twitter's Streaming API and Zimbra.

This article explains ‘How to install jetty web server in your CentOS server’.

First of all we have to install java JDK, By the following command:

yum -y install java-1.7.0-openjdk wget

After the JDK installation, We will download the latest version of Jetty:

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

Extract and move the the downloaded package to /opt:

tar zxvf jetty-distribution-9.2.5.v20141112.tar.gz -C /opt/

Rename the file name to jetty:

mv /opt/jetty-distribution-9.2.5.v20141112.tar.gz/ /opt/jetty

Create a user called jetty:

useradd -m jetty

Change the ownership of jetty:

chown -R jetty:jetty /opt/jetty/

Make a Symlink jetty.sh to /etc/init.d directory to create a start up script file:

ln -s /opt/jetty/bin/jetty.sh /etc/init.d/jetty

Add script:

chkconfig --add jetty

Make the jetty web server auto starts on system boot:

chkconfig --level 345 jetty on

Open /etc/default/jetty in your favorite editor and replace port and listening address desired value:

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 finished the installation, Now you have to start the jetty service.

service jetty start

All done!

Now you can access jetty web sever in http://:8080

That’s it!

Cheers!!

在CentOS 7中安裝Jetty服務器

編譯自: http://www.unixmen.com/install-jetty-web-server-centos-7/ 作者: Jijo
原創: LCTT
https://linux.cn/article-4792-1.html
譯者: geekpi
本文地址: https://linux.cn/article-4792-1.html

Jetty 是一款純Java的HTTP (Web) 服務器和Java Servlet容器。 通常在更大的網絡框架中,Jetty經常用於設備間的通信,而其他Web服務器通常給“人類”傳遞文件 :D。Jetty是一個Eclipse基金會的免費開源項目。這個Web服務器用於如Apache ActiveMQ、 Alfresco、 Apache Geronimo、 Apache Maven、 Apache Spark、Google App Engine、 Eclipse、 FUSE、 Twitter的 Streaming API 和 Zimbra中。

這篇文章會介紹‘如何在CentOS服務器中安裝Jetty服務器’。

首先我們要用下面的命令安裝JDK:


yum -y install java-1.7.0-openjdk wget

JDK安裝之後,我們就可以下載最新版本的Jetty了:


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

解壓並移動下載的包到/opt:


tar zxvf jetty-distribution-9.2.5.v20141112.tar.gz -C /opt/

重命名文件夾名為jetty:


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

創建一個jetty用戶:


useradd -m jetty

改變jetty文件夾的所屬用戶:


chown -R jetty:jetty /opt/jetty/

為jetty.sh創建一個軟鏈接到 /etc/init.d directory 來創建一個啟動腳本文件:


ln -s /opt/jetty/bin/jetty.sh /etc/init.d/jetty

添加腳本:


chkconfig --add jetty

是jetty在系統啟動時啟動:


chkconfig --level 345 jetty on

使用你最喜歡的文本編輯器打開 /etc/default/jetty 並修改端口和監聽地址:


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/

* 我們完成了安裝,現在可以啟動jetty服務了 *


service jetty start

完成了!

現在你可以在 http://<你的 IP 地址>:8080 中訪問了

就是這樣。

乾杯!!


via: http://www.unixmen.com/install-jetty-web-server-centos-7/

作者: Jijo 譯者: geekpi 校對: wxy

本文由 LCTT 原創翻譯, Linux中國 榮譽推出


原文出處: Install Jetty Web Server On CentOS 7 | Unixmen

原文出處: 在CentOS 7中安装Jetty服务器-系统运维|Linux.中国-开源社区
內容圖示
url email imgsrc image code quote
樣本
bold italic underline linethrough   












 [詳情...]
validation picture

注意事項:
預覽不需輸入認證碼,僅真正發送文章時才會檢查驗證碼。
認證碼有效期10分鐘,若輸入資料超過10分鐘,請您備份內容後,重新整理本頁並貼回您的內容,再輸入驗證碼送出。

選項

Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|