First you need to add a new group call subversion, to do so you need to first enable viewing all users, to do this press ALT + F2. A run window would pop just like windows run command prompt, enter the following
- gconf-editor
Go into System> Administration > Users and Groups and add a new group called subversion, add yourself and the user www-data to it. Press OK to save changes and close the window once done.
Fire up your terminal window and type sudo su admin rights
navigate to the root directory by
- cd /
- mkdir /svn
- cd /svn
- mkdir /tester
- svnadmin create /svn/tester
- chown -R www-data:subversion tester
- chmod -R g+rws tester
- apt-get install libapache2-svn
Now you will have to edit the dav_svn.conf file to tell it where the repositories are located, i like to have all the repositories listed when i type http://localhost/svn. To do so type the following at the terminal prompt:
- gedit /etc/apache2/mods-available/dav_svn.conf
Once the text editor opens, type the following,
<Location /svn>
DAV svn
SVNParentPath /svn
SVNListParentPath On
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>and hit save, close the editor.
Restart apache now by typing the following at the terminal prompt:
- /etc/init.d/apache2 restart
- htpasswd -c /etc/subversion/passwd user_name
To add more users simply type the following at the terminal prompt:
- htpasswd /etc/subversion/passwd Second_user_name
You should now be able to access your svn repository by pointing your browser to
- http://localhost/svn
--Eddy
No comments:
Post a Comment