Window下配置SVN服务器与客户端

Window下配置SVN服务器与客户端
如何配置svn服务器:前提条件:
下载最新的svn服务器:
Setup-Subversion-1.5.1.en-us.msi
下载最新的svn客户端:
TortoiseSVN-1.4.5.10425-win32-svn-1.4.5.rar
步骤:
1.下载并安装svn1.4.5-setup.rar假设你安装在:C:\Program Files\Subversion目录下。
2。建立Repository,可以打开命令窗口,输入svnadmin create D:\svn\repos,目录自己定。
3.配置Repository,进入Repository目录,这里是D:\svn\repos,你会看到conf目录,进入该目录,你会看到
svnserver.conf和passwd两个文件.
对两个文件作如下修改:
svnserve.conf
[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 = read
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 directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### 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 the
### directory containing this file. 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 = repos

注意:前面不能有空格,否则会出错!!


含义是:
未验证用户无任何权限 (如果把none修改为read就是给予读权限)
已验证用户给予写权限 (当然也能读)
密码数据存放到passwd文件中
passwd
[users]
harry = harryssecret
sally = sallyssecret
weip=weip
注意最后passwd中的配置,一个用户以行,如:weip=weip表示用户名为weip,密码为weip的一个用户。
authz文件:
[groups]
harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe

[/]
harry = rw
# &joe = r
# * =
4.启动subversion服务
两种方式启动:
(1).命令方式:svnserve -d -r D:\svn\repos默认端口是3690,如果不幸这个端口被别别的程序暂用,可以通过选项 --
listem --port=绑定端口.

你现在可以用客户端的TortoiseSVN来访问刚刚配置的服务器了,url格式:
svn://ip地址/Repository名,这里是:svn://127.0.0.1/svn/repos.
客户端的简单日常操作:
要取得当前的最新版本,SVN updated.
要修改更新到SVN,选择SVN submit即可(谨慎的话先更新到最新版本后再提交).
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值