Installing and Configuring Subversion (SVN) In Ubuntu

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Installing and Configuring Subversion (SVN) In Ubuntu

Postby Joshua » 05. October 2010 07:40

1. Download and Install Subversion via Ubuntu Repository using the following command. This command will install subversion to your machine, so that you can issue all svn associated commands from the terminal (command prompt).
Code: Select all
$ sudo apt-get install subversion

2. You need to create an svn repository location which basically is a directory path where all your projects will reside. The first command below creates that location in /home/svn, then you navigate into that directory after which you issue the svnadmin create command. The svnadmin create command both creates a directory (project1, project2, project3) where the content of your project or application will be stored and also initializes those directories as an svn directory.

Issuing the following commands achieves just that.
Please Note that the location and naming convention of the directory names is up to you.
Code: Select all
   $ sudo mkdir /home/svn
   $ cd /home/svn

Code: Select all
$ sudo svnadmin create /home/svn/project1
$ sudo svnadmin create /home/svn/project2
$ sudo svnadmin create /home/svn/project3

3. Importing Files into your repository: This command will recursively import files and directories into your project repository. These files will then be available for checkout (co) in step 4
Code: Select all
svn import -m "Commit Comment" /path/to/import/directory file:///path/to/repos/project

Code: Select all
sudo svn import -m "Imported Files into Rails Project" /home/joshua/Desktop/railsappopensource/ file:///svn/repositories/railsapp/

4. Repository access methods.
There are couple of ways to access an svn repository by using any of the following protocols (file://, http://, https://, svn://, svn+ssh://)
I. Using the file:// access method: The file:// access method is enabled by default, so doing something like
Code: Select all
 $ svn co file:///home/svn/project1 /home/joshua/workspace/project1

Code: Select all
svn co file://localhost/home/svn/project1  /home/joshua/workspace/project1

will checkout (copy) the content of the project1 into your workspace. Your workspace is a directory path location created by you where all your development or changes resides until it is checked-in or committed into your project repository.
II. Using the http:// access method: This allows access via WebDAV protocol to Subversion-aware Apache 2 web server. In this case you have to install and configure configure apache webserver. Using this access method you can browse and view the contents of your project files using a browser

I have published another topic on Apache and Subversion Integration and Access Methods using xampp. You can check it out.
Posts: 1
Joined: 04. October 2010 15:13

Re: Installing and Configuring Subversion (SVN) In Ubuntu

Postby JonB » 05. October 2010 13:48


Thanks for the nice clean tutorial

Is there a link for that other article? (Or did I just miss it?)

User avatar
AF Moderator
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 6 guests