Start new subversion (SVN) server

By neokrates, written on March 5, 2010

howto

  • Join date: 11-30-99
  • Posts: 224
View Counter:
  • 90 views
Rate it
Ad
Poll
  • Do you plan to migrate to new SCM?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext

You want to have a subversion repository?

Preconditions(Not explained, just short list)

1) you need to download subversion. Just grab the version for your system.
For now, there is good depot here: http://subversion.apache.org/packages.html

2) install the Subversion binary or distribution, apt-get or decompress the archive, depending on what OS you got.

Steps by step to setup and run svn server

I have windows, but that is similar for most systems.

svnserve is the binary for SVN server.

1

Make directory for to store the sources

Create a writable directory(permissions for user/group) for the subversion root.

I want mine in:

E:\programmer\environment\repository\REPO2

2

Let svn setup prepare the directory for use

Just execute svnadmin create with the parameter pointing to your repository directory.

E:\programmer\environment\SCM\svn-win32-1.5.4\bin>svnadmin create E:\programmer\environment\repository\REPO2

3

Tune permissions, add first user

Who and how will use your repository?

In my E:\programmer\environment\repository\REPO2\conf
I edit svnserve.cfg:

[general]
anon-access = read
auth-access = write
realm = My First Repository
password-db = passwd

and I add user in passwd:

[users]
neokrates=verysecretpassword

4

Start the server

My svn is in E:\programmer\environment\SCM\svn-win32-1.5.4.
I open windows command line(cmd) and go to bin directory.

Then, I type:

E:\programmer\environment\SCM\svn-win32-1.5.4\bin>svnserve -d --listen-port 8085 -r E:\programmer\environment\repository\REPO2

 
It says: I want new subversion repository with the source under E:\programmer\environment\repository\REPO2. svnserve should start in demon mode and it should listen to connections on 8085’er port.

5

Test it

If previous command did not complain or crash, go to you browser and type the url:
127.0.0.1:8085

It should give you something like:

( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries commit-revprops depth log-revprops partial-replay ) ) )

Done.

Notes

  • What is subversion root? The place subverion will store all sources.
  • What is writable? You start subverion under some user, usually the current user. This user must have the rights to read and write to the directory you want subverion to work with. To test it, go to that directory and try to create one file and then delete it. It should work. That is simple for windows but might be slightly more complicated for linux/unix. You might want to learn a bit about permissions for user/group) under unix to make it work
Be Sociable, Share!
 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: 0 (from 0 votes)
0 votes 'YES'  0 votes 'NO'


TAGS

SOCIAL
Be Sociable, Share!

INCOMING SEARCH TERMS


Leave a Reply