Let SVN service start automatically with Windows

Source: Internet
Author: User



Previous svnserve to become a Windows service, you must rely on Svnservice or other tools. Starting with Subversion1.4, subversion itself integrates the tools of Windows services. Set SVN as a way for system services to run automatically: in Windows NT (including Windows XP, Windows $, Windows 2003 Server,windows7) itself contains a tool for installing services called "service Control ", also known as Sc.exe. For example, my subversion is installed in "C:\subversion", the Repository is "D:\svn_repository", and I want the corresponding subversion service named Svnservice, the command to install this SVN service can be written like this: SC Create Svnservice binpath= "C:\subversion\bin\svnserve.exe--service-r D:\svn_repository" displayname= "Svnservice" depend= tcpipstart= Auto
In the above command, if "start= auto" is missing, the installed service does not start with Windows startup. If there is a problem with the service installation, you may need to remove the service. To delete the previously added service, just run "SC delete svnservice" and "Svnservice" is the name we used when we created the service. Note that because it is easy to see, the above command is divided into multiple lines, but should be written in one line when it is actually executed. In addition, the "-d" option, which is the daemon mode, cannot be used in the previous boot Svnserve, which causes the service to fail to start. Similarly, the "-I" and "-T" options are not available. (Note: The cmd command runs with "Run as Administrator")
After the command-line window finishes executing this command, the service is not started and you can continue running net start Svnservice to start the service (the command "net stop Svnservice" can stop the service).
There are two additional points that need to be handled with care. First, if the path includes spaces, be sure to use "\" Processing "" ", for example, if Svnserve.exe in" C:\Program files\subversion\ ", the entire command is as follows: SC create Svnservice Binpath= "\" C:\Program files\subversion\bin\svnserve.exe\ "--service-r D:\svn_repository" displayname= "Svnservice" depend= Tcpip start= Auto Second, SC has requirements for the format of options, such as "depend= Tcpip" cannot be written as "depend = Tcpip" or "Depend=tcpip", that is, "=" can not be empty before, and there must be spaces behind. Previous svnserve to become a Windows service, you must rely on Svnservice or other tools. Starting with Subversion1.4, subversion itself integrates the tools of Windows services. Set SVN as a way for system services to run automatically: in Windows NT (including Windows XP, Windows $, Windows 2003 Server,windows7) itself contains a tool for installing services called "service Control ", also known as Sc.exe. For example, my subversion is installed in "C:\subversion", the Repository is "D:\svn_repository", and I want the corresponding subversion service named Svnservice, the command to install this SVN service can be written like this: SC Create Svnservice binpath= "C:\subversion\bin\svnserve.exe--service-r D:\svn_repository" displayname= "Svnservice" depend= tcpipstart= Auto
In the above command, if "start= auto" is missing, the installed service does not start with Windows startup. If there is a problem with the service installation, you may need to remove the service. To delete the previously added service, just run "SC delete svnservice" and "Svnservice" is the name we used when we created the service. Note that because it is easy to see, the above command is divided into multiple lines, but should be written in one line when it is actually executed. In addition, the "-d" option, which is the daemon mode, cannot be used in the previous boot Svnserve, which causes the service to fail to start. Similarly, the "-I" and "-T" options are not available. (Note: The cmd command runs with "Run as Administrator")
After the command-line window finishes executing this command, the service is not started and you can continue running net start Svnservice to start the service (the command "net stop Svnservice" can stop the service).
There are two additional points that need to be handled with care. First, if the path includes spaces, be sure to use "\" Processing "" ", for example, if Svnserve.exe in" C:\Program files\subversion\ ", the entire command is as follows: SC create Svnservice Binpath= "\" C:\Program files\subversion\bin\svnserve.exe\ "--service-r D:\svn_repository" displayname= "Svnservice" depend= Tcpip start= Auto Second, SC has requirements for the format of options, such as "depend= Tcpip" cannot be written as "depend = Tcpip" or "Depend=tcpip", that is, "=" can not be empty before, and there must be spaces behind.

Let SVN service start automatically with Windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.