Tuesday, January 18, 2011

SVN installation

Install SVN using yum or apt-get utility and follows these steps:-
1. Create a Repository
# svnadmin create /svnrepos

2. Create a SVN User
#vi /svnrepos/conf/svnserve.conf
In that file add these three lines:
anon-access = none
auth-access = write
password-db = passed

3.Create a password file:
#vi /svnrepos/conf/passwd
In that file add a line for your user:
# add users in the format : user = password
chander = password

4. Import Your Project
(assuming you’ve put your project files in /projects/myproject)
#svn import /projects/myproject file:///svnrepos/myproject
export SVN_EDITOR=vim

4. Start the SVN Server as Daemon
#svnserve -d

Done!

You should now have a svn server running with one project named myproject.
Try checking it out of the repository:
#svn co svn://X.X.X.X/svnrepos/myproject

Since we set anon-access to none you should be prompted for username and password which you created in the file /svnrepos/conf/passwd.