MAC下工具安装使用(4)
1. 第一步:mkdir /Users/svn
2. 第二步:svnadmin create /Users/svn/repository
3. 第三步:修改respotitory目录下的conf目录下的文件
4. 1、修改passwd文件 :
5. ### This file is an example password file for svnserve.
6. ### Its format is similar to that of svnserve.conf. As shown in the
7. ### example below it contains one section labelled [users].
8. ### The name and password for each user follow, one account per line.
9.
10. [users]
11. huangyibiao = tianshi520 (这个是我自己设置的帐号和密码)
12. sally = sallyssecret
13. 2、修改authz文件
14. ### This file is an example authorization file for svnserve.
15. ### Its format is identical to that of mod_authz_svn authorization
16. ### files.
17. ### As shown below each section defines authorizations for the path and
18. ### (optional) repository specified by the section name.
19. ### The authorizations follow. An authorization line can refer to:
20. ### – a single user,
21. ### – a group of users defined in a special [groups] section,
22. ### – an alias defined in a special [aliases] section,
23. ### – all authenticated users, using the ‘$authenticated’ token,
24. ### – only anonymous users, using the ‘$anonymous’ token,
25. ### – anyone, using the ‘*’ wildcard.
26. ###
27. ### A match can be inverted by prefixing the rule with ‘~’. Rules can
28. ### grant read (‘r’) access, read-write (‘rw’) access, or no access
29. ### (”).
30.
31.
32. [aliases]
33. # joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average
34.
35.
36. [groups]
37. huangyibiao_and_sally = huangyibiao,sally
38. # harry_sally_and_joe = harry,sally,&joe
39.
40.
41. # [/foo/bar]
42. # harry = rw
43. # &joe = r
44. # * =
45.
46.
47. [/]
48. @huangyibiao_and_sally = rw
49. * =
50.
51.
52. # [repository:/baz/fuz]
53. # @harry_and_sally = rw
54. # * = r
55. 3、svnserve.conf文件
56. ### This file controls the configuration of the svnserve daemon, if you
57. ### use it to allow access to this repository. (If you only allow
58. ### access through http: and/or file: URLs, then this file is
59. ### irrelevant.)
60.
61. ### Visit http://subversion.apache.org/ for more information.
62.
63. [general]
64. ### The anon-access and auth-access options control access to the
65. ### repository for unauthenticated (a.k.a. anonymous) users and
66. ### authenticated users, respectively.
67. ### Valid values are “write”, “read”, and “none”.
68. ### Setting the value to “none” prohibits both reading and writing;
69. ### “read” allows read-only access, and “write” allows complete
70. ### read/write access to the repository.
71. ### The sample settings below are the defaults and specify that anonymous
72. ### users have read-only access to the repository, while authenticated
73. ### users have read and write access to the repository.
74. anon-access = none
75. auth-access = write
76. ### The password-db option controls the location of the password
77. ### database file. Unless you specify a path starting with a /,
78. ### the file’s location is relative to the directory containing
79. ### this configuration file.
80. ### If SASL is enabled (see below), this file will NOT be used.
81. ### Uncomment the line below to use the default password file.
82. password-db = passwd
83. ### The authz-db option controls the location of the authorization
84. ### rules for path-based access control. Unless you specify a path
85. ### starting with a /, the file’s location is relative to the the
86. ### directory containing this file. If you don’t specify an
87. ### authz-db, no path-based access control is done.
88. ### Uncomment the line below to use the default authorization file.
89. authz-db = authz
90. ### This option specifies the authentication realm of the repository.
91. ### If two repositories have the same authentication realm, they should
92. ### have the same password database, and vice versa. The default realm
93. ### is repository’s uuid.
94. # realm = My First Repository
95. ### The force-username-case option causes svnserve to case-normalize
96. ### usernames before comparing them against the authorization rules in the
97.
98. 第四步:启动服务
99. sudo svnserve -d -r /svn/repository
100. 如果没有任何提示,表示正常启动了,如果已经启动了,会提示端口已经被占用(英文的)
101.
102. 第五步:导入工程到svn
103. svn import /Users/huangyibiao/Desktop/UdpServer svn://localhost/svn/repository/SocketRepository –username harry –password harryssecret -m “commnet infomation”
104. /Users/huangyibiao/Desktop/UdpServer这个参数是工程路径
105. svn://localhost/svn/repository/SocketRepository这个是svn服务器,下的一个新建的名称SocketRepository
106. 到此,需要输入你的svn的帐号和密码,也就是前面在passwd文件中配置的。如果出现一堆Adding。。。,那就是正常配置完成了。
107.
108. 下面推荐一个好友的SVN客户端工具:versions