Subversion
From KevinWiki
(Difference between revisions)
(New page: Category:Version Control System ==Subversion (SVN)== ==Installation== -Install Subversion from the repository <pre> $ sudo apt-get install subversion </pre> -Add group <code>subvers...) |
|||
Line 39: | Line 39: | ||
-Create repository | -Create repository | ||
<pre> | <pre> | ||
- | $ sudo svnadmin create / | + | $ sudo svnadmin create /opt/svn/myproject |
</pre> | </pre> | ||
or | or | ||
<pre> | <pre> | ||
- | $sudo svnadmin create --fs-type fsfs / | + | $ sudo svnadmin create --fs-type fsfs /opt/svn/myproject |
</pre> | </pre> | ||
-to use WebDAV, repeat the chmod -R g+rws myproject command again as because svnadmin will create directories and files without group write access. | -to use WebDAV, repeat the chmod -R g+rws myproject command again as because svnadmin will create directories and files without group write access. | ||
Line 61: | Line 61: | ||
<Location /svn> | <Location /svn> | ||
DAV svn | DAV svn | ||
- | + | # SVNPath /opt/svn/ | |
+ | SVNParentPath /opt/svn/ | ||
AuthType Basic | AuthType Basic | ||
AuthName "lckymn.com subversion repository" | AuthName "lckymn.com subversion repository" | ||
Line 73: | Line 74: | ||
<Location /svn> | <Location /svn> | ||
DAV svn | DAV svn | ||
- | + | # SVNPath /opt/svn/ | |
+ | SVNParentPath /opt/svn/ | ||
AuthType Basic | AuthType Basic | ||
AuthName "lckymn.com subversion repository" | AuthName "lckymn.com subversion repository" |
Revision as of 12:01, 30 October 2008
Contents |
Subversion (SVN)
Installation
-Install Subversion from the repository
$ sudo apt-get install subversion
-Add group subversion
$ sudo addgroup subversion Adding group `subversion' (GID ****) ... Done.
-Add yourself and www-data
(the Apache user) as users to this group
$ sudo adduser username subversion Adding user `username' to group `subversion' ... Adding user username to group subversion Done. $ sudo adduser www-data subversion Adding user `www-data' to group `subversion' ... Adding user www-data to group subversion Done.
Create SVN Home
-Create SVN home
$ sudo mkdir /opt/svn $ cd /opt/svn $ sudo mkdir myproject $ sudo chown -R www-data myproject $ sudo chgrp -R subversion myproject $ sudo chmod -R g+rws myproject
-Create repository
$ sudo svnadmin create /opt/svn/myproject
or
$ sudo svnadmin create --fs-type fsfs /opt/svn/myproject
-to use WebDAV, repeat the chmod -R g+rws myproject command again as because svnadmin will create directories and files without group write access.
Access via WebDAV protocol (http://
)
-Install libapache2-svn
$ sudo apt-get install libapache2-svn ... Enabling module dav. Enabling module dav_svn. Run '/etc/init.d/apache2 restart' to activate new configuration!
-Edit /etc/apache2/mods-enabled/dav_svn.conf
file
<Location /svn> DAV svn # SVNPath /opt/svn/ SVNParentPath /opt/svn/ AuthType Basic AuthName "lckymn.com subversion repository" AuthUserFile /etc/subversion/.passwd <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> </Location>
-To limit any connection to the SVN-Server (private SVN), remove the lines <LimitExcept ...> and </LimitExcept>.
<Location /svn> DAV svn # SVNPath /opt/svn/ SVNParentPath /opt/svn/ AuthType Basic AuthName "lckymn.com subversion repository" AuthUserFile /etc/subversion/.passwd # <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user # </LimitExcept> </Location>
-Create user and password
$ sudo htpasswd -c /etc/subversion/.passwd user_name
-Restart Apache server
$ sudo /etc/init.d/apache2 restart
Access via WebDAV protocol with SSL encryption (https://
)
-Enable SSL in your Apache server.