Running svnserve
Now that svnserve is installed, you need it running
on your server. The simplest approach is to run the following from a DOS
shell or create a windows shortcut:
svnserve.exe --daemon
svnserve will now start waiting for incoming requests
on port 3690. The --daemon switch tells svnserve to run
as a daemon process, so it will always exist until it is manually terminated.
If you have not yet created a repository, follow the
instructions given with the Apache server setup
the section called “Configuration”.
To test that svnserve is working, use
→
to view a repository.
Assuming your repository is located in
c:\repos\TestRepo , and your server is called
localhost , enter:
svn://localhost/repos/TestRepo
when prompted by the repo browser.
You can also increase security and save time entering URLs with
svnserve by using the --root switch to set the root
location and restrict access to a specified directory on the server:
svnserve.exe --daemon --root drive:\path\to\repository\root
Using the previous test as a guide, svnserve would now run as:
svnserve.exe --daemon --root c:\repos
And in TortoiseSVN our repo-browser URL is now shortened to:
svn://localhost/TestRepo
Note that the --root switch is also needed if your repository is located
on a different partition or drive than the location of svnserve
on your server.
Svnserve will service any number of repositories. Just locate them somewhere
below the root folder you just defined, and access them using a URL relative
to that root.
Run svnserve as a Service
Running svnserve as a user is usually not the best way.
It means always having a user logged in on your server,
and remembering to restart it after a reboot. A better way is to run
svnserve as a windows service. Starting with Subversion 1.4,
svnserve can be installed as a native windows service.
To install svnserve as a native windows service, execute the following
command all on one line to create a service which is automatically
started when windows starts.
sc create svnserve binpath= "c:\svnserve\svnserve.exe --service
--root c:\repos" displayname= "Subversion" depend= tcpip
start= auto
If any of the paths include spaces, you have to use (escaped) quotes
around the path, like this:
sc create svnserve binpath= "
\"C:\Program Files\Subversion\bin\svnserve.exe\"
--service --root c:\repos" displayname= "Subversion"
depend= tcpip start= auto
You can also add a description after creating the service. This
will show up in the Windows Services Manager.
sc description svnserve "Subversion server (svnserve)"
Note the rather unusual command line format used by sc .
In the key= value pairs there must be no space between
the key and the = but there must be a space before the
value.
|
댓글을 달아 주세요