[英]How to start and stop the Apple's Swift based productive server (program written by me) on Ubuntu linux?
我目前正在開發一個聊天程序,其中服務器為Ubuntu + Swift,客戶端為JavaScript + WebSocket。 最終,我達到了0.1版本,需要將其部署以供公眾使用。
我正在使用Ubuntu 16.04 LST租用虛擬雲服務器,並安裝了Swift 3和我開發的聊天服務器作為.swift
文件的集合。 我可以使用swift命令編譯並運行我的聊天服務器。 但是,一旦我關閉SSH連接,服務器就會停止。 是的,我明白為什么。
service squid start
然后如何service squid start
? 從哪兒開始? 我在互聯網上進行了很多搜索,但找不到任何示例或建議。 有什么幫助嗎? 先感謝您。
https://wiki.ubuntu.com/SystemdForUpstartUsers示例Systemd服務
/lib/systemd/system/foo.service:
[Unit]
Description=Job that runs the foo daemon
Documentation=man:foo(1)
[Service]
Type=forking
Environment=statedir=/path/to/swift/usr/lib
ExecStart=/path/to/swiftBinary
[Install]
WantedBy=multi-user.target
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.