2012년 10월 31일 수요일

ubuntu svn server install ( over apache )


I installed svn server under ubuntu LTS 10.04 64 bits

SVN Server Setup

1. install essentail packages
#  sudo apt-get install subversion libapache2-svn apache2

2. create repository
 # svnadmin create /home3/swmgr/tmpsvn/sample

3. configure conf file
open  /home3/swmgr/tmpsvn/sample/conf/svnserve.conf
then uncommnet belows
 auth-access = write ==> set permission
 password-db = passwd ==> indicate passward file

open /home3/swmgr/tmpsvn/sample/conf/passwd
then add user and passward

[users]
user = passwd
dokyun = hellscream

4. start svn server
 svnserve -d -r /home3/swmgr/tmpsvn/sample

5. check
# svn checkout svn://192.168.0.4 ./svn
 or
# svn checkout svn://localhost ./svn

if  ,,, /db/txn-current-lock': Permission denied  error happens when svn access
check the directory permission.
$ chmod -R 775 /home3/swmgr/tmpsvn/sample


SVN over Apache


1. set directory owner
 # sudo chown -R www-data /home3/swmgr/tmpsvn/sample/

2. configure
 open /etc/apache2/mods-enabled/dav_svn.conf
 then add

<Location /svn>
  DAV svn
  SVNPath /home3/swmgr/tmpsvn/sample
  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /etc/apache2/dav_svn.passwd
  Require valid-user
</Location>

3. add user
# sudo htpasswd2 -cm /etc/apache2/dav_svn.passwd dokyun
 or
# sudo htpasswd -cm /etc/apache2/dav_svn.passwd dokyun

4. restart apache
 sudo /etc/init.d/apache2 restart
5. check