把Jetty安裝成Windows NT服務

來源:互聯網
上載者:User
介紹

Win32 Wrapper, 讓Jetty以Windows NT 服務運行成為可能。
Win32Wrapper利用的是Java Service Wrapper, 請參看 http://wrapper.tanukisoftware.org

安裝成服務(in your /bin)
Jetty-Service.exe --install jetty-service.conf
或者
Jetty-Service.exe -i jetty-service.conf
以服務啟動Jetty(in your /bin)
Jetty-Service.exe --start jetty-service.conf
或者
Jetty-Service.exe -t jetty-service.conf

以服務停止Jetty

(in your /bin)
Jetty-Service.exe --stop jetty-service.conf
或者
Jetty-Service.exe -p jetty-service.conf

刪除服務Jetty(in your /bin)
Jetty-Service.exe --remove jetty-service.conf
或者
Jetty-Service.exe -r jetty-service.conf

注意:上面的應用程式Jetty-Service.exe必須以系統管理員身份執行,否則會失敗。在Vista,即使是系統管理員安裝也會失敗。出現錯誤'OpenSCManager failed'。下面是這個檔案的解決方案。這個會以管理員權限開啟一個命令視窗。

開始 | 所有程式 | 附件, 然後右鍵點擊"命令提示字元", 選擇"以系統管理員身份運行"。 配置Jetty服務

通過編輯/bin路徑下的jetty-service.conf檔案:

...
wrapper.app.parameter.1=../etc/jetty.xml
...

你可以選擇其它的jetty xml設定檔

例如:

...
wrapper.app.parameter.1=../etc/jetty-ajp.xml
...

你也可以通過如下格式指定多個設定檔:

wrapper.app.parameter.<parameter number>=<jetty xml configuration path>

例如:

...
wrapper.app.parameter.1=../etc/jetty.xml
wrapper.app.parameter.2=../etc/jetty-plus.xml
wrapper.app.parameter.3=../etc/jetty-ajp.xml
...

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.