1.安裝
apt-get update
apt-get install subversion
2.配置家目錄
mkidr -p /home/svn/repo1
chmod -R 777 /home/svn/repo1
3.創(chuàng)建版本庫
svnadmin create /home/svn/repo1
4.修改配置
cd /home/svn/repo1
chmod -R 777 db
cd /conf
設(shè)置用戶
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
設(shè)置權(quán)限千扶,在authz文件里
[目錄]
用戶 = 權(quán)限
* = 表示所有用戶沒有權(quán)限
test = rw 表示test用戶有讀寫權(quán)限
xiangxin@XXServer2:/home/svn/repo2/conf$ vi authz
[groups]
#mobile組
#組名 = 用戶名1,用戶名2
mobile = test,test1
#文件夾授權(quán)
[/P2A]
#用戶授權(quán)
test1 = rw
#mobile組授權(quán)
@mobile = rw
#其他人授權(quán)
* =
啟動
svnserver -d -r /home/svn
-d 在后臺
-r 指定根目錄
停止服務(wù)直接殺進程就可以