RSS

Setting up Subversion Version control in Ubuntu

02 May

When developing a project, you may want to keep a version control of all your files so that you can easily revert to an earlier page (or the previous revision) to fix any bugs or in the event that someone accidentally deleted your files.

In Ubuntu, the easiest way to do version control is to set up a Subversion (SVN) server.

Install SVN and Apache

sudo apt-get install subversion libapache2-svn

Next, we are going to create a directory to hold your repository.

sudo svnadmin create /var/lib/svn

Give apache the access right to the repository

sudo chown -R www-data:www-data /var/lib/svn
sudo chmod 770 -R /var/lib/svn

Configure Apache for SVN access

gksu gedit /etc/apache2/mods-available/dav_svn.conf

Uncomment the codes by removing the ‘#’ in front of the following lines:

<Location /svn>

DAV svn

AuthType Basic
AuthName “Subversion Repository”
AuthUserFile /etc/apache2/dav_svn.passwd

<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>

If you have only one repository for your SVN, uncomment the following line

SVNPath /var/lib/svn

Else if you are setting up multiple repositories, uncomment this line

SVNParentPath /var/lib/svn

Remember that at any time, only SVNPath or SVNParentPath is uncommented. Do not uncomment both at the same time.

Create a password for your username

sudo htpasswd -cm /etc/apache2/dav_svn.passwd yourusername

Restart apache

sudo /etc/init.d/apache2 restart

Now open your browser and go to http://localhost/svn. If you see the following, the your installation is successful.

Subversion

Importing your project into SVN

You have successfully installed and configured SVN, now we need to import our project files to the SVN.

sudo apt-get install rapidsvn

Go to Applications->Programming->RapidSVN

In the RapidSVN, go to Repository->Import

In the window, enter the following:

rapidsvn-import

Click OK. Enter your username and password. Your project should be in the SVN now.

Advertisements
 
1 Comment

Posted by on May 2, 2011 in Linux

 

One response to “Setting up Subversion Version control in Ubuntu

  1. manikandang

    November 23, 2011 at 10:08 am

    Hi raja

    In VI / VIM editor we can use small ‘x’ character for saving the document.pls add in vi / vim deitor tutorial.

    regards
    manikandang

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

 
%d bloggers like this: