windows下面使用nssm設定新的服務實現開機自啟等

來源:互聯網
上載者:User

標籤:

1.下載:

  http://nssm.cc/download/?page=download

2.解壓:

  根據自己的系統選擇相應的32bit或者64bit,然後將相應的可執行檔拷貝到系統內容中。配置環境變數;

3.配置:

  cmd命令列模式下,進入到nssm的目錄或者直接運行下面的命令:

    nssm install NodeJS

  (NodeJS為測試環境下面的安裝的服務名稱,該測試案例是node程式)

  在Path 中選擇你安裝的node.exe,Startup directory 選擇你的node應用的目錄,Argument輸入你的開機檔案,例如在我案頭上運行index.js (在Startup directory目錄執行node index.js ):

 

     選擇install service。即可成功安裝。預設是自動啟動,即開機自啟。

4.啟動服務:

  net start NodeJS

  完美啟動哦

 

參考:https://cnodejs.org/topic/50a5aee6637ffa4155f30dfc

   http://my.oschina.net/u/1582119/blog/316069

windows下面使用nssm設定新的服務實現開機自啟等

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.