There are a few different ways to run the svnserve program:
Run svnserve as a standalone daemon, listening for requests.
Have the Unix inetd daemon temporarily spawn svnserve whenever a request comes in on a certain port.
Have SSH invoke a temporary svnserve over an encrypted tunnel.
Run svnserve as a Microsoft Windows service.
The easiest option is to run svnserve as a standalone
“daemon” process. Use the
-d option for
$ svnserve -d $ # svnserve is now running, listening on port 3690
When running svnserve in
daemon mode, you can use the
--listen-host options to customize the
exact port and hostname to “bind” to.
Once we successfully start svnserve as explained previously, it makes
every repository on your system available to the network. A client
needs to specify an absolute path in the
repository URL. For example, if a repository is located at /var/svn/project1, a client would reach it
svn://host.example.com/var/svn/project1. To increase
security, you can pass the
-r option to svnserve, which restricts it to exporting
only repositories below that path. For example:
$ svnserve -d -r /var/svn ...
-r option effectively modifies the
location that the program treats as the root of the remote filesystem
space. Clients then use URLs that have that path portion removed from
them, leaving much shorter (and much less revealing) URLs:
$ svn checkout svn://host.example.com/project1 ...
If you want inetd