MAC 启动SVN

Mac自带了SVN服务,只要我们配置一下就可以使用了。


  1. 创建svn repository

            

[java]  view plain copy
  1. svnadmin create /Users/user/Tools/DevelopTools/svn/repository  
 

       2.  配置svn用户权限/Users/user/Tools/DevelopTools/svn/repository/conf/目录下存在3个文件:authz、passwd、svnserve.confauthz,内容如下:

           authz文件:

          

[html]  view plain copy
  1. ### This file is an example authorization file for svnserve.  
  2. ### Its format is identical to that of mod_authz_svn authorization  
  3. ### files.  
  4. ### As shown below each section defines authorizations for the path and  
  5. ### (optional) repository specified by the section name.  
  6. ### The authorizations follow. An authorization line can refer to:  
  7. ###  - a single user,  
  8. ###  - a group of users defined in a special [groups] section,  
  9. ###  - an alias defined in a special [aliases] section,  
  10. ###  - all authenticated users, using the '$authenticated' token,  
  11. ###  - only anonymous users, using the '$anonymous' token,  
  12. ###  - anyone, using the '*' wildcard.  
  13. ###  
  14. ### A match can be inverted by prefixing the rule with '~'. Rules can  
  15. ### grant read ('r') access, read-write ('rw') access, or no access  
  16. ### ('').  
  17.   
  18. [aliases]  
  19. joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average  
  20.   
  21. [groups]  
  22. <span style="color:#FF6666;">user_group = user</span>  
  23. harry_and_sally = harry,sally  
  24. harry_sally_and_joe = harry,sally,&joe  
  25.   
  26. <span style="color:#FF6666;">[/]  
  27. user=rw  
  28. # &joe = r  
  29. * =</span>  
  30.   
  31. # [repository:/baz/fuz]  
  32. # @harry_and_sally = rw  
  33. # * = r  

         passwd文件:       
[html]  view plain copy
  1. ### This file is an example password file for svnserve.  
  2. ### Its format is similar to that of svnserve.conf. As shown in the  
  3. ### example below it contains one section labelled [users].  
  4. ### The name and password for each user follow, one account per line.  
  5.   
  6. [users]  
  7. harry = harryssecret  
  8. sally = sallyssecret  
  9. <span style="color:#FF6666;">user=123456</span>  

         svnserve.conf文件:

        

[html]  view plain copy
  1. ### This file controls the configuration of the svnserve daemon, if you  
  2. ### use it to allow access to this repository.  (If you only allow  
  3. ### access through http: and/or file: URLs, then this file is  
  4. ### irrelevant.)  
  5.   
  6. ### Visit http://subversion.apache.org/ for more information.  
  7.   
  8. [general]  
  9. ### These options control access to the repository for unauthenticated  
  10. ### and authenticated users.  Valid values are "write", "read",  
  11. ### and "none".  The sample settings below are the defaults.  
  12. <span style="color:#FF0000;">anon-access = read  
  13. auth-access = write</span>  
  14. ### The password-db option controls the location of the password  
  15. ### database file.  Unless you specify a path starting with a /,  
  16. ### the file's location is relative to the directory containing  
  17. ### this configuration file.  
  18. ### If SASL is enabled (see below), this file will NOT be used.  
  19. ### Uncomment the line below to use the default password file.  
  20. <span style="color:#FF0000;">password-db = passwd</span>  
  21. ### The authz-db option controls the location of the authorization  
  22. ### rules for path-based access control.  Unless you specify a path  
  23. ### starting with a /, the file's location is relative to the the  
  24. ### directory containing this file.  If you don't specify an  
  25. ### authz-db, no path-based access control is done.  
  26. ### Uncomment the line below to use the default authorization file.  
  27. <span style="color:#FF0000;">authz-db = authz</span>  
  28. ### This option specifies the authentication realm of the repository.  
  29. ### If two repositories have the same authentication realm, they should  
  30. ### have the same password database, and vice versa.  The default realm  
  31. ### is repository's uuid.  
  32. realm = My First Repository  
  33.   
  34. [sasl]  
  35. ### This option specifies whether you want to use the Cyrus SASL  
  36. ### library for authentication. Default is false.  
  37. ### This section will be ignored if svnserve is not built with Cyrus  
  38. ### SASL support; to check, run 'svnserve --version' and look for a line  
  39. ### reading 'Cyrus SASL authentication is available.'  
  40. use-sasl = true  
  41. ### These options specify the desired strength of the security layer  
  42. ### that you want SASL to provide. 0 means no encryption, 1 means  
  43. ### integrity-checking only, values larger than 1 are correlated  
  44. ### to the effective key length for encryption (e.g. 128 means 128-bit  
  45. ### encryption). The values below are the defaults.  
  46. min-encryption = 0  
  47. max-encryption = 256  

以上红色部分表示需要更改得地方,请注意!


3. 启动SVN服务

[html]  view plain copy
  1. svnserve -d -r /Users/user/Tools/DevelopTools/svn/repository/  

之后,你想干嘛就可以干嘛了!


本文参考:http://wicrewoft.blog.51cto.com/210706/1031831


http://www.2cto.com/os/201211/167999.html

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值