Home

Subscribe

No Spam just the latest tips from reviewingit.com






Article listings

Last comments

Windows Vista Missing Hibernat...
Thanks
It works. :) Thanks alot.
04/08/09 18:04 More...
By Levent Kaya

Windows Vista Missing Hibernat...
Thanks
It works. :) Thanks alot.
04/08/09 17:56 More...
By Levent Kaya

Create Invisible Registry Entr...
can anybody creat a key for Atomic Email Hunter 5.44 ??!! ...
31/07/09 16:08 More...
By benny

Vista DHCP and Router Problems...
The texts close to Clothing are published by the writing ser...
24/07/09 22:44 More...
By vfvd

Having fun downloading with Wg...
mast :( :x :x :zzz 8) :roll :grin
24/07/09 08:30 More...
By mast

Login Form

Syndicate

Installing Subversion on Debian Etch Complete... Print E-mail
User Rating: / 14
PoorBest 
Written by Administrator   
Monday, 29 October 2007

Image

So happens there comes a time when you need to track whos been adding what to your documents, and how to revert back to last Mondays copy of a document. What you need is a software to manage the versions and track the changes done by whomever. What you need is a tool called subversion. I've been hunting around for some good document to go through the install step by step but could not find one short of reading an entire book on the subject. So I decided to write a small document on what I did to install my copy of subversion on Debian etch, just using apt... read on...

 

 

Installing Subversion in debian Etch

First you need the following

A. A clean debian 4.0 etch system
B. Tortisesvn :- a subversion client for Windows (Xp or Vista) Get it here


1. First we need to Install ssh server
# apt-get update
# apt-get upgrade
# apt-get install ssh

2. Next we install Apache2
# apt-get install apache2
# apt-get install libapache2-mod-php5

3. Install subversion packages
# apt-get update
# apt-get install subversion
# apt-get install libapache2-svn


4. Create Repository
# mkdir /var/svn/
# svnadmin create --fs-type fsfs /var/svn/myproject

5. Generate Test data in repository
# mkdir ~/TEMP/
# echo "Testing" > ~/TEMP/test.txt
# svn import -m "Testing via ssh+svn" ~/TEMP/ svn+ssh://127.0.0.1/var/svn/myproject/trunk
# svn co svn+ssh://127.0.0.1/var/svn/myproject/trunk testcheckout

6. See if files in repository
# svnlook tree /var/svn/myproject/

7. Changeowner of repository folder to apache user
# chown -R www-data:www-data /var/svn/*
# chmod -R 770 /var/svn/*

8. Make sure svn is running in apache
# a2enmod dav
# a2enmod dav_svn


9. Create user accounts for SVN users, you will be prompted for their passwords
# htpasswd -c /etc/apache2/svn.passwd usera

# htpasswd /etc/apache2/dav_svn.passwd userb
# htpasswd /etc/apache2/dav_svn.passwd userc

10. Input this code into /etc/apache2/mods-available/dav_svn.conf
<Location /myproject_site>
DAV svn   
SVNPath /var/svn/myproject   
AuthType Basic   
AuthName "Subversion Repository"   
AuthUserFile /etc/apache2/svn.passwd   
Require valid-user   
#SSLRequireSSL <-- note this is commented out  
</Location>


11. Reload the apache config then, Test the connection using a browser to http://<repository address>/myproject_site
# /etc/init.d/apache2 force-reload


12. If it works time to add SSL to Apache
#apt-get install openssl ssl-cert

13. Generate a certificate
# openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem

>>ensure you fill up all the details
 for the certificate<<


14. Change the permissions on the certificate
# chmod 600 /etc/apache2/apache.pem

15. Modify the /etc/apache2/ports.conf add the following string
Listen 443

16. modify /etc/apache2/sites-available/default
change the default NameVirtualHost * to NameVirtualHost *:80
Add NameVirtualHost *:443
Change <VirtualHost *> to <VirtualHost *:80>

17.Add right at the end of the file

<VirtualHost *:443>
ServerAdmin webmaster@localhost
SSLEngine on
SSLCertificateFile /etc/apache2/apache.pem
</VirtualHost>

18. Uncomment SSL required in /etc/apache2/mods-available/dav_svn.conf
<Location /svn_zen>
DAV svn   
SVNPath /var/svn-repos/project_zen   
AuthType Basic   
AuthName "Subversion Repository"   
AuthUserFile /etc/apache2/dav_svn.passwd   
Require valid-user   
SSLRequireSSL       <---HERE  
</Location>

 

19.Reload the Apache config
# /etc/init.d/apache2 force-reload


20. Ensure mod ssl is loaded
# a2enmod ssl


21. Ensure repository permissions are correct

# chown -R www-data:www-data /var/svn/*
# chmod -R 770 /var/svn/*


22. Test in browser, enter the userid you created and password
https://<address of webserver>/myproject_site


23. Now that all is working with SSL Lets add some granular permissions
, usera and userb has readwrite userc only has read permissions to the repository.
# nano /etc/apache2/svn_ACL

put this in

[groups]
readwritegrp = usera, userb
readgrp = userc

[/]
@readwritegrp = rw
@readgrp = r

[/myproject_site/trunk]
@readwritegrp = rw
@readgrp = r

24. Lets tell subversion to use the permissions, Add this in to /etc/apache2/mods-available/dav_svn.conf
<Location /myproject_site>
DAV svn   
SVNPath /var/svn/myproject   
AuthType Basic   
AuthName "Subversion Repository"   
AuthUserFile /etc/apache2/svn.passwd   
Require valid-user   
SSLRequireSSL      
AuthzSVNAccessFile /etc/apache2/svn_ACL    <---HERE  
</Location>

25. Reload Apache and Have Fun with your SVN repository!!!
# /etc/init.d/apache2 force-reload


26. Fire up your Tortise SVN I use it in Vista it adds a right click menu which you can use to check in and check out documents. But first up use the repository browser to goto https://<your server address>/myproject_site to make sure all is going well
enter your userid and password created earlier. If all goes well you can start playing around with you TortiseSVN to check out and check in docs. Also you can diff and see the history of
updates. Its Great!!


Add as favourites (35) | Quote this article on your site | Views: 17928

Comments (9)
RSS comments
1. 29-11-2008 18:43
 
ww
:eek
Guest
 
2. 21-08-2008 19:52
 
ww
With steps 19 and 20 swapped, it worked like a charm. Thanks for this guide, nice work!
Guest
 
Rainer
3. 08-08-2008 10:20
 
ww
Nice one
Guest
 
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
4. 07-08-2008 09:05
 
ww
Works well, thanks
Guest
 
pierre
5. 15-05-2008 18:41
 
ww
Hi! Followed your guide but unfortunately i get the following error after step 19: (Restarting Apache) 
 
(98)Address already in use: make_sock: could not bind to address [::]:443 
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443 
no listening sockets available, shutting down 
 
 
I swapped step 19 with 20, although ssl module was already enabled. 
 
Any ideas?
Guest
 
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
6. 25-04-2008 18:58
 
ww
Like Daniel, I initially couldn't get Apache to start with 'SSLEngine on', however, this problem was corrected after executing step 20 & then step 19 ran properly for me.
Guest
 
itsacademic
7. 21-04-2008 01:25
 
ww
Daniel, switch #19 & #20 around. Need to make sure it is enabled BEFORE you try to use it. :)
Guest
 
Joe
8. 20-02-2008 16:52
 
ww
for some reason the ssl does not work. if using 'SSLEngine on', apache cannot be started.
Guest
 
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
9. 14-01-2008 13:03
 
ww
corrections at 9) 
change 
# htpasswd /etc/apache2/dav_svn.passwd userb 
# htpasswd /etc/apache2/dav_svn.passwd userc 
to 
# htpasswd /etc/apache2/svn.passwd userb 
# htpasswd /etc/apache2/svn.passwd userc
Guest
 
me-kell

Write Comment
  • Please keep the topic of messages relevant to the subject of the article.
  • Personal verbal attacks will be deleted.
  • Please don't use comments to plug your web site. Such material will be removed.
  • Just ensure to *Refresh* your browser for a new security code to be displayed prior to clicking on the 'Send' button.
  • Keep in mind that the above process only applies if you simply entered the wrong security code.
Name:
E-mail
Homepage
Title:
BBCode:Web AddressEmail AddressBold TextItalic TextUnderlined TextQuoteCodeOpen ListList ItemClose List
Comment:



Code:* Code
I wish to be contacted by email regarding additional comments

Powered by AkoComment Tweaked Special Edition v.1.4.6





Reddit!Del.icio.us!Facebook!Slashdot!Netscape!Technorati!StumbleUpon!Newsvine!Furl!Yahoo!Ma.gnolia!Add this social bookmarking functionality to your website! title=
Last Updated ( Monday, 29 October 2007 )
 
< Prev   Next >

Site Search

Sponsors

Google

Who's Online

We have 8 guests online