centos 安装svn服务
1. # yum install subversion
2.然后检查下安装的版本号 因为版本号不同可能会出现不同的情况
版本 信息
[root@VM_137_37_centos ~]# svnserve --version
svnserve, version 1.7.14 (r1542130)
compiled Aug 23 2017, 19:25:09
Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/
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.
Cyrus SASL authentication is available.
3.创建适合的存储svn的仓库
mkdir -p /home/svn/svnrepos
4.创建版本库 svnadmin create /home/svn/svnrepos
5.然后去到创建的仓库地址创建版本库 cd/home/svn/svnrepos
会有如下内容:
[root@VM_137_37_centos svnrepos]# ls -1
README.txt
conf
db
format
hooks
locks
6.然后进入到conf文件中修改内容
cd conf/
authz文件是权限控制文件
passwd是帐号密码文件
svnserve.conf SVN服务配置文件
7 修改密码
### 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
yunwei = 123456
新增一个用户密码
8修改权限
html] view plaincopy
[/]
yunwei = rw
让其有读写的权限 如果有特殊权限要求svn上寻找
9.修改svnserve.conf文件 vi svnserve.conf
anon-access = read #匿名用户可读
auth-access = write #授权用户可写
password-db = passwd #使用哪个文件作为账号文件
authz-db = authz #使用哪个文件作为权限文件
realm = /home/svn/svnrepos # 认证空间名,版本库所在目录
注意去掉注释后前面不能有空格 要不然在执行的时候会报错
10.启动svn
svnserve -d -r /home/svn/svnrepos(停止SVN命令 killall svnserve)
11.然后就可以去windows安装svn,然后鼠标右键check out测试了
svn://192.168.64.147
输入svn的地址就好后面的内容可以不输入
本文转自去轻狂书生51CTO博客,原文链接:http://blog.51cto.com/8999a/1964387 ,如需转载请自行联系原作者