1:下载SVN服务器的包
下载subversion,我这里选择Setup-Subversion-1.6.6.msi
2:安装好subversion的包,然后cd到安装目录,我的安装目录是C:\Subversion (注意:安装目录结构最好不要有空格)
cd C:\Subversion ;
3:在D盘创建目录 d:/svn,作为SVN储存库;
然后在执行命令:svnadmin create D:/svn/repos1
成功后,会在创建repos1目录
4:修改respos1下面的conf目录下面的
svnserve.conf,passwd,authz 三个文件
1) 首先修改 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
去掉红的的注释,注意:一定要置顶 不要有空格,、
2): 修改passwd
[users]
harry = harryssecret
左边是用户,邮编是密码
上面的用户是 harry 。密码是:harryssecret
3):修改authz
//配置组
[groups]
admin= harry
dev=user2
配置 文件目录的权限
[/]
@admin=rw
@doc=r
4):启动服务
sc create svnservice binPath= "C:/subversion/bin/svnserve.exe --service -r D:/svn" start= auto
启动服务后访问:
svn://127.0.0.1/repos1
输入用户名:harry
密码:harryssecret
就可以根据权限访问了。
参考资料
http://blog.csdn.net/bluesmile979/article/details/3719511