SVN的配置。包括单父级目录,多子级目录的配制方法

2.1--

首先安装完SVN之后。需要创建一个目录作为总的仓储所有文件

mkdir /mnt/TECfs-01/svn/project

2.2—

新建一个版本仓库

Svnadmin create/mnt/TECfs-01/svn/project

2.3—

在一个其他无关的目录下新建一个临时文件夹(只是临时,配置完成后可以删除)

2.3.1-      mkdir project project/serverproject/client project/document project/share

2.3.2-  同步到刚才创建的版本仓库中,

     svn import project/ file://mnt/TECfs-01/svn/project -m “init”

2.3.3-删除临时创建的目录

     rm –rf project

 

2.4—

之后就是配置/mnt/TECfs-01/svn/project/conf/

目录下有3个配置文件,如下图:

分别是authz,passwd,svnserve.conf

首先配置authz文件。

 

如下配置:

### This file is an exampleauthorization file for svnserve.

### Its format is identical to that ofmod_authz_svn authorization

### files.

### As shown below each section definesauthorizations for the path and

### (optional) repository specified bythe section name.

### The authorizations follow. Anauthorization line can refer to:

### - a single user,

### - a group of users defined in a special [groups] section,

### - an alias defined in a special [aliases] section,

### - all authenticated users, using the '$authenticated' token,

### - only anonymous users, using the '$anonymous' token,

### - anyone, using the '*' wildcard.

###

### A match can be inverted byprefixing the rule with '~'. Rules can

### grant read ('r') access, read-write('rw') access, or no access

### ('').

 

[aliases]

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

 

[groups]

# harry_and_sally = harry,sally

# harry_sally_and_joe =harry,sally,&joe

project_shr = aa,  bb, cc, dd, ee, ff, gg

project_ser = aa, bb

project_cli = cc, ee, ff

project_doc = gg

 

[project:/share]

@project_shr = rw

* =

 

[project:/server]

@project_ser = rw

* =

 

[project:/client]

@project_cli = rw

* =

 

[project:/document]

@project_doc = rw

* =

 

 

# [/foo/bar]

# harry = rw

# &joe = r

# * =

 

# [repository:/baz/fuz]

# @harry_and_sally = rw

# * = r

 

上面都是authz的配置。

 

 

下面是passwd的配置:

### This file is an example passwordfile for svnserve.

### Its format is similar to that ofsvnserve.conf. As shown in the

### example below it contains onesection labelled [users].

### The name and password for each userfollow, one account per line.

 

[users]

# harry = harryssecret

# sally = sallyssecret

aa = 123456

bb = 123456

cc = 123456

dd = 123456

ee = 123456

ff = 123456

gg = 123456

这是修改用户密码,是很简单的修改。

 

下面是svnserve.conf的文件。他是所有配置文件的汇总。

### This file controls theconfiguration of the svnserve daemon, if you

### use it to allow access to thisrepository.  (If you only allow

### access through http: and/or file:URLs, then this file is

### irrelevant.)

 

### Visit http://subversion.tigris.org/for more information.

 

[general]

### These options control access to therepository 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 thelocation of the password

### database file.  Unless you specify a path starting with a /,

### the file's location is relative tothe directory containing

### this configuration file.

### If SASL is enabled (see below),this file will NOT be used.

### Uncomment the line below to use thedefault password file.

password-db = passwd

### The authz-db option controls thelocation of the authorization

### rules for path-based accesscontrol.  Unless you specify a path

### starting with a /, the file'slocation is relative to the the

### directory containing thisfile.  If you don't specify an

### authz-db, no path-based accesscontrol is done.

### Uncomment the line below to use thedefault authorization file.

authz-db = authz

### This option specifies theauthentication realm of the repository.

### If two repositories have the sameauthentication realm, they should

### have the same password database,and vice versa.  The default realm

### is repository's uuid.

# realm = My First Repository

 

[sasl]

### This option specifies whether youwant to use the Cyrus SASL

### library for authentication. Defaultis false.

### This section will be ignored ifsvnserve is not built with Cyrus

### SASL support; to check, run'svnserve --version' and look for a line

### reading 'Cyrus SASL authenticationis available.'

# use-sasl = true

### These options specify the desiredstrength of the security layer

### that you want SASL to provide. 0means no encryption, 1 means

### integrity-checking only, valueslarger than 1 are correlated

### to the effective key length forencryption (e.g. 128 means 128-bit

### encryption). The values below arethe defaults.

# min-encryption = 0

# max-encryption = 256

 

以上是SVN的配置。

如果以后还想加入子级目录,与server,client,document,share目录同级的话,只需要在另外一个不想关的目录下创建一个临时目录即可。具体步骤同2.3所示。


注:一朋友有一个问题:"别人使用SVN上传文件之后,他就更新不了",这个我正在查找。待找到了,我会重写添加的。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值