linux SVN安装及配置教程(附docker教程)

1.环境
centos6.4

2.安装svn
yum -y install subversion

3.配置

建立版本库目录
mkdir /www/svndata

svnserve -d -r /www/svndata

4.建立版本库

创建一个新的Subversion项目
svnadmin create /var/www/svndata/app

配置允许用户jiqing访问
cd /var/www/svndata/app/conf

vi svnserve.conf
anon-access=none
auth-access=write
password-db=passwd

注:修改的文件前面不能有空格,否则启动svn server出错,anon-access=none 否则无法读取日志

vi 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.
### 在下面添加用户和密码,每行一组username = password
[users]
# harry = harryssecret
# sally = sallyssecret
###===========下面是我添加的用户信息========#######
iitshare = password1
itblood = password2

 vi authz

 
[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
 
# [/foo/bar]
# harry = rw
# &joe = r
# * =
 
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
 
###--------------------下面我新加的------------------------###
###屏蔽掉上面的[groups] 因为在下面添加了
 
[groups]
devteam = dyn, itblood #devteam 项目组包括两个用户dyn,itblood
 
[/]
dyn = rw
itblood =
[tshop:/tb2c]
@devteam = rw
itblood =

  

svnserve -d -r /www/svndata启动
killall svnserve关闭

 

 

docker 安装:

docker run --restart always --name svn -d -v /root/dockers/svn:/var/opt/svn -p 3690:3690 garethflowers/svn-server

  

进入容器中进行配置

docker exec -it svn /bin/sh

  参考博客:https://www.cnblogs.com/daryl-blog/p/11369577.html

 

posted @ 2017-02-03 16:22  佚小名  阅读(320)  评论(0编辑  收藏  举报