場景:

操作如下:
搭建svn服務(wù)器:192.168.43.130
1.安裝subversion
2.創(chuàng)建本地倉庫
mkdir? /haha/svn/something
svnadmin? create /haha/svn/something
3.會發(fā)現(xiàn)something下已經(jīng)有配置文件,cd /haha/svn/something/conf路徑下

都要改其配置文件:
第一個passwd:設(shè)置賬號和密碼(不用useradd創(chuàng)建)

第二個:authz認(rèn)證及權(quán)限安排

其中,方括號內(nèi)部分可有多種寫法:
??? [/]:表示根目錄及以下,根目錄是svnserve啟動時指定的,[/]表示對全部版本庫設(shè)置權(quán)限;
???[repos:/]:表示對版本庫repos設(shè)置權(quán)限;
???[repos:/sadoc]:表示對版本庫repos中的sadoc項目設(shè)置權(quán)限;
???[repos:/sadoc/oldboy]:表示對版本庫repos中的sadoc項目的oldboy目錄設(shè)置權(quán)限;
??? 權(quán)限主體可以是用戶、用戶組或*,用戶組在前面加@,*表示全部用戶;
??? 權(quán)限可以是w、r、wr和空,空表示沒有任何權(quán)限;
???authz中每個參數(shù)都要頂格寫,開頭不能有空格;
??? 對于組,要以@開頭,而用戶不需要;
第三個配置文件(重要):svnserve.conf
### This filecontrols the configuration of the svnserve daemon, if you
### use it toallow access to this repository.? (If youonly allow
### access throughhttp: and/or file: URLs, then this file is
### irrelevant.)
### Visithttp://subversion.apache.org/ for more information.
[general]
### Theanon-access and auth-access options control access to the
### repository forunauthenticated (a.k.a. anonymous) users and
### authenticatedusers, respectively.
### Valid valuesare "write", "read", and "none".
### Setting thevalue to "none" prohibits both reading and writing;
###"read" allows read-only access, and "write" allows complete
### read/writeaccess to the repository.
### The samplesettings below are the defaults and specify that anonymous
### users haveread-only access to the repository, while authenticated
### users haveread and write access to the repository.
anon-access = none
auth-access =write
### Thepassword-db option controls the location of the password
### databasefile.? Unless you specify a path startingwith a /,
### the file'slocation is relative to the directory containing
### thisconfiguration file.
### If SASL isenabled (see below), this file will NOT be used.
### Uncomment theline below to use the default password file.
password-db =/haha/svn/something/conf/passwd
### The authz-dboption controls the location of the authorization
### rules forpath-based access control.? Unless youspecify a path
### starting witha /, the file's location is relative to the the
### directorycontaining this file.? If you don'tspecify an
### authz-db, nopath-based access control is done.
### Uncomment theline below to use the default authorization file.
authz-db =/haha/svn/something/conf/authz
### This optionspecifies the authentication realm of the repository.
### If tworepositories have the same authentication realm, they should
### have the samepassword database, and vice versa.? Thedefault realm
### isrepository's uuid.
realm = /haha/svn/
### Theforce-username-case option causes svnserve to case-normalize
### usernamesbefore comparing them against the authorization rules in the
### authz-db file configuredabove.? Valid values are"upper" (to upper-
### case theusernames), "lower" (to lowercase the usernames), and
###"none" (to compare usernames as-is without case conversion, which
"svnserve.conf"61L, 3121C????

4.svnserve可以啟動

systemctl starts? svnserve
systemctl enable??? svnserve
5.啟動svn版本庫
svnserve -dr/haha/svn
檢查:ps -ef |grep svn或者netstat -ntpl查看3690端口是否開啟
+++++++++++++++++++++++++++++++++++
客戶端Centos7上:192.168.43.129
1.安裝subversion
2.創(chuàng)建一個本地存放svn的地方:mkdir /localdisk/svn
3.把130的something庫弄到本地。
命令:svn checkout svn://192.168.43.130/something

之后再/localdisk/svn/下,會發(fā)現(xiàn)有something目錄
在這something目錄下,創(chuàng)建

代碼提交三步:
1.svn add 文件名?? 把文件提交到暫存區(qū)
2.svn? commit?-m“備注”? 把文件上傳到服務(wù)器上,并且備注129文件
3.驗證服務(wù)器130上的svn賬號

4.以后服務(wù)器上用命令更新svn
svn update
5.在130上會發(fā)現(xiàn)/haha/svn/something下面還有個something,文件就在這里面
