SVN With Mediatemple

So I have dedicated hosting through Mediatemple (specifically the dv option) and I needed to create a subversion repository on it. Here’s what I did:

A. Enable Root Access.

B. Install Developer Tools in your Account Center.

C. Root Login via SSH to your domain.

1. Create SVN user and group

groupadd svn

useradd svn

2. Startup the server as a daemon (-d), pointing to a particular repository (-r), is:

sudo -u svn svnserve -d -r /home/svn

From here replace *repo_name* with your own!

3. Create your repository

svnadmin create /home/svn/*repo_name*

4. Create the temporal structure for the repository like trunk, branches and tag

cd /home

mkdir site && cd site

mkdir trunk

mkdir branches

mkdir tag

5. Import this structure into your new repository:

svn import /home/site file:///home/svn/*repo_name* –message “Creating initial repo.”

6. Delete the temporal structure directory

rm -R /home/site

7. Your new repository is installed and working.

8. Now you can add the SVN group for all users who will commit to the server.

cd /home
chmod -R 775 svn
chown -R svn:svn /home/svn

9. You can add more users in this way:

useradd *username* -g svn
passwd *username*

10. Checkout your repository:

svn co svn+ssh://*your_username*@*the_domain*/home/svn/*repo_name*/trunk

I got this through a little trial and error, as well as these 2 links:

http://mind.psychopsia.com/subversion-svn-repository-on-media-temple-dv-35/

http://kb.mediatemple.net/questions/143/Using+Subversion