C3rd
install and configure subversion (SVN)
Posted: 11 Jan 2011, 2:21am - TuesdayI keep this guidelines because I find it very useful which I think we need it in our project development as a team in Project CollabHQ. I'm getting tired synchronizing always my files in my local PC between published files after other team members updated the files in the server.
To install subversion on CentOS you need to have the RMForge custom repository enabled (read my "Add the RPMForge custom repository to CentOS" post about how to do this), and then issue the following command:
Unfortunately it doesn't set up anything else after installing the necessary files, so you need to add a subversion user and set up the repositories etc yourself. If we decide to call the subversion user "svn" then you add them like so:sudo yum install subversionThis will check for any dependencies and then prompt you to install those and subversion itself. Type in "y" and <enter> to install these.
sudo /usr/sbin/useradd svn sudo passwd svnAnd then change to the subversion user like so:
su svnChange to the svn user's directory and then create a "repositories" directory like so:
cd mkdir repositoriesAnd now create your project's repository. For example, if we had a project called "myproject" you would do this:
There will now be a "myproject" directory containing the following:cd repositories svnadmin create myproject
You need to edit "myproject/conf/svnserve.conf" and uncomment the following lines:-rw-rw-r-- 1 svn svn 229 Nov 21 16:58 README.txt drwxrwxr-x 2 svn svn 1024 Nov 21 16:58 conf drwxrwsr-x 6 svn svn 1024 Nov 21 16:58 db -r--r--r-- 1 svn svn 2 Nov 21 16:58 format drwxrwxr-x 2 svn svn 1024 Nov 21 16:58 hooks drwxrwxr-x 2 svn svn 1024 Nov 21 16:58 locks
and edit the password file "myproject/conf/passwd" adding a new user and password. Note that the password is stored in plain text. In the following example we have a user called "john" whose password is "foobar123":auth-access = write password-db = passwd
And finally, as the svn user, start the subversion daemon like so:[users] john = foobar123
You can now connect to the subversion repository at e.g. svn://svn@hostname/myproject You can add additional repositories under this user using the "svnadmin create" command and then access them at svn://[userame]@[hostname]/[project name] Other reference at http://wiki.centos.org/HowTos/Subversion Article by: http://www.electrictoolbox.com/install-subversion-centos/svnserve -d -r /home/svn/repositories