將svn註冊為windows系統服務

2021-05-27 08:36:33 字數 1253 閱讀 5741

安裝svn後,可以在dos下啟動,但是開啟的視窗不能關閉,否則svn的伺服器就會停止。

我們可以將svn註冊為windows服務,這樣當機器啟動的時候,svn將啟動。

首先:1.我的svn安裝路徑為:c:\program files\subversion

2.我的svn的版本庫安裝路徑為:e:\svn\repository

3.開始——執行——在dos下輸入以下內容回車:

sc create svnserver binpath= "c:\program files\subversion\bin\svnserve.exe --service -r e:\svn\repository" displayname=  "subversion"  depend= tcpip  start= auto

如果出現success提示,表示註冊成功,這個時候可以在:我的電腦——管理——服務和應用程式——服務中看到我們註冊的服務,名稱為「svnserver」.

如果出現下面的內容:

1. creates a service entry in the registry and service database.   

2. syntax:   

3. sc create [service name] [binpath= ] ...   

4. create options:   

5. note: the option name includes the equal sign.   

6.  type= 

7.        (default = own)   

8.  start= 

9.        (default = demand)   

10.  error= 

11.        (default = normal)   

12.  binpath= 

13.  group= 

14.  tag= 

15.  depend= 

16.  obj= 

17.        (default = localsystem)   

18.  displayname= 

19.  password= 

則表示註冊沒有成功,原因是這個指令是key=value的格式,所有的key=後面都必須加乙個空格才可以,比如: depend=【請注意這裡是乙個空格】tcpip。

即window nt的 "sc"(server control)命令要求 引數以 「key=空格+value」的形式。

將tomcat註冊為windows服務

註冊方法 1.進入cmd,cd到tomcat的bin目錄下。2.在tomcat的bin目錄下可以看到有乙個service.bat的批處理檔案,這個檔案就是為我們將tomcat註冊成系統服務所用。有興趣的可以開啟看看批處理檔案裡面的內容。3.執行命令service.bat install 服務名 後面...

將svn服務註冊成windows服務

我的 svn安裝在 d subversion 倉庫放在d svndemo 下。下面是將svn註冊為window服務的步驟 1.輸入 cmd 回車 1.2.執行命令 sc create svn binpath d subversion bin svnserve.exe service r d svnd...

svn註冊windows服務

svn服務端在windows上安裝完成後,需要使用命令列啟動 通過如下方式可註冊為windows服務以便開啟自動啟動服務 sc create svnserve binpath d svn bin svnserve.exe service r d svnrepository start auto de...