Windows2003下安装SVN服务端

首先下载最新版本的Subservion for windows,地址:http://sourceforge.net/projects/win32svn/

安装过程很简单,一路next

装完之后,需要创建repository,使用的命令是svnadmin。本例中,我们要在c:/svndemo下建立repository。那么我们使用的命令行如下:

C:/Program Files/Subversion/bin>svnadmin create c:/svndemo
C:/Program Files/Subversion/bin>

建立好repository之后,我们要对Server 进行一些简单的配置。打开c:/svndemo下的conf目录,编辑svnserve.conf,修改里面的内容。
auth-access = write
password-db = passwd
anon-access = read
前面的#去掉,打开这个注释。
同时修改anon-access = none,如果不改的话,就是无需用户名和密码就可以update
现在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
### 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 = My First Repository

修改好svnserve.conf后,我们再修改 passwd文件。加入我们需要的用户名ivan和口令123。passwd内容如下:

### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
# harry = harryssecret
# sally = sallyssecret
ivan = 123

现在就可以启动server了。启动的方法有很多种,在这里针对本文的环境我们介绍两种,一种是以deamon方式调用,一种是以Windows Service的方式调用。
如果是以deamon的方式调用,那么命令行如下:

现在就可以启动server了。启动的方法有很多种,在这里针对本文的环境我们介绍两种,一种是以deamon方式调用,一种是以Windows Service的方式调用。

如果是以deamon的方式调用,那么命令行如下:

C:/Program Files/Subversion/bin>svnserve -d -r c:/svndemo

如果用Windows Service 的方式来调用server。生成svn服务的命令如下:

C:/>sc create svn binpath= "C:/Program Files/Subversion/bin/svnserve.exe --service -r c:/svndemo" displayname= "Subversion Server" depend= tcpip start= auto
C:/>net start svn


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值