Drucken

CVS

Installation

Kurzreferenz

Subversion

Installation

Subversion (Revision Controll System) mit Apache2

Software installation

Folgende packages müssen installiert sein: apache2, apache2-doc, apache2-prefork, libapr1, libapr-util1, neon, subversion, subversion-server.
Update der $APACHE_MODULES variable in der /etc/sysconfig/apache2 um dav und dav_svn.
a2enmod dav
a2enmod dav_svn

Konfiguration der repository

Editieren der /etc/apache2/conf.d/subversion.conf
vi /etc/apache2/conf.d/subversion.conf


<IfModule mod_dav_svn.c>

<Location /repos/myproject>
DAV svn                    
SVNPath /srv/svn/repos/myproject
   <LimitExcept GET PROPFIND OPTIONS REPORT>
      AuthType Basic                        
      AuthName "Authorization Realm"        
      AuthUserFile /srv/svn/user_access/myproject_passwdfile
      Require valid-user                                    
   </LimitExcept>                                           
</Location>                                                 

<Location /repos/ccf>
DAV svn              
SVNPath /srv/svn/repos/ccf
      AuthType Basic      
      AuthName "My private subversion repository"
      AuthUserFile /srv/svn/user_access/ccf_passwdfile
      Require valid-user                              
</Location>                                           

<Location /repos/php_ccf>
DAV svn                  
SVNPath /srv/svn/repos/php_ccf
      AuthType Basic          
      AuthName "My PHP CCF script subversion repository"
      AuthUserFile /srv/svn/user_access/php_ccf_passwdfile
      Require valid-user                                  
</Location>                                               

<Location /repos/cgi_ccf>
DAV svn                  
SVNPath /srv/svn/repos/cgi_ccf 
      AuthType Basic           
      AuthName "My cgi  script subversion repository"
      AuthUserFile /srv/svn/user_access/php_ccf_passwdfile
      Require valid-user
</Location>

</IfModule>


Konfiguriere user access zum repository

Erstellen der password files:
mkdir /srv/svn/user_access
touch /srv/svn/user_access/myproject_passwdfile                                               
touch /srv/svn/user_access/ccf_passwdfile
touch /srv/svn/user_access/net_ccf_passwdfile

Ändern der group damit Apache auf den password file zugreifen kann:
chown root:www /srv/svn/user_access/*_passwdfile

Ändern der permissions:
chmod 640 /srv/svn/user_access/*_passwdfile

Benutzer anlegen:
htpasswd2 /srv/svn/user_access/[PasswdFile] [USER]

und das password zweimal eingeben.

Restart Apache2:
rcapache2 restart

Anlegen der repository

svnadmin create /srv/svn/repos/myproject
svnadmin create /srv/svn/repos/ccf
svnadmin create /srv/svn/repos/php_ccf
svnadmin create /srv/svn/repos/cgi_ccf
chown -R wwwrun:www /srv/svn/repos/*/{db,locks}
chown wwwrun:www /srv/svn/repos/*/

Erster import

Importieren der neuen Projekte:
svn import /ccf http://[BASE_URL]/repos/ccf -m "initial /ccf import"
svn import /netweb/php_ccf http://[BASE_URL]/repos/php_ccf -m "initial /netweb/php_ccf PHP CCF script import"
svn import /netweb/cgi_ccf http://[BASE_URL]/repos/cgi_ccf -m "initial /netweb/cgi_ccf CGI CCF script import"

Kurzreferenz

svn help
svn co http://ap.ccf-consulting.net/repos/ccf
svn status
svn add linccf
svn update
svn commit
svn update
svn status
svn add arc*
svn list -v -R
svn stat
svn commit