Hébergement à Haute Disponibilité,
Performant et Sécuritaire
Configuring the svnserve daemon

The svnserve program is a lightweight, standalone server for subversion. To run svnserve on our servers, you need a Hôte-Standard, Hôte-Avancé or Hôte-Corporatif package. The daemon must be configured to listen on your assigned v-host IP address.

Creating the repositories

If you have not created any subversion repositories yet, you can create one with svnadmin:

  $ svnadmin create ~/my-repository
Tweaking svnserve.conf

Open up and edit the svnserve.conf file located in the $HOME/my-repo/conf/ directory.

  #
  # Sample $HOME/my-repo/conf/svnserve.conf
  #
  [general]
  
  # Path to the file containing svn users and passwords.
  password-db = $HOME/my-repo/conf/passwd
  
  # Authentication realm of the repository. Two repositories using the
  # same password-db should have the same realm.
  realm = My-test-repository
  
  # Deny all anonymous access
  anon-access = none
  
  # Grant authenticated users read and write privileges
  auth-access = write
Setting up password authentication

Open up and edit the password-db file (ie. $HOME/my-repo/conf/passwd). A sample entry might look like this:

  [users]
  user1 = password1
  user2 = password2
Starting up the server

Run the server by invoking svnserve with the -d switch (daemon mode) and --listen-host 1.2.3.4 (substituting 1.2.3.4 for your v-host IP address).

  $ svnserve -d --listen-host 1.2.3.4 -r $HOME/my-repo

To ensure that your svnserve gets started whenever the server is booted, you must add a @reboot line to your crontab. Use the crontab -e command to bring up your crontab in your favorite text editor and add the following line:

  @reboot svnserve -d --listen-host 1.2.3.4 -r $HOME/my-repo
Testing the server

To test the server's functionality, you can create a working copy of your repository using your shell. The checkout command will create a working copy of the repository:

  $ svn co svn://your-domain.com/$HOME/my-repo my-working-dir
  $ cd my-working-dir
  $ echo "foo bar" > test-file
  $ svn add test-file
  $ svn remove test-file
  $ svn commit
Opening up to the external world

Finally, contact tech support, and request that we allow connections to the port 3690 of your v-host.

You can request specific limits on the number of concurrent connections, limits on connection rates or alternate TCP timeout values you want to use for svnserve connections. It is also possible to restrict svnserve connections to a set of static IP addresses.

Links


  Contre les brevets logiciels!