setup svn server on media temple dv or centos with plesk
7 May
I’m saving this here for my ref:
This walk through covers setting up a svn server on media temples dedicated virtual servers (dv) or similarly configured centos with plesk installations.
With media temple the yum command isn’t available so we have to do it the long way
first go to http://subversion.tigris.org/project_packages.html
Download the source for both subversion and dependencies. make sure you download them both to the same directory
you can do this using wget, ex : wget file_location
ok now extract both archives – use google if you don’t know how
almost done, now lets get it installed
first cd (change directory) into the subversion folder, then run the following commands
./configure --with-apxs=/usr/sbin/apxs make make install
This will configure with apache support, build and install. now all thats left is setting up apache and a domain, but before we get to it, check your httpd.conf file and make sure you see the following modules being loaded :
mod_dav_svn mod_authz_svn
I prefer to use a subdomain and recommend it, ex: trac.domain = trac frontend, svn.domain=regular svn access. It’s up to you. the steps for setting up a subdomain and domain are pretty much the same, so i’ll only cover subdomains.
Login to plesk, select the domain you plan on using. go to subdomains > add new
ok here we want to setup a new subdomain. remember to give this subdomain a different ftp account that the main site.
save this domain, check that it’s up and running , and exit plesk.
almost done ![]()
login to your servers file system go to /var/www/vhosts/your_domain/subdomains/your_subdomain/
now we need to setup a svn repo.
first make a new directory for our repo , I recommend making it your subdomains dir, ex
mkdir /var/www/vhosts/your_domain/subdomains/your_subdomain/svn/repo;
chmod 0777 /var/www/vhosts/your_domain/subdomains/your_subdomain/svn/repo;
svnadmin create /var/www/vhosts/your_domain/subdomains/your_subdomain/svn/repo;
next cd into your conf directory at /var/www/vhosts/your_domain/subdomains/your_subdomain/conf
vi vhost.conf
and enter :
#svn.server.com — vhost.conf file
<location />
DAV svn
SVNPath /var/www/vhosts/your_domain/subdomains/your_subdomain/svnrepo
AuthType Basic
AuthName “Subversion Repository”
AuthUserFile /etc/svn-auth-file
Require valid-user
</location>
ok promise it’s almost over
We need to add a user for access via the apache svn frontend
htpasswd -c /etc/svn-auth-file your_user
now run
/usr/local/psa/admin/sbin/websrvmng -a -v
That restarts apache to load all of our changes.
now go to your_subdomain.your_domain and login – svn is running
Things to keep in mind, I’m only covering media temple dv, and similar centos with plesk configurations. I’m not covering security, i’ve not covering trac, getting your repo setup, etc. So this is a vanilla install. – use google and make it more.
Articles I used :


Hey, good article. When I “go to your_subdomain.your_domain” I see the Domain Default Page put up by Plesk. I am not prompted for a password. I’m not really sure what I should be seeing. When I ran ” /usr/local/psa/admin/sbin/websrvmng -a -v” it paused for a second and came back to the prompt. How do I know it did anything?
Thans for the article. I think I’m closer to getting this running because of it.
Geolev
Never mind. I got it. I had to remove the default index.html file from /var/www/vhosts/mydomainname/subdomains/mysubdomain/httpdocs. Now when I go to http://mysubdomain.mydomain.com I am prompted for the username and password.
Once I login in I am presented with Revision 0:/ Powered by Subversion version 1.1.4.
Thanks for the article.
Geolev
Sorry to not be up-to-tech standards but can you be more detailed about the part “source for both subversion and dependencies.” The rest I can follow quite easily, excellent post!
nvm, I installed yum and did a subversion installation using yum!
I keep getting the following error, any ideas?
I’ve double checked directory strings and has been unsuccessful
websrvmng: Service /etc/init.d/httpd failed to gracefully restart
you should probably build svn from source if your attempting to connect it to apache.
I don’t think yum installs the apache modules. so it may be failing due to you trying to use modules that don’t exist
Thanks for this tutorial, it really helped! I did most steps myself before seeking help, and I was pretty close, but I was botching something in the vhost config file, so it was a blessing to find yours.
Thanks for posting this. I’ve got a few mediatemple boxes — they are a great host. Your guide worked for me, with a few minor snags that I got through pretty quickly.
glad I could help, I have a bunch of other tuts queued, just need the time to finish them, so keep and keep out for them.
Sid
I have tried following this tutorial exactly, however once I restart the server I get a segmentation fault. When I look at /etc/httpd/logs/error_log I see the following (ip changed for anonymity):
[Sun Jul 13 03:31:32 2008] [warn] Init: SSL server IP/port conflict: default-1-2-3-4:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:78) vs. webmail:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:133)
[Sun Jul 13 03:31:32 2008] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!!
Any ideas? Looks like a port conflict. If I revert the changes to the httpd.conf and the vhost.conf file everything works as normal.
Thanks,
Gordon
This is a great tutorial, thanks! If you happen to have the newer version of Media Temple’s (dv) server (3.5) then you can simplify the process greatly by using the following tutorial: http://isnot.tv/text/295/getting-svn-to-work-through-apache-on-mediatemple-dv-35/ I was up and running on my (dv) 3.5 in no time.
Article rocks !!
)