Cómo montar un servidor de desarrollo con svn

Estas cosas siempre son útiles tenerlas en casa si nos gusta programar. Para ello primero instalamos lo necesario (Apache y SVN):
sudo apt-get install apache2 subversion subversion-tools libapache2-svn
A continuación creamos los repositorios para guardar nuestros proyectos (en este caso se ha elegido /var/lib/svn):
sudo mkdir -p /var/lib/svn
Vamos a probar con un proyecto nuevo llamado “libros”:
sudo mkdir -p /var/lib/svn/libros
sudo svnadmin create /var/lib/svn/libros
sudo svn mkdir /var/lib/svn/libros/trunk -m "Trunk"
sudo svn mkdir /var/lib/svn/libros/tags -m "Tags"
sudo svn mkdir /var/lib/svn/libros/branches -m "Branches"


Ahora configuramos los modulos WebDAV y svn para apache que hemos instalado con el fichero /etc/apache2/mods-available/dav_svn.conf para decir donde estará nuestro repositorio:

# dav_svn.conf – Example Subversion/Apache configuration
#
# For details and further options see the Apache user manual and
# the Subversion book.
# …
# URL controls how the repository appears to the outside world.
# In this example clients access the repository as http://hostname/svn/
# Uncomment this to enable the repository,DAV svn
# Set this to the path to your repository

SVNParentPath /var/lib/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.
Require valid-user

Si reiniciamos Apache y miramos en la siguiente dirección:
http://localhost/svn/colt
Si solamente utilizamos nuestro repositorio en una red local, no sería necesario password. Pero sino, podemos proteger nuestro código creando una cuenta como se describe en el fichero anterior:
sudo htpasswd2 -c /etc/apache2/dav_svn.passwd usuario
También hay que recordar darle permisos a Apache para que pueda acceder libremente a nuestro repositorio:
sudo chown -R www-data.www-data /var/lib/svn
Más información…


  1. dedalo

    cuando ejecuto cualquiera de estos comandos:
    -sudo svn mkdir /var/lib/svn/libros/trunk -m “Trunk”
    -sudo svn mkdir /var/lib/svn/libros/tags -m “Tags”
    -sudo svn mkdir /var/lib/svn/libros/branches -m “Branches”
    la respuesta de mi terminal es: “svn: Las operaciones locales, que no involucran un ‘commit’, no llevan un mensaje de log”
    ¿a que se deben?¿ como puedo solucionarlo?

  2. Claudio Ferreira

    Hola

    quisiera ver la posibilidad de que me ayudaran..

    tengo problemas con el AuthzSVNAccessFile. me deniega el acceso SIEMPRE y recibo un odioso error 403 – Forbidden.
    me podrias ayudar salucion a mi problematica gracias

    saludos

  3. coolace

    dedalo, prueba con:
    sudo svn mkdir file:///var/lib/svn/libros/trunk -m “Trunk”

  4. x2l2

    no es mas facil usar file://localhost/directoriosvn/proyectosvn como direcion cuando solo lo vamos a usar en local?

  5. guzmen18

    Hola me marca el siguiente error al iniciar apahe:
    Syntax error on line 11 of /etc/apache2/mods-enabled/dav_svn.conf:
    SVNParentPath not allowed here
    .
    agradecere su ayuda..

  6. jgoncalves

    me marca lo mismo que guzmen

  7. kagure

    Espero esto le sirva a alguien esto es para evitar el fail a la hora del apache recargar la configuracion.

    #
    #mi configuracion
    #Con atutenticacion

    DAV svn
    SVNPath /var/lib/svn
    AuthType Basic
    AuthName “Mi proyecto”
    AuthUserFile /etc/apache2/dav_svn.passwd

    Require valid-user

    #Sin autenticacion

    DAV svn
    SVNPath /var/lib/svn

  1. 1 Subversion « Jimmy's

    [...] Instalar SVN en Ubuntu.  Seriado en línea. Extraido de: [http://esubuntu.wordpress.com/2007/04/24/como-montar-un-servidor-de-desarrollo-con-svn/]. Consulta realizada: 07 de Enero de [...]

  2. 2 Instalar Servidor de SVN en Ubuntu « desarrollophpsenior

    [...] http://www.softwarelibre.net esubuntu.wordpress.com Share this:TwitterFacebookMe gusta:Me gustaSé el primero en decir que te gusta esta [...]




Deja un comentario

Fill in your details below or click an icon to log in:

Logo de WordPress.com

You are commenting using your WordPress.com account. Log Out / Cambiar )

Twitter picture

You are commenting using your Twitter account. Log Out / Cambiar )

Facebook photo

You are commenting using your Facebook account. Log Out / Cambiar )

Connecting to %s



Seguir

Get every new post delivered to your Inbox.