In this article we will be Installing Subversion and Configure Repository on centos. Subversion is used for version controlling system and is widely used by Software developers to get centralized repository.
We starts with the installation of subversion, this tutorial was performed on 32-Bit CentOS release 6.2 (Final). Before installing subversion make sure apache(httpd) is installed and running. to start installation of subversion type the following command,
we have successfully installed subversion, now we will configure subversion with apache (httpd) , configure Repository and all users to repository access, now open subversion.conf file placed at following loaction,
In this file we will add user access file path, authentication file path, repository path and repository access via browser add following lines,
Now We wil create a repository in /var/www/svn, make sure svn directory have 775 permission for apache, creating new repository by running following command,
now give apache ownership of test repository by following commands,
now we will add user authentication to repository by AuthUserFile which is located at /etc/httpd/conf.d/passwd
now type following command for adding user passwords,
htpasswd -cm /etc/httpd/conf.d/passwd <test_user>
now you will be asked for password, now we will allow users access by adding user acces to file /var/www/svn/authz
open file /var/www/svn/authz in text editor,
vim /var/www/svn/authz[groups] admin = test_user [/] @admin = rw [test:/] test_user = rw
save file and exit, now you can restart apache (httpd) to get repository working,
do /etc/init.d/httpd restart or do service httpd restart,
now type your server url of your svn repository http://localhost/svn/test
now we will access repository by command line,
we have taken fresh checkout of repository test, now we will add a test file and commit it,
We have successfully created a new repository and added and committed file to repository.
I hope if you follow this tutorial exactly as i did you will not face any issues in installing subversion and creating new repository.