Mac OS X系统下SVN配置

1.下载并安装Subversion
下载地址http://www.collab.net/downloads/community/
2.创建svn repository
svnadmin create
/path/to/svn/repository
3.启用svn服务
用root用户在/etc/xinetd.d/目录下创建文件svn。内容如下
service svn
{
   disable = no
   port = 3690
   protocol = tcp
   socket_type = stream
   wait = no
   user = svnroot
   server = /usr/local/bin/svnserve
   server_args = -i -r /path/to/svn/repository
   log_on_success += USERID DURATION
   log_on_failure += HOST USERID
   disable = no
}
之后用命令
kill -HUP `cat /var/run/xinetd.pid`重启xinetd服务。
4.配置svn用户权限
/path/to/svn/repository/conf/目录下存在3个文件:authz,passwd,svnserve.conf。

对于
svnserve.conf,内容如下:
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository.  (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)

### Visit http://subversion.tigris.org/ for more information.

[general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are "write", "read",
### and "none".  The sample settings below are the defaults.
anon-access = none
auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the conf directory.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control.  Unless you specify a path
### starting with a /, the file's location is relative to the conf
### directory.  If you don't specify an authz-db, no path-based access
### control is done.
### Uncomment the line below to use the default authorization file.
authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa.  The default realm
### is repository's uuid.
realm = My First Repository


对于 passwd,内容如下:
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
harry = 123456

sally = 123456


对于authz,内容如下:
### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to a
### single user, to a group of users defined in a special [groups]
### section, or to anyone using the '*' wildcard.  Each definition can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').

[groups]
harry_and_sally = harry,sally

[/]
harry = rw
* =


# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r


当多个仓库公用一个authz文件时,
[repository:/baz/fuz]格式的认证才使用。如果各个仓库有自己的配置文件时,可以不使用 [repository:/baz/fuz] 格式的认证。


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值