0.安装Subversion
可在http://subversion.tigris.org下载。

1.选定一个目录(例如:E:\SvnRepository)作为版本库的根目录。
2.创建自己项目的版本库(例如ProjTest),有两种方法:
a.用命令行创建版本库

svnadmin create --fs-type fsfs ProjTest

b.用TortoiseSVN创建版本库
在E:\SvnRepository目录下建立文件夹,命名为ProjTest,进入此文件夹,右键选择TortoiseSVN → 在此创建版本库...

3.本机模式使用此版本库
svn路径为:file:///E:/SvnRepository/ProjTest
本机模式,默认是允许匿名用户读写的。

4.网络使用此版本库
在Subversion中包含一个轻型的独立服务器svnserve,可以注册为Windows服务,具体方法如下:

a.安装svn服务:

@echo off
set BinPath=\"D:\Program Files\Subversion\bin\svnserve.exe\"
set RepositoryRootPath="E:\SvnRepository"
set DisplayName="Subversion Service"

sc create svnserve binPath= "%BinPath% --service --root %RepositoryRootPath%" DisplayName= %DisplayName% depend= tcpip start= auto
sc description svnserve "版本库(基于Subversion)"
net start %DisplayName%

b.启动服务:

@echo off
net start "Subversion Service"

c.停止服务:

@echo off
net stop "Subversion Service"

d.卸载服务:

@echo off
net stop "Subversion Service"
sc delete svnserve

svn路径为:
svn://localhost/ProjTest

e.用户与权限设置
e.1 修改版本库目录的conf/svnserve.conf文件

[general]
#none禁止访问;read可读;write可读写
#匿名,禁止访问
anon-access = none

#验证通过的用户,可读写
auth-access = write

#指定用户名,密码存储在本目录下的passwd中
password-db = passwd

e.2 在passwd文件中添加用户名和密码,格式如下

[users]
user1 = password1

本文链接地址: SVN服务器的创建
https://blog.qingfengju.com/index.asp?id=223

上一篇: Windows下连接Oracle数据库的方法
下一篇: 用命令行下的FTP实现自动下载&上传文件,用宏定制Visual studio

分类:Win32/C++ 查看次数:6384 发布时间:2010/6/21 21:15:49