本次实践使用百度服务器 CentOS / 7.1 x86_64 (64bit)
svnserve, version 1.7.14
安装svn
yum install subversion
查看版本
svnserve –version
返回结果
[root@chinamobile2016 ~]# svnserve –version
svnserve, version 1.7.14
(r1542130) compiled Nov 20 2015, 19:25:09Copyright (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.
创建SVN版本库
cd /storage
mkdir svn
cd svn
mkdir project
svnadmin create /storage/svn/project/
ls project/
发现已经有生成的版本库文件
配置svn信息
conf/authz
cd conf
vi authz
在[groups]下添加用户组
admin=admin(用户组名=用户名)
在[repository:/baz/fuz]下添加用户组权限
[project:/]
@admin=rw
conf/passwd
在[users]下添加
admin=test(用户名=密码)
conf/svnserve.conf
取消以下项目的注释
anon-access=none
auth-access=write
password-db=passwd
authz-db=authz
realm=project
修改/root/.subversion/server
取消store-plaintext-passwords=yes的注释并修改
确认安装openssl与openssl-devel
yum install openssl openssl-devel
启用,连接与关闭
启用
svnserve -d -r /storage/svn/
在project这个repo里导入文件
svn import xxxx svn://xx