- 创建svn项目
输入命令 : svnadmin create project //创建项目 project
2.修改项目里的配置文件(svnserve.conf, authz, passwd)
输入命令 : vi project/conf/svnserve.conf
#anon-access = read => anon-access = none#匿名用户不可任何操作
#auth-access = write => auth-access = write#授权用户写
#password-db = passwd => password-db = passwd#启用密码配置文件
#authz-db = authz => authz-db = authz#启用认证配置文件
其他可不做修改[!]注意每行的配置前面一定不能有空格,否则报错
输入命令 : vi authz
### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to:
### - a single user,
### - a group of users defined in a special [groups] section,
### - an alias defined in a special [aliases] section,
### - all authenticated users, using the '$authenticated' token,
### - only anonymous users, using the '$anonymous' token,
### - anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
admin = test #设置admin分组的用户有 test (多用户用逗号隔开)
# [/foo/bar]
# harry = rw
# &joe = r
# * =
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[/]
@admin = rw #admin分组的权限是读和写权限
* = #表示除此之外没有任何权限
输入命令 : vi passwd
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
[users]
# harry = harryssecret
# sally = sallyssecret
test = 123456 #=号前为账号 后为密码
基本配置算是完成了!!!
3.svn 导入项目
输入命令 : svn import [源路径] [目标版本库路径] -m [日志信息]
例如 : svn import /home/svn/project/test file:///data/project/test -m '导入提示信息'
OK!项目导入成功 可以从项目版本库里取代码了
4.svn checkout 到自己的目录