CENTOS 6.6 下 subversion 安装与配置

本文介绍在CentOS 6.6环境下Subversion (SVN) 的安装步骤及配置方法,包括版本库的创建、svnserve配置文件的设置等,并提供多个版本库共用一套权限认证的具体操作。

CENTOS 6.6 下 subversion 安装与配置

一、安装

1.1、yum -y install subversion 

1.2、建立版本库

mkdir -p /dada/svndata

## 新建jinguan 版本库

svnadmin create /dada/svndata/jinguan

建立完毕后,可以看到jinguan 版本库下面应建立好了版本库的目录结构

二、配置

主要配置/dada/svndata/jinguan/conf 目录先svnserve,passwd,authz3个文件

2.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 = 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 <span style="font-family: Arial, Helvetica, sans-serif;">###本版本库目录权限</span>

### 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

[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated

 

2.2、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
quejinlong=quejinlong
dongyuncheng=dongyuncheng
lixuan=lixuan
zhouwen=zhouwen
zhengwenyong=zhengwenyong
linchenhan=linchenhan
xutong=xutong
wangzhiqiang=wangzhiqiang
chenming=chenming

### csu students
wangxiaona=wangxiaona
daiyang=daiyang
pengjun=pengjun


2.3、authz-db

 

 

[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
xmu = quejinlong,dongyuncheng,zhouwen,lixuan,linchenhan,chenming
csu = wangxiaona,daiyang,pengjun
# [/foo/bar]
# harry = rw
# &joe = r
# * =

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[jinguan:/]
@xmu = rw
#@csu = r
#[jingguan:/doc]
[jinguan:/doc]
@csu = rw

 

 

三、进阶

 

 

3.1、多个版本库共用一套权限认证

1、新建narkiiAPP版本库

svnadmin create /dada/svndata/narkiiAPP

2、设置narkiiAPP权限认证文件位置

在svnserve.conf修改

password-db = /dada/svndata/jinguan/conf/passwd

authz-db = /dada/svndata/jinguan/conf/authz

3、在jingguan 的权限认证文件增加narkiiAPP相关配置

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
quejinlong=quejinlong
dongyuncheng=dongyuncheng
lixuan=lixuan
zhouwen=zhouwen
zhengwenyong=zhengwenyong
linchenhan=linchenhan
xutong=xutong
wangzhiqiang=wangzhiqiang
chenming=chenming
likai=likai
linhuixiong=linhuixiong

### csu students
wangxiaona=wangxiaona
daiyang=daiyang
pengjun=pengjun


authz-db:

 

 

 

 

[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
xmu = quejinlong,dongyuncheng,zhouwen,lixuan,linchenhan,chenming
csu = wangxiaona,daiyang,pengjun
narkii = quejinlong,chenming,likai,linhuixiong
# [/foo/bar]
# harry = rw
# &joe = r
# * =

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[jinguan:/]
@xmu = rw
#@csu = r
#[jingguan:/doc]
[jinguan:/doc]
@csu = rw

[narkiiAPP:/]
@narkii = rw

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值