Ubuntu 10.04 安装SVN服务器

Ubuntu 10.04 安装SVN服务器

1. 安装软件包
$ sudo apt-get install apache2 libapache2-svn subversion

2. 配置apache (httpd.conf)
<Location /PROJECT1>
  DAV svn  
  SVNPath /COMPANY/svnrepo/PROJECT1
  AuthType Digest
  AuthName "Subversion repository"
  AuthUserFile /COMPANY/conf/credits/credit.digest
  Require valid-user
  AuthzSVNAccessFile /COMPANY/htdocs/svnadmin/acls
</Location>

注:需要使能auth_digest模块。
$ sudo a2enmod auth_digest

3. 编辑权限管理acls
[group]
admin = ding.baohua
project = ding.baohua, paul
[/]
* = r
@admin = rw
@project = rw

4. 编辑认证文件
使用adduser.sh创建用户或修改口令

#!/bin/sh -e
if ! [ $# -eq 1 ]; then
  echo "Usage: $(basename $0) USERNAME"
  echo "Example: $(basename $0) paul"
  echo
  exit 1
fi

htdigest credit.digest "Subversion repository" $1

相关推荐