Setting up SVN on a hosted server

Solution 1:

On your server:

1) Ensure subversion is installed -- yum/apt-get/etc should make it quite easy.

2) Create a directory to hold a repository: mkdir /some/repository/path

3) Use svnadmin to create the repository layout: svnadmin create /some/repository/path

4) Import your sources:

$ cd /path/to/your/code
$ svn import -m "initial import" . file:///some/repository/path/trunk

NOTE: this imports the code into the repo, but does NOT create a working copy! So, next:

5) Move your original files out of the way, and check out a working copy:

$ cd ..
$ mv /path/to/your/code /path/to/your/code-presvn
$ svn co file:///some/repository/path/trunk code

5.5) You probably want to ensure that people can't browse your .svn directories via the web server. For apache, something like the following in httpd.conf should do it:

<Directory ~ "\.svn">
    Order allow,deny
    Deny from all
</Directory>

6) Test your site, ensure permissions are correct, etc. Checking out a fresh copy may have created issues. It's probably a good idea to document (or even better, script) any changes that will need to be done to properly configure a newly checked-out copy.

7) To get a local copy for development, use a repository URL like svn+ssh://[email protected]/some/repository/path/trunk I'm not familiar with tortoisesvn, but if you were using the standard command-line tools, you'd check out your project like:

$ svn co svn+ssh://[email protected]/some/repository/path/trunk

You then can make changes to your local working copy, and commit thing (svn commit -m "description of changes"). When you want to move those changes to your production system, ssh into the box, cd /path/to/your/site, svn -u status (to preview the changes), svn update to bring everything up to date.

Hopefully this is helpful.

I also can't suggest enough that your read more of the subversion documentation to understand what's going on under the hood. Also, make sure you know what you're doing before trying this stuff on anything important. You can create test repositories, with bogus data, and do some experiments until you're confident that you know what you're doing.

Solution 2:

is it a dedicated server or shared hosting? if it's shared hosting then I think you're out of luck, but if it's a dedicated server, then you just log in and install the app

I would use something like port 8080 for the service to listen on, and I would definitely use VisualSvnServer Standard as it's super easy to install and configure.

Also, if you're willing to purchase VisualSVNServer, then you would have full access to configure it remotely.

http://www.visualsvn.com/server/licensing/

I personally use the standard version and RDP into my server when I need to create a new Repo... that way I can use the VisualSVN GUI and know that it will work without hassle.