论坛首页 综合技术论坛

window下svn配置总结

浏览 6075 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2009-06-11   最后修改:2009-06-11
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即可(谨慎的话先更新到最新版本后再提交).
论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics