centos安裝svn,centos客戶端運用svn

場景:

操作如下:

搭建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,文件就在這里面

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,859評論 0 10
  • 一. 介紹SubGit是用java語言編寫的。SubGit是一種subversion與git代碼庫之間雙向同步工具...
    Albert陳凱閱讀 1,141評論 0 1
  • 原文: 曲則全,枉則直,洼則盈,敝則新,少則得,多則惑。是以圣人抱一為天下式。不自見,故明;不自是,故彰;不自伐,...
    擺渡彼岸閱讀 961評論 0 2
  • 有許多星期一 塞在角落里 兒童們將它們丟在那兒 好久以前,所以我將它們搜集 起來,清洗干凈 晾起來讓它們干。 時間...
    東豐林波閱讀 193評論 0 0
  • 推物君問我,男生在節(jié)日的時候都喜歡收到什么樣的禮物, 與其費勁腦汁的想,不如讓我直接告訴你答案吧。你可以——送!皮...
    愛吃愛玩的悠嘻猴閱讀 473評論 0 0

友情鏈接更多精彩內(nèi)容