Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Install subversion 1.8.10 on CentOS 6.5 – Plesk 12

Install the wandisco repo to get the latest version of subversion for CentOS

[WandiscoSVN]
name=Wandisco SVN Repo
baseurl=http://opensource.wandisco.com/centos/6/svn-1.8/RPMS/$basearch/
enabled=1
gpgcheck=0

Issue the following at shell

yum install subversion mod_dav_svn

Restart httpd, it’ll do it itself while installing but go ahead and restart just in case it doesn’t.

service httpd restart

Create a domain or a subdomain on the Plesk server and add the following to the vhost.conf at /var/www/vhosts/system/svn.xyz.com/conf

<Location />
	DAV svn
	SVNParentPath /var/www/vhosts/xyz.com/svn.xyz.com/repos/
	SVNListParentPath On
	AuthzSVNAccessFile /var/www/vhosts/xyz.com/auth.conf
	AuthType Basic
	AuthName "XYZ Subversion System"
	AuthUserFile /var/www/vhosts/xyz.com/passwd
	Require valid-user
</Location>

Now create a svn user, note that these users would be independent of system and Plesk users

htpasswd -m /var/www/vhosts/svn.xyz.com/passwd testuser

Now issue the following command to get Plesk to read the new vhost.conf file

/usr/local/psa/admin/bin/httpdmng --reconfigure-all

Create a test repo

svnadmin create /var/www/vhosts/xyz.com/svn.xyz.com/repos/test
chown -R <DOMAIN USERNAME> /var/www/vhosts/xyz.com/svn.xyz.com/repos/test

Create an entry in the auth file

[test:/]
user = rw

Based on your folder structure inside the repo, you can even grant access to one particular folder N levels inside the structure tree.

That’s it, try it. Leave a comment if you experience any issue.