linux部署svn

最近有意于linux操作蔗喂,小白記錄杯缺,以便熟悉

第一步:通過yum命令安裝svnserve,命令如下:

yum -y install subversion

第二步 創(chuàng)建svn版本庫

mkdir /svn/java

第三步:創(chuàng)建svn版本庫

svnadmin create /svn/java/xxx
##其中xxx為你自己需定義的版本庫名稱

第四步 svn配置

cd /var/svn/java/xxx
ls
##有如下內(nèi)容
conf  db  format  hooks  locks  README.txt

authz:負(fù)責(zé)賬號權(quán)限的管理,控制賬號是否讀寫權(quán)限
passwd:負(fù)責(zé)賬號和密碼的用戶名單管理
svnserve.conf:svn服務(wù)器配置文件

修改authz 末尾添加 如下信息赋元,admin賬號名稱掘譬,rw 讀寫權(quán)限泰演,[] 為所有版本目錄,\ 可替換為xxx以控制權(quán)限
詳細(xì)的不介紹了

### 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

# [/foo/bar]
# harry = rw
# &joe = r
# * =

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[\]
admin=rw

修改passwd,給賬號admin 添加密碼 如下

### 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
admin = 123456

修改svnserve.conf 文件 放開anon-access = read葱轩,auth-access = write睦焕,password-db = passwd,realm = My First Repository等注釋即可 如下

### 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.apache.org/ for more information.

[general]
### The anon-access and auth-access options control access to the
### repository for unauthenticated (a.k.a. anonymous) users and
### authenticated users, respectively.
### Valid values are "write", "read", and "none".
### Setting the value to "none" prohibits both reading and writing;
### "read" allows read-only access, and "write" allows complete 
### read/write access to the repository.
### The sample settings below are the defaults and specify that anonymous
### users have read-only access to the repository, while authenticated
### users have read and write access to the repository.
anon-access = read
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.
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.
# 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
### The force-username-case option causes svnserve to case-normalize
### usernames before comparing them against the authorization rules in the
### authz-db file configured above.  Valid values are "upper" (to upper-
### case the usernames), "lower" (to lowercase the usernames), and
### "none" (to compare usernames as-is without case conversion, which
### is the default behavior).
# force-username-case = none

[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

開放端口(不同版本的有差異可自行查找)

firewall-cmd --permanent --zone=public --add-port=3690/tcp

重啟端口

firewall-cmd --reload

啟動svn

svnserve -d -r /var/svn/java

訪問svn
svn://ip:3690/xxx

關(guān)于修改svn默認(rèn)端口,如修改為81

firewall-cmd --permanent --zone=public --add-port=81/tcp
##Reload
firewall-cmd --reload
svnserve -d -r /var/svn/java--listen-port 81
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末靴拱,一起剝皮案震驚了整個濱河市垃喊,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌袜炕,老刑警劉巖缔御,帶你破解...
    沈念sama閱讀 211,743評論 6 492
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異妇蛀,居然都是意外死亡耕突,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,296評論 3 385
  • 文/潘曉璐 我一進(jìn)店門评架,熙熙樓的掌柜王于貴愁眉苦臉地迎上來眷茁,“玉大人,你說我怎么就攤上這事纵诞∩掀恚” “怎么了?”我有些...
    開封第一講書人閱讀 157,285評論 0 348
  • 文/不壞的土叔 我叫張陵浙芙,是天一觀的道長登刺。 經(jīng)常有香客問我,道長嗡呼,這世上最難降的妖魔是什么纸俭? 我笑而不...
    開封第一講書人閱讀 56,485評論 1 283
  • 正文 為了忘掉前任,我火速辦了婚禮南窗,結(jié)果婚禮上揍很,老公的妹妹穿的比我還像新娘郎楼。我一直安慰自己,他們只是感情好窒悔,可當(dāng)我...
    茶點故事閱讀 65,581評論 6 386
  • 文/花漫 我一把揭開白布呜袁。 她就那樣靜靜地躺著,像睡著了一般简珠。 火紅的嫁衣襯著肌膚如雪阶界。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 49,821評論 1 290
  • 那天聋庵,我揣著相機(jī)與錄音膘融,去河邊找鬼。 笑死珍策,一個胖子當(dāng)著我的面吹牛托启,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播攘宙,決...
    沈念sama閱讀 38,960評論 3 408
  • 文/蒼蘭香墨 我猛地睜開眼屯耸,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了蹭劈?” 一聲冷哼從身側(cè)響起疗绣,我...
    開封第一講書人閱讀 37,719評論 0 266
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎铺韧,沒想到半個月后多矮,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 44,186評論 1 303
  • 正文 獨居荒郊野嶺守林人離奇死亡哈打,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 36,516評論 2 327
  • 正文 我和宋清朗相戀三年塔逃,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片料仗。...
    茶點故事閱讀 38,650評論 1 340
  • 序言:一個原本活蹦亂跳的男人離奇死亡湾盗,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出立轧,到底是詐尸還是另有隱情格粪,我是刑警寧澤,帶...
    沈念sama閱讀 34,329評論 4 330
  • 正文 年R本政府宣布氛改,位于F島的核電站帐萎,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏胜卤。R本人自食惡果不足惜疆导,卻給世界環(huán)境...
    茶點故事閱讀 39,936評論 3 313
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望瑰艘。 院中可真熱鬧是鬼,春花似錦肤舞、人聲如沸紫新。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,757評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽芒率。三九已至囤耳,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間偶芍,已是汗流浹背充择。 一陣腳步聲響...
    開封第一講書人閱讀 31,991評論 1 266
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點兒被人妖公主榨干…… 1. 我叫王不留匪蟀,地道東北人椎麦。 一個月前我還...
    沈念sama閱讀 46,370評論 2 360
  • 正文 我出身青樓,卻偏偏與公主長得像材彪,于是被迫代替她去往敵國和親观挎。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 43,527評論 2 349

推薦閱讀更多精彩內(nèi)容