svn服务器搭建和使用_CentOS下的SVN服务器搭建过程

b98328eec7ad070252125edd6be0db1e.png

1.yum安装svn服务

yum install -y subversion

2.验证是否安装完成

svnserve --versionmkdir /disk02/svndatasvnserve -d -r /disk02/svndata/

3.创建svn版本库

mkdir /var/svn #我这里把版本库放在了var目录下的svn文件夹,方便管理

  1. svnadmin create /var/svn/repo0 #我这里将svn作为所有版本库的目录,并创建了一个名为repo0的版本库

4.配置当前的版本库

创建版本库后,在当前版本库目录中会生成下面的文件,其中我们关心的是配置文件。

[plain]view plaincopyprint?

[root@localhost svn]# lsrepo0[root@localhost svn]# cd repo0[root@localhost repo0]# lsconf db format hooks locks README.txt[root@localhost repo0]# pwd/var/svn/repo0[root@localhost repo0]# cd conf[root@localhost conf]# ls -a. .. authz passwd svnserve.conf

说明

(1)svnserve.conf: svn服务综合配置文件。

(2)passwd: 用户名口令文件。

(3)authz: 权限配置文件。

4.1 修改passwd文件

[plain]view plaincopyprint?

### 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 = sallyssecretrepouser0 = user0passwdrock=rockpasswd

其中对应的是 用户名=密码 ,其中等号两边的空格不是必须的。

4.2修改authz文件

[plain]view plaincopyprint?

[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,&joeteam0=erpouser0 #将上面创建的分成两个组team1=rock# [/foo/bar]# harry = rw# &joe = r #上面的别名定义在这里实现 &在这里理解为指针就很容易了# * =# [repository:/baz/fuz]# @harry_and_sally = rw# * = r[repo0:/]@team0=r@team1=rw# 第一个小组只有读取的权限,第二个小组有读写的权限# 单个版本库的权限配置在这个文件中实现

4.3 修改svnserve.conf

[plain]view plaincopyprint?

  1. vim svnserve.conf

[plain]view plaincopyprint?

[general]### These options control access to the repository for unauthenticated### and authenticated users. Valid values are "write
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值