创建本地的SVN 服务

首先,到这里下载 Subversion 服务端

 

http://subversion.tigris.org/servlets/ProjectDocumentList?expandFolder=469&folderID=8100

 

假设Subversion安装路径为

D:/Subversion

 

然后下载TortoiseSVN ,它是 一个 windows下的 svn客户端

 

http://tortoisesvn.net/downloads

 

 

上述两者安装完成后.可能你需要重启一下电脑

 

然后,新建一个空文件夹,以用于作为 Subversion 服务端 的版本库

 

假设版本库路径为 D:/SVNRoot/LJSvn

 

在LJSvn目录,右键按鼠标,选择 [TortoiseSVN]  菜单,选择 [创建版本库]

 

创建完成后,

D:/SVNRoot/LJSvn/conf/authz

就是 用户权限列表

 

------------------------------------------------------------------------------

 


[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average

[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
svnadmin = lj
# [/foo/bar]
# harry = rw
# &joe = r
# * =
[/]
lj = rw

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

 

------------------------------------------------------------------------------

上述红色字为作出的更改

把 lj 帐号设置为可以访问所有目录和有 读写权限

 

 

D:/SVNRoot/LJSvn/conf/passwd

为密码设置列表

 

[users]
# harry = harryssecret
# sally = sallyssecret
lj = ljlj

 

就是表示 lj 帐号的 密码是 ljlj

 

具体语法请阅读上述两个文件的注释

 

而 D:/SVNRoot/LJSvn/conf/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 = 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 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      ##密码数据库使用的文件,与上面的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                ## 用户权限库 使用的文件,与上面的authz对应

 

 

上述都做好后,我们可以在 目标服务器上建立一个 windows服务,让每次电脑启动都自动启动SVN服务

在cmd下输入如下

sc create svnserve binpath= "D:/Subversion/bin/svnserve.exe --service -r D:/SVNRoot" start= auto displayname= "SVN Server" depend= Tcpip

 

若路径失败,可以输入

 

sc delete svnserve 来删除服务

 

 

客户端使用菜单的 check out命令来检出svn上的文件

 

例如本机检出,则在 url 栏输入 svn://127.0.0.1/ljsvn/      即可

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值