- 創建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 到自己的目錄