Thursday, August 1, 2013

SVN Configuration using svnserve on Fedora 17

SVN Server Configuration

1. Create repository

Login as a root user

svnadmin create repo
This will create repo dir
ll repo/

total 24
drwxr-xr-x. 2 root root 4096 Aug  1 16:32 conf
drwxr-sr-x. 6 root root 4096 Aug  1 15:07 db
-r--r--r--. 1 root root    2 Aug  1 14:34 format
drwxr-xr-x. 2 root root 4096 Aug  1 14:34 hooks
drwxr-xr-x. 2 root root 4096 Aug  1 14:34 locks
-rw-r--r--. 1 root root  229 Aug  1 14:34 README.txt

cd repo

2. Edit repo/conf/passwd file

vi repo/conf/passwd
Add below lines:

[users]
user1 = user1

left to the assignment is a username & right is a password

3. Edit repo/conf/authz file

vi repo/conf/authz
Add below lines:

[/]
User1 = rw

It will give user1 read & write permissions.

4. Edit repo/conf/svnserve.conf file

vi repo/conf/svnserve.conf
Add following lines:

anon-access = none
auth-access = write
password-db = passwd
authz-db = authz

5. Check the status of svnserve daemon
/etc/init.d/svnserve status
If it is inactive use:
/etc/init.d/svnserve start
Again check the status, if it is running it will show

/etc/init.d/svnserve status
svnserve.service - LSB: start and stop the svnserve daemon
          Loaded: loaded (/etc/rc.d/init.d/svnserve)
          Active: active (running) since Thu, 01 Aug 2013 12:14:27 +0530; 2h 19min ago
         Process: 1655 ExecStart=/etc/rc.d/init.d/svnserve start (code=exited, status=0/SUCCESS)
        Main PID: 1658 (svnserve)
          CGroup: name=systemd:/system/svnserve.service
                  â 1658 /usr/bin/svnserve --daemon --pid-file=/var/run/svnserve.pid

Now, your SVN server is ready. J

Client Configuration

1. SVN checkout
Login as a normal user
svn co svn://203.124.15.24/root/repo/ {REPOSITORY_FOLDER_NAME / PATH}


This will create the repo dir & sub_dirs.

You are ready to use SVN. J