用新的用户而非root来配置svn。
#useradd -d /usr/public -m svn
#passwd svn
假设SVN数据库目录为/usr/public/repos,我们关心的项目为/usr/public/repos/project
1、SVN启动
svnserve -d -r /usr/public/repos
(指定端口等启动SVN:svnserve -d --listen-port 8085 --listen-host xx.xx.xx.xx -r /usr/public/)
2、新建project
svnadmin create /usr/public/repos/proect
3、导入project
svn import 本地目录 file:///usr/public/repos/project -m "Initial import"
4、Checkout
svn checkout file:///usr/public/repos/project
5、权限配置
在/usr/public/repos/project/conf下:
(1)修改svnserve.conf文件
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
(2)修改passwd文件
在[users下添加用户和密码]
user1 = password1
(3)修改authz文件
[groups]
harry_and_sally = user1,user2
[/]
@harry_and_sally = rw
* = r