Setup a Subversion server

Setup a Subversion server

0. Introduction 
Install a subversion server using apache service.
This server uses digest for password authentication and per-directory access control.
1. Install Apache2 and mod_dav_svn
Don't remember to enable the dav_svn module.

2. Create the subversion repository
$sudo svnadmin create /opt/svn
3. Configure mod_dav_svn

$vi /etc/apache2/mods_available/subversion.conf

<Location /training>
        DAV svn
        SVNPath /opt/svn

        AuthType Digest
        AuthDigestProvider file
        AuthName "SVN"
        AuthUserFile /opt/svn/digest-users
        Satisfy Any
        require valid-user

        AuthzSVNAccessFile /opt/svn/authz
</Location>

$sudo ln -s /etc/apache2/mods_available/subversion.conf /etc/apache2/mods_enabled/
$sudo ln -s /etc/apache2/mods_available/auth_digest.load /etc/apache2/mods_enabled/

4. Add users
$sudo htdigest -c /opt/svn/digest-users admin

5. Configure the access permission policy
$sudo vi /opt/svn/authz
[groups]
admins=admin
powers=joseph
developers=dev1,dev2

[/]
@admins=rw
*=r

[/sandbox]
*=rw

[/project1]
*=
@admins=rw
@powers=rw
@developers=r

[/project1/trunk/src]
@tdevelopers=rw

6. Reset file owner and restart Apache
$sudo chown www-data:www-data /opt/svn -R
$sudo /etc/init.d/apache2 restart

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值