svn1

*Setup Subversion (svn) >>
*

Depends on your linux version use package managers
apt-get install subversion
or
yum install subversion

How can i create respository ?

Create a folder which you want to make as repository.

svnadmin create /path/to/folder

If you check the folder after this comment, you can see some files there viz
conf dav db format hooks locks README.txt

Your Repository is okay now. For more http://subversion.tigris.org/project_packages.html

How can i set a port and host for checkin/checkout and commit the project , simply add contents to respository ?

You can use svnserve for this purpose.

svnserve -d -r /path/to/repository

This will listen the default port 3690. You can access this repository via svn://hostname.com

You can use options –listen-port and –listen-host for changing the port and host .

Then the svn checkout action will be like this : svn checkout svn://host.example.com/project1

How can I set Authentication to this repository ??

You can see a conf directory in your repository folder. There you can see three files
authz, passwd, svnserve.conf

edit svnserve.conf

Uncomment the following for setting access control:

anon-access = read // This means anybody can read the repository (checkout)
auth-access = write // Only authorized member can write / update repository

anon-access = none // This means only authorized member can read the repository

* How can i set Access Control ? *

uncomment the following line

password-db = passwd

where userfile is the file which contains username and passwords for the repository

eg of passwd :

[users]
sajith = pass123
jilmon = mypassword
vivian = passworrd
balu = testpass

Then come to the last part of configuration file. It is

authz-db = authz (svnserve.conf)

lets see what is inside authz

eg:

folder wise permission

[/]
sajith = rw
vivian = r
jilmon = r
balu = rw

(above permission is for whole the repository)
You can use * for all

eg:
[/]
* = rw

For more : http://svnbook.red-bean.com/en/1.0/ch06s03.html

A sample svn client : http://tortoisesvn.tigris.org/

svn subversion