1. install svn apt-get subversion
2. create repos svnadmin create project
3. modify conf/svnserv.conf open
non-access = read
auth-access = write
password-db = passwd
authz-db = authz
4. add svn user and passwd
[users]
ruby = ruby
5. add authz
svnserve.conf: [general] anon-access = read auth-access = write password-db = passwd authz-db = authz passwd: [users] harry = harryssecret authz: [groups] [/] harry = rw reset [/],stand for project all resource,if you will be authz ,add dir
6. import code
svn import -m "test" android svn://192.168.1.100/project/android
file:/// 通过本地磁盘访问
http:// 与Apache组合,通过WebDAV协议访问
https:// 同上,但支持SSL协议加密连接
svn:// 通过svnserve服务自定义的协议访问
svn+ssh:// 同上,但通过SSH协议加密连接
7 start server
/usr/bin/svnserve -d -r /home/svn/ --listen-host 192.168.6.174
从test目录启动,svnserve -d -r /home/svn/android/test,根目录(/)是test,authz中规则的配置使用section[/]。访问方式为:
svn://192.168.0.87/
从android目录启动,svnserve -d -r /home/android 根目录(/)是android,authz中对android的配置使用section[android:/] ,对test的配置使用section[test:/]。访问方式为:svn://192.18.0.87/android
svn://192.18.0.87/test
如果需要svn自启动,把命令加入/etc/rc.local中
检查svn服务器是否已经启动(svn默认使用3690端口):netstat -an | grep 3690停止:killall svnserve
note:project vendor develop