Ceci est une ancienne révision du document !


Installation d'un dépôt subversion (SVN)

Subversion est l'un des logiciels de gestion de configuration les plus utilisés.

Nous allons voir ici comment créer un dépôt subversion permettant d'héberger plusieurs projets, le tout accessible en web.

Comme toujours l'installation se fera sur une debian stable (lenny actuellement).

Prérequis

  • Un serveur sous debian lenny hébergeant un serveur web (apache 2.2)

Installation

  • L'installation est relativement simple :
    apt-get install subversion libapache2-svn

Configuration

Virtualhost apache

cat << EOF > /etc/apache2/svn.mondomaine.com
#######################################
# VirtualHost pour le svn
######################################
<VirtualHost *:443>
        ServerName svn.mondomaine.com
        ServerAdmin webmaster@localhost
        SSLEngine on

        DocumentRoot /var/www/svn.mondomaine.com/htdocs/
        ErrorLog /var/log/apache2/svn_mondomaine_com_error.log
        CustomLog /var/log/apache2/svn_mondomaine_com_access.log combined

        #RedirectMatch ^/$ /svn/
        RedirectMatch ^svn$ /

        <Location /svn>
                DAV svn
                # use SVNParentPath if you have multiple repositories under
                # under a single directory (/var/lib/svn/repo1, /var/lib/svn/repo2, ...).
                # You need either SVNPath and SVNParentPath, but not both.
                SVNParentPath /var/lib/svn
                #SVNPath /var/lib/svn

                AuthType Basic
                AuthName "Subversion Repository"
                #Fichier d'authentification des utilisateurs
                AuthBasicProvider file
                AuthUserFile /etc/apache2/dav_svn.passwd

                # Puis authentification PAM
                AuthPAM_Enabled on
                AuthPAM_FallThrough off

                AuthBasicAuthoritative off
                Satisfy Any
                Require valid-user

                SVNIndexXSLT "/repos-web/view/repos.xsl"
                
                # fichier contenant les ACL pour les depots SVN
                AuthzSVNAccessFile /etc/apache2/dav_svn.authz
        </Location>

        <Directory "/var/www/svn.mondomaine.com/htdocs">
                Options Indexes MultiViews
                AuthType Basic
                AuthName "Subversion Repository"

                AuthBasicProvider file
                AuthUserFile /etc/apache2/dav_svn.passwd
                
                AuthPAM_Enabled on
                AuthPAM_FallThrough off

                AuthBasicAuthoritative off

                Satisfy Any
                Require valid-user
        </Directory>

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        ServerSignature Off
</VirtualHost>
EOF
sysadmin/install_svn.1285838233.txt.gz · Dernière modification: 2010/09/30 11:17 par james
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0