iantearle.com

Media Temple Subversion Tutorial

I always forget this, and end up either not having SVN on my design folders, causing me much wasted time rewriting code when I accidently dont download changes on my machines, or trawling through my notes to remember how to correctly set up SVN on (MT) Media Temple servers. Hopefully you find this useful.

Enable SSH Access

By default, SSH remoting is disabled on MediaTemple accounts, requiring you to explicitly enable it in the Server Administrator control panel section for your primary domain:

Once there, set SSH on “Enabled”, and save your changes. MediaTemple’s easy-to-use configuration tool couldn’t make this step any simpler.

Creating a Repository

Im working on a mac, so this tutorial is written for Apple users; open up terminal and connect to Media Temple as [email protected]. For example, if your site were example.com, you would connect as follows:

	<code>ssh [email protected]@example.com</code>

The domain “example.com” is in there twice, first because it’s part of your full username, and second to point SSH at the right server. (If your SSH client complains about not being able to connect, you can try replacing the first @ sign with its encoded version, “%25″.) Type “yes” to confirm adding example.com to your known_hosts, if asked, then enter your administrator password to finish logging in.

Enter the following commands to switch to your “data” directory (provided by MediaTemple), and create a basic repository for your code/information:

Change directory (cd) to your data directory:

	<code>cd ../../data/</code>

Create a “repos” directory to hold one or more repositories:

	<code>mkdir repos</code>

Change directory to the folder you made in the previous step:

	<code>cd repos</code>

Create a repository (replace “folder” with your desired repository name, using underscores for spaces). Letter case is important, so if you capitalize any part of the name now, you’ll have to capitalize it later when using it. The bit about “fsfs” is to use a specific Subversion database type recommended by MediaTemple — it’s the default type for newer versions of Subversion, but it’s best to put it just to be safe.

	<code>svnadmin create folder --fs-type fsfs</code>

You can repeat this to create as many repositories as you wish inside the “repos” folder.

Log out of MediaTemple:

	<code>logout</code>

Checking Out Your Repository

On your local computer (not on MediaTemple), decide where you want to keep your repositories. I recommend someplace easy to get to like /workingcopies/, but a repo can go anywhere you prefer. Check out a copy of the repo you just made:

	<code>svn checkout svn+ssh://[email protected]@example.com/home/1234/data/repos/folder  /workingcopies/folder </code>

Be sure to replace “1234” with your four-digit MediaTemple server ID number that can be found in your Service Activation email.

To verify everything drop a simple file into your new repository folder at /workingcopies/folder, such as test.txt, and do:

	<code>svn add test.txt svn commit -m "Adding test file."</code>

Posted On: Tuesday, September 8th, 2009 @ 6:13 pm by Ian Tearle


0 Comments

There are no comments on this entry. You should add one below.

Leave a comment

Be kind

If you would like to discuss anything about this post, please be polite and add your comments below.


 
 

Additionally

No HTML is allowed. All links, and new lines will be automagically converted to HTML for you.
Notice to spammers, all links will be sanitized with rel="nofollow".


Contact Me

Get In Touch

If you would like to discuss anything about your next project please drop me a line.


 

Prices

Projects start at £99.00 per month
We normally book 2–3 months in advance.

Additionally

No matter how small your project is, or if the prices above scare you, please do get in touch, I shall always listen and will advise freely alternative ideas or solutions. If you are a charity, let's talk!


Find Me On