svn服务器配置

仅作记录,供以后参考:
1. #svnserve 检查是否正确安装svn服务器
2.svnadmin create /dir/xxx  创建一个根目录
3.进入XXX,首先配置 svnserve.conf 开启12 13 18 25 30这些单井号的行,将12行的 anon-access = read 改为 anon-access = none
4.配置authz , 
     12 [groups]
     13 # harry_and_sally = harry,sally
     14 admin = xxxuser,xxxsuer1  //新添加,用户
末尾添加权限配置
   23 [/]
     24 @admin = rw
     25 * =

5.配置 passwd 
      6 [users]
      7 # harry = harryssecret
      8 # sally = sallyssecret
      9 xxxuser = 123456
     10 xxxuser1 = 123456


6.完成配置,启动服务 svnserve -d -r /dir/xxx

可以通过 svn import 或者 svn co svn://127.0.0.1 下载一个版本后 ,svn add 添加文件


7.  编辑 .subversion 里面可以配置过滤规则,这样可以过滤svn st 查看到的改变列表



1 在/etc/rc.d/init.d/下建立svnserved文档 
2 copy到svnserved文档下 

Shell代码  
  1. svnserve -d -r /xxx/xxx/xxx  
  2. case "$1" in  
  3. start)  
  4. echo "starting svnserve..."  
  5. svnserve -d -r /xxx/xxx/xxx --listen-host xxx.xxx.xxx.xxx  
  6. echo "finished"  
  7.   
  8. ;;  
  9.   
  10. stop)  
  11. echo "stoping svnserve"  
  12. killall svnserve  
  13. echo "finished"  
  14.   
  15. ;;  
  16.   
  17. restart)  
  18.   
  19. $0 stop  
  20. $0 start  
  21.   
  22. ;;  
  23.   
  24. *)  
  25.   
  26. exit  
  27.   
  28. esac  

4 更改脚本为可执行属性,chmod 557 /etc/rc.d/init.d/svnserved 
5 将svnserved脚本设置为系统服务, chkconfig  --add svnserved, 重启系统,ok!

你可能感兴趣的:(svn服务器配置)