The previous svnserve must depend on svnservice or other tools to become a Windows service. From subversion1.4, subversion itself is integrated with a Windows service tool.
1. Install svnservice
In Windows NT (including Windows XP, Windows 2000, Windows 2003)
Server) itself contains a tool to install the service, called "service control", also known as SC .exe.
For example, if my subversion is installed in "D: Subversion", the version library is in "D: svnroot", and I want the corresponding subversion service name to be svnservice, the command for installing the svn service can be written as follows:
SC create svnservice
Binpath = "D: subversionbinsvnserve.exe
-- Service-r d: svnroot"
Displayname = "svnservice"
Depend =
Tcpip
Note that the preceding command is divided into multiple lines, but it should be in one line during actual execution. In addition, the "-d" option, that is, the daemon mode, is used when svnserve is started previously. It cannot be used here, and the service cannot be started. Similarly, the "-I" and "-T" options cannot be used.
After the command is executed in the command line window, the service has not been started. You can continue to run "Net start svnservice" to start the service, and then use "net stop
Svnservice "stops the service.
There are two other points to be handled with caution. First,If the path contains spaces, use "" to process"In this example, if svnserve.exe
In filessubversion, the command should be written as "binpath =" "C: Program
Filessubversionbinsvnserve.exe "" ("" In the content), the entire command is as follows, the red part is changed:
SC create svnservice
Binpath ="" D: Program
Filessubversionbinsvnserve.exe"-- Service-r d: svnroot"
Displayname = "svnservice"
Depend = TCPIP
Second, SC has requirements on the option format. For example, "depend = TCPIP" cannot be written as "depend =
Tcpip "or" depend = TCPIP ", that is, there must be spaces before" =.
2. delete a service
If there is a problem with the service installation, you may need to delete the service. To delete the previously added service, you only need to run "SC Delete
Svnservice "," svnservice "is the name we use when creating a service.
3. The configuration service is automatically started.
By default, the installed Service will not start with windows. To enable the svn service to start with windows, modify SC
Create "command (Delete first) and add the" Start = auto "option:
SC create svnservice
Binpath = "D: subversionbinsvnserve.exe
-- Service-r d: svnroot"
Displayname = "svnservice"
Depend =
Tcpip
Start = auto
Of course, you can also use graphical tools to modify Service Attributes. You can run "services. msc" in "start-> Run..." And then modify the Service Attributes on the interface.