在opensuse 搭建svn 服务器

SVN 服务器搭建

2.1 使用yum 安装SVN

关于YUM 服务器的配置参考:

Linux 搭建 YUM 服务器

http://blog.csdn.net/tianlesoftware/archive/2011/01/03/6113902.aspx

[root@singledb ~]# yum install -y subversion

Loaded plugins: rhnplugin, security

This system is not registered with RHN.

RHN support will be disabled.

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package subversion.i386 0:1.4.2-4.el5_3.1 set to be updated

--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================

 Package                Arch             Version                        Repository             Size

====================================================================================================

Installing:

 subversion             i386             1.4.2-4.el5_3.1                rhel-base             2.3 M

 

Transaction Summary

====================================================================================================

Install      1 Package(s)        

Update       0 Package(s)        

Remove       0 Package(s)        

Total download size: 2.3 M

Downloading Packages:

subversion-1.4.2-4.el5_3.1.i386.rpm                                          | 2.3 MB     00:00    

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing     : subversion                                                                   1/1

 

Installed:

  subversion.i386 0:1.4.2-4.el5_3.1                                                                

Complete!

[root@singledb ~]#

验证安装版本:

[root@singledb ~]# svnserve --version

svnserve, version 1.4.2 (r22196)

   compiled Aug  5 2009, 19:03:56

Copyright (C) 2000-2006 CollabNet.

Subversion is open source software, see http://subversion.tigris.org/

This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository back-end (FS) modules are available:

* fs_base : Module for working with a Berkeley DB repository.

* fs_fs : Module for working with a plain file (FSFS) repository.

2.2 创建SVN 版本库

[root@singledb ~]# mkdir /home/svn

[root@singledb ~]# svnadmin create /home/svn/repos      ( repos 为版本库名称)

2.3 启动和停止SVN服务

1)启动SVN服务:

[root@singledb conf]# svnserve -d -r /u02/svn

       -d表示后台运行

       -r 指定根目录是 /u02/svn

[root@singledb conf]# ps -ef | grep svn

root      4592     1  0 18:04 ?        00:00:00 svnserve -d -r /u02/svn

root      4594  3709  0 18:04 pts/1    00:00:00 grep svn

2)停止SVN服务:

ps -aux |grep svn

kill -9 进程杀掉

2.4  SVN 配置

创建版本库后,在这个目录下会生成3个配置文件:

[root@singledb conf]# pwd

/u02/svn/davesvn/conf

[root@singledb conf]# ls

authz  passwd  svnserve.conf

1svnserve.conf:  svn服务配置文件下。

2passwd: 用户名口令文件。

3authz: 权限配置文件。 

svnserve.conf 文件, 该文件配置项分为以下5项:

       anon-access: 控制非鉴权用户访问版本库的权限。

       auth-access:  控制鉴权用户访问版本库的权限。

       password-db: 指定用户名口令文件名。

       authz-db:指定权限配置文件名,通过该文件可以实现以路径为基础的访问控制。

       realm:指定版本库的认证域,即在登录时提示的认证域名称。若两个版本库的认证域相同,建议使用相同的用户名口令数据文件


例子:

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
woonill = 11111
caimingqin = 11111
jimmy=jimmy
seonghoo=11111
sunghoo=11111
skyzhang=gocjs1023
zw=zw
gaojie=111111
longxue=11111
minglei=1111
zhangwei=1111
wangling=111111


auth 权限文件:

### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization 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 by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').

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

[groups]
msg-devp=woonill,caimingqin
dms-devp=woonill,seonghoo,caimingqin
qup-design=woonill
html-coder=jimmy,skyzhang,caimingqin,sunghoo
sunghoo=orion
expenses-devp=sunghoo,caimingqin,minglei,zhangwei
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe

# [/foo/bar]
# harry = rw
# &joe = r
# * =

[repos:/]
@msg-devp=r
*=r
woonill=rw
caimingqin=rw

[repos:/Devp-Tools]
@msg-devp=rw

[repos:/msg-broker]
@msg-devp=rw
@qup-design=r

[repos:/html]
*=rw

[repos:/html/dms]
@html-coder=rw
*=r

[repos:/dms/docs]
@dms-devp=rw
jimmy=rw
*=r

[repos:/dms/requirement]
caimingqin=rw
@html-coder=rw

[repos:/dms/source/html]
@html-coder=rw

[repos:/Orion-Job/dms-job]
caimingqin=rw
woonill=rw

[repos:/dms/source/flex]
@html-coder=rw
caimingqin=rw

[repos:/dms/source/java/dsource]
@dms-devp=rw
jimmy=rw
seonghoo=rw
sunghoo=rw
zw=r

[repos:/dms/source/java/rsource]
woonill=rw
caimingqin=rw
jimmy=rw
sunghoo=rw

[repos:/dms/source/java/nsource]
woonill=rw
caimingqin=rw
jimmy=rw
seonghoo=rw

[repos:/test-source/proqup-devp]
woonill=rw
sunghoo=rw

[repos:/SAP-EP]
*=rw


[repos:/Expenses/analysis]
longxue=rw

[repos:/Expenses/app]
@expenses-devp=rw

[repos:/Expenses/requirement]
gaojie=rw
wangling=rw

[repos:/rcp]
caimingqin=rw
[repos:/kpi]
sunghoo=wr
jimmy=rw

[repos:/Aop/analysis]
longxue=rw
[repos:/Aop]
caimingqin=rw
woonill=rw







评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值