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!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值