2008-07-29

Preparing new SVN repo

Just for note. I am looking for it too often on Google. Its time to write it somewhere in one place as a "reference"

Install subversion



  1. apt-get install subversion. Distributions other then Debian, Ubuntu and all based on APT package systems have different command to install this software. You can always download newest version and do magic sequence: ./configure && make && make install

  2. create user for subversion: useradd -g bin -s /bin/bash -c 'Subversion' /home/subversion -m svn

  3. passwd svn Just to protect this directory. You will never use this password after configuration process.

  4. create an init script from Subversion + Tracd post. Be aware, that in the script is an assumption, that user name (svn) and home directory (subversion in our current case) are the same. Change it to your own settings

  5. edit /home/subversion/repo/conf/passwd and /home/subversion/repo/conf/svnserve.conf


    1. svnserve.conf: uncomment auth and non-auth access and line with passwd file

    2. passwd: add your name and password. Its clear text file, please don't copy your any real password from others accounts.




Configure repository



  1. on svn account create repository: svnadmin create /home/subversion/repo

  2. as root start svnserve /etc/init.d/svnserve start (this script should contain setting from you real environment)

  3. test from your regular account (not root nor svn): svn mkdir svn://127.0.0.1/trunk -user your_user_name_in_repo_passwd -m "Your comment to this operation"



If you found anything unclear or missing, you would consider to comment or sent me an e-mail.
Please, complain!

No comments: