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, and Windows 2003 Server), a tool for installing services is included, which is called "Service Control" and also supports SC .exe.
For example, if my Subversion is installed in "D: \ Subversion" and the version library is in "D: \ svnroot", 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: \ Subversion \ bin \ svnserve.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 stop the service using "net stop svnservice.
There are two other points to be handled with caution. First, if the path contains spaces, you must use "\" to process the "signature number. If svnserve.exe is in" c: \ program files \ subversion, the command should be written as "binpath =" \ "c: \ program files \ subversion \ bin \ svnserve.exe \" (Content in ""). The entire command is as follows, the red part is the changed part:
SC create svnservice
Binpath = "\" D: \ program files \ Subversion \ bin \ svnserve.exe \ "-- service-r D: \ svnroot"
Displayname = "SVNService"
Depend = Tcpip
SC also requires 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, Run "SC delete svnservice". "svnservice" is the name we used when creating the 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, you need to modify the "SC create" command (Delete first ), add the "start = auto" option:
SC create svnservice
Binpath = "D: \ Subversion \ bin \ svnserve.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.