1、安装svn
2、创建svn仓库目录,目录如下 /home/svn/repo
3、创建svn窗口 svnadmin create /home/svn/repo
4、进入 repo目录中的conf目录
5、修改配置文件:
svnserve.conf
anon-access = read
password-db = passwd
authz-db = authz
passwd(配置帐号密码):
[users]
# harry = harryssecret
# sally = sallyssecret
test = test
authz(配置帐号权限):
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
# [/foo/bar]
# harry = rw
# &joe = r
# * =
[/]
test = rw
注:1、[/]表示项目根目录
2、 test = rw ,前面是创建的帐号 ,后面的是权限
6、开启svn服务 svnserve -d -r /home/svn
注:-d 后台运行 -r 指定svn目录(目录是仓库目录的上一级)
7、验证svn是否正常启动
ps aux|gerp svn
ubuntu 5375 0.0 0.0 72496 2800 ? Ss 17:20 0:00
svnserve -d -r /home/svn/
8、上传文件测试一下
访问地址:svn://ip/repo
注:repo就是自己创建的仓库