Tuesday, October 28, 2008

HowTo SVN (Sub Version) on JeOS

Can you imagine a development environment without a source codes repository ? I can remember a site listing the top ten reasons not to use VSS, but I was unable to locate it by search. I have personally worked with VSS and I agree with it most of the time. I have been told that even Microsoft does not use VSS internally. I do not know if that statement is true, but no Microsoft engineer with whom I'm acquainted uses it. How ever I wish to see a sophisticated source repository from Microsoft soon !

By the way I decided to deploy a SVN instant onn JeOS and I feel it's working birrlient with optimized kernal.

Let's start !!! Install JeOS on make it uptodate !
$ sudo apt-get update

Best thing is to install curl and it's help us to troubleshoot if something gose worng.
$ sudo apt-get install curl

I assume your system already have vim editing tool or type and install it using below command
$ sudo apt-get install vim

Install Apache
$ sudo apt-get install apache2

Now use curl and check whether it's up and running

And you shoud see some like below, then you good to go with next step
"It's works!" with some html tags
Install SVN
$ sudo apt-get install subversion

Install required lib for theApache
$ sudo apt-get install libapache2-svn

Now you can create SVN folders as you wish
$ sudo mkdir /svn
$ sudo mkdir /svn/projects

And setup the folders usin below commands
$ sudo svnadmin create /svn/projects
$ sudo chown -R www-data /svn/projects

Create a password file and enter the first user in to your password file
$ sudo htpasswd -cm /etc/apache2/dav_svn.passwd user01

Add you will be asked the password and confirm password

And please note if you need to add more users in later;
$ sudo htpasswd /etc/apache2/dav_svn.passwd user02

No we configure Apache by editing the following file with Vim that we installed at the beginning
$ sudo vim /etc/apache2/mods-enabled/dav_svn.conf

All you really need to do is remove the comments "#" in the apropriate areas, finally dav_svn.conf should looks alike below;
DAV svn
SVNPath /svn/projects
AuthType BasicAuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user

Restart Apache
$ sudo /etc/init.d/apache2 restart

Thats it, you're done. You can get to your repository via your hosts browser by going to http://{your VM IP}/svn. You should get a username/password dialog which to enter the details you created in.

You can always use a third party software to make your life easier !!! http://tortoisesvn.tigris.org/

No comments: