鐢變簬闈炴硶鍏蟲満瀵艱嚧閲嶅惎鍚庢棤娉曡仈緗?/span>
淇敼SVN閰嶇疆鏂囦歡
nano /home/svn/repository/test/conf/svnserve.conf
浠ヤ笅涓烘枃浠跺唴瀹癸細
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository. (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
### Visit http://subversion.tigris.org/ for more information.
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults
# 鏈巿鏉冮厤緗負紱佹璁塊棶none錛屽凡鎺堟潈閰嶇疆涓哄彲浠ヨ鍐檞rite
anon-access = none
auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
# 鐢ㄦ埛鏁版嵁搴撴枃浠訛紝閰嶇疆鎺堟潈鐢ㄦ埛錛屽綋鍓嶄嬌鐢ㄧ殑鏂囦歡鏄拰svnserve.conf鍦ㄧ浉鍚岀洰褰曚笅鐨刾asswd鏂囦歡錛屼篃鍙互鎸囧畾鍏朵粬緇濆璺緞鏂囦歡錛屽錛?home/svn/passwd
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file's location is relative to the the
### directory containing this file. If you don't specify an
### authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
# 鎺堟潈鏂囦歡錛岄厤緗鍚岀敤鎴烽厤緗?/span>
authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository's uuid.
# realm = My First Repository
[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated
### to the effective key length for encryption (e.g. 128 means 128-bit
### encryption). The values below are the defaults.
# min-encryption = 0
# max-encryption = 256
淇濆瓨
# ctrl + o 鍥炶濺
閫鍑?/span>
# ctrl + x
閰嶇疆鐢ㄦ埛
# nano 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
IceWee = IceWee
澧炲姞鐢ㄦ埛IceWee錛屽瘑鐮佷篃涓篒ceWee錛?鍙蜂袱渚ч渶瑕佹湁絀烘牸錛屼繚瀛?ctrl + o 鍥炶濺)閫鍑?ctrl + x)
閰嶇疆璁塊棶鏉冮檺
# nano 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
developers = IceWee
# [/foo/bar]
# harry = rw
# &joe = r
# * =
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[/]
* = r
IceWee = rw
@developers = rw
[/tags]
IceWee = rw
榛樿鎵鏈夌敤鎴峰彲璇誨彇鏍癸紝IceWee鍙互璇誨啓鏍廣傚彲浠ュ垎鍒瀛愮洰褰曡繘琛屾巿鏉冿紝濡備笂鐨則ags鐩綍錛孖ceWee鍏鋒湁璇誨啓鏉冮檺錛屼互鍙奍ceWee鎵鍦ㄧ殑緇刣evelopers涔熷叿澶囪鍐欐潈闄愩?/span>
鍚姩SVN鏈嶅姟鍣?/span>
# svnserve -d -r /home/svn/repository
-d鍚箟涓哄悗鍙拌繍琛岋紙daemon錛夛紝-r鎸囧畾鐨勬牴鐩綍錛屽璁塊棶test搴旇浣跨敤榪欐牱鐨勫湴鍧 svn://hostname:port/test
鍋滄SVN鏈嶅姟
# killall svnserve
澶囦喚榪樺師鍛戒護錛屼笌oracle鐨勫浠芥湁浜涚被浼?/span>
瀵煎嚭
# svnadmin dump /home/svn/repository/test > /home/bak/test.dump
瀵煎叆
# svnadmin load /home/svn/repository/demo < /home/bak/demo.dump
瀵煎叆鍓嶆彁錛?/span>
蹇呴』鍏堝垱寤鴻瀵煎叆鐗堟湰搴撶洰褰曪紝濡備笂鐨刣emo錛屽垯闇瑕佸仛浠ヤ笅鎿嶄綔
# svnadmin create /home/svn/respository/demo
淇敼svnserve.conf銆乸asswd銆乤uthz絳夋枃浠訛紝鍓嶉潰宸蹭粙緇?/span>