SVN安装配置使用

1.安装
apt-get update
apt-get install subversion
2.配置家目录
mkidr -p /home/svn/repo1
chmod -R 777 /home/svn/repo1
3.创建版本库
svnadmin create /home/svn/repo1
4.修改配置
cd /home/svn/repo1
chmod -R 777 db
cd /conf

设置用户

root@XXServer2:/home/svn/repo2/conf# cat svnserve.conf | grep -v ^# | grep -v ^$
[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
[sasl]
root@XXServer2:/home/svn/repo2/conf#

添加用户,在passwd文件里,
用户 = 密码

xiangxin@XXServer2:/home/svn/repo2/conf$ vi passwd 
[users]
# harry = harryssecret
# sally = sallyssecret
test1 = 11111

设置权限,在authz文件里
[目录]
用户 = 权限

* = 表示所有用户没有权限
test = rw 表示test用户有读写权限

xiangxin@XXServer2:/home/svn/repo2/conf$ vi authz
[groups]
#mobile组
#组名 = 用户名1,用户名2
mobile = test,test1
#文件夹授权
[/P2A]
#用户授权
test1 = rw
#mobile组授权
@mobile = rw
#其他人授权
* =

启动

svnserver -d -r /home/svn

-d 在后台
-r 指定根目录
停止服务直接杀进程就可以

你可能感兴趣的:(SVN安装配置使用)