Muntar un servidor Subversion (svn)
Què és un SVN? -> http://en.wikipedia.org/wiki/Subversion_%28software%29
- Compil·lem / Instal·lem Subversion amb suport per a Apache2:
sudo aptitude install subversion subversion-tools libapache2-svn
- Crear el repositori ‘proba’:
sudo mkdir -p /var/svn/proba/
svnadmin create /var/svn/proba/ - Posem com a usuari dels repositoris a Apache2:
sudo chown -R www-data:www-data /var/svn
- Editem l’arxiu ‘/etc/apache2/mods-available/dav_svn.conf’. S’ha de donar especial atencio al fet que cal canviar SVNPath per SVNParentPath per a poder utilitzar mes d’un repositori.
<location /svn> # Uncomment this to enable the repository, DAV svn # Set this to the path to your repository SVNParentPath /var/svn # The following allows for basic http authentication. Basic authentication # should not be considered secure for any particularly rigorous definition of # secure. # to create a passwd file # # rm -f /etc/apache2/dav_svn.passwd # # htpasswd2 -c /etc/apache2/dav_svn.passwd dwhedon # New password: # Re-type new password: # Adding password for user dwhedon # # # Uncomment the following 3 lines to enable Basic Authentication AuthType Basic AuthName "Subversion Repository Access" AuthUserFile /etc/apache2/dav_svn.passwd # Uncomment the following line to enable Authz Authentication # AuthzSVNAccessFile /etc/apache2/dav_svn.authz # The following three lines allow anonymous read, but make # committers authenticate themselves. <limitexcept GET PROPFIND OPTIONS REPORT> Require valid-user </limitexcept> </location>
- Afegir usuaris i passwords: (el primer cop amb el flag -c per a crear l’arxiu)
sudo htpasswd2 -c /etc/apache2/dav_svn.passwd USUARI
Per a provar-lo en situem dins una carpeta amb codi font i fem:
svn import ./ http://server/svn/repositori -m “informacio”
I seguidament per a provar d’accedir-hi:
svn co http://server/svn/repositori carpeta_output




