Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Im trying to setup SVN on a VPS, Windows 2003.

Everything works fine when I run the follow on the server

svnserve --daemon -r c:\current\svn\twipler

and from Windows client (with tourtoise) svn://twipler.com works fine.

However, if I close the command line/log off from remote desktop the service stops and the client stops working.

So I've tried setting this up as a service using the following command;

C:\Program Files (x86)\Subversion\bin>sc create SVN binpath="\"c:\Program Files
(x86)\Subversion\bin\svnserve.exe\" --service -r c:\current\svn\twipler" display
name="SVN Service" depends=tcpip

Which returns the SC help text;

DESCRIPTION:
     Creates a service entry in the registry and Service Database.
USAGE:
    sc <server> create [service name] [binPath= ] <option1> <option2>...

OPTIONS:
    ....

But it does not setup the service! I've tried a few combinations etc but with no joy!

update
Im also doing

svnservice -install --daemon --root c:\current\svn\twipler

which after 10 seconds or so, pops up an alert saying

Cannot start service from the command line or a debugger. A Windows Service must first be installed (using installutil.exe) and the started with the ServerExplorer, Windows Services Administrative tool or the NET START command.

I can't find installutil and am lost! Also "whoami" is CT17220\administrator

share|improve this question

2 Answers 2

up vote 6 down vote accepted

Your SC command-line syntax is wrong:

sc create SVN binpath= "\"c:\Program Files(x86)\Subversion\bin\svnserve.exe\" --service -r c:\current\svn\twipler" displayname= "SVN Service" depend= tcpip

SC is dumb and needs spaces after the "=" signs. Don't ask me why. Also, you had "depends" instead of "depend".

share|improve this answer
    
Yes! This works. Im just sorry I don't have the rep' to upvote [have 3K+ on SO]. Many many thanks! (also you missed a space before (x86) but I figured that)... thanks again! –  Ian Quigley Jul 18 '09 at 7:24
    
Ahh, crap. Good catch. –  Evan Anderson Jul 18 '09 at 9:11
    
+1 finally have some rep! –  Ian Quigley Jan 29 '10 at 22:03

You need to do

svnservice -install --daemon --root "C:\Documents and Settings\Subversion Repository"

At some point.

I followed these directions and didn't have much trouble.

http://blogs.vertigosoftware.com/teamsystem/archive/2006/01/16/Setting_up_a_Subversion_Server_under_Windows.aspx

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.