[section_title title=”Setup on the Site5 Server”]

The setup on the Site5 server basically involves creating a deployment directory and the initial SVN repository. I will be using the suggested ~/svn_repo and ~/apps directories, but you can replace these with whatever names and locations you think makes the most sense for you.

Let’s get started by creating the deployment directory. SSH to your hosting account (ssh yourdomain.com), and create the deployment directory: mkdir ~/apps.

While we are at it, let’s also create the Secure Shell directory so we can upload our public key here in the later steps: mkdir ~/.ssh. There will be more on this later.

Now, let’s create the SVN repository: svnadmin create ~/svn_repo. Once you have the basic SVN repository, then create the basic trunk/branches/tags/ layout by running the following commands, replacing with your actual user name.

mkdir -p ~/temp/{trunk,branches,tags}
cd ~/temp
svn import ~/temp file:///home/<your_user_name>/svn_repo/ -m "Initial layout"
rm -rf ~/temp

If you are a curious one, like myself :), then run the following command to see how the repository looks afterwards: svn ls file:///home/<your_user_name>/svn_repo