Linux下SVN安装配置

Posted on Posted in 服务器端经验分享

第一章 安装

1. 采用源文件编译安装。源文件共两个,为:
subversion-1.6.1.tar.gz (subversion 源文件)
subversion-deps-1.6.1.tar.gz (subversion依赖文件)
注意文件版本必须一致,否则很容易产生各种奇怪的问题.

2. 上传以上两个文件到服务器上,解压。解压命令为:

1 tarxfvz subversion-1.6.1.tar.gz
2 tarxfvz subversion-deps-1.6.1.tar.gz

指令简介:tar 为解压命令,xfvz为tar命令的参数,用于解压tar.gz格式压缩的文件。
 
3. 解压后生成 subversion-1.6.1 子目录,两个压缩包解压后都会自动放到此目录下,不用手动更改。

4. 进入解压子目录:

1 cdsubversion-1.6.1

5. 执行 ./configure –prefix=/opt/subversion 进行配置设定并指明安装目录.
注意prefix前是两个减号. 默认不带BDB包, 所以默认使用的是FSFS模式.
若想使用BDB模式需另外下载BDB包.建议使用FSFS模式.两种模式比较参考以下链接:

http://doc.iusesvn.com/show-21-1.html

指令简介:configure命令用于检查安装平台和目标特征,prefix用于指定路径。

6. 执行 make 编译.

7. 执行 make install 安装.

8. 添加环境变量:

1 vi/etc/profile

在文件最后加入:
SVNPATH=$PATH:/opt/subversion/bin
export SVNPATH

9. 测试SVN是否安装成功,执行:

1 svnserve –version

如果显示版本信息, 则安装成功.

第二章 配置

本系统采用为每个项目单独建一版本库的策略。配置文件,密码文件,访问控制文件等都放在版本库的conf目录下。所以每次开始一个新项目都必须新建一个版本库,并重新配置各配置文件。还有很重要的一条,要求各组员重新配置客户端,包括服务器版本库路径,本地路径等信息。

1. 建立版本库目录(可建立多个,新建库后以下各项都需重新配置。注意区别安装目录与版本库目录,以下讲的都是版本库目录)

1 mkdir–p /opt/svndata/repos

2. 建立svn版本库(与上面目录对应)

1 svnadmin create /opt/svndata/repos

执行此命令后svn自动在repos目录下添加必须的配置文件.
注意:版本库不同于一般的文件夹, 直接在操作系统上新建文件无法被SVN识别, 必须使用import等命令将文件导入版本库.
此为svn内部指令,create用于新建版本库。请使用svn help查看详细说明。

3. 修改版本库配置文件

1 vi/opt/svndata/repos/conf/svnserve.conf

各参数功能在配置文件的注释中有说明, 此处配置如下:
[general]
anon-access = none # 使非授权用户无法访问
auth-access = write # 使授权用户有写权限
password-db = /opt/svndata/repos/conf/pwd.conf # 指明密码文件路径
authz-db = /opt/svndata/repos/conf/authz.conf # 访问控制文件
realm = /opt/svndata/repos # 认证命名空间,subversion会在认证提示里显示,并且作为凭证缓存的关键字。
其它采用默认配置. 各语句都必须顶格写, 左侧不能留空格, 否则会出错.
其中pwd.conf 与 authz.conf 在新建版本库时系统不会自动创建,需要自己创建。
指令简介:这是svn配置文件的格式,请按照以上格式书写。

4. 配置用户

1 vi/opt/svndata/repos/conf/pwd.conf

输入以下内容:
[users]
username1 = password1
username2 = password2
可以添加多个,此为用户名密码对。

5. 配置权限
vi /opt/svndata/repos/conf/authz.conf
指令简介:此配置文件采用“基于路径的授权”策略,中括号里指定路径,以下列出对各用户的授权。包括只读r,读写rw。没有列出的用户,则不允许访问。还可以对用户分组,具体请参考svn手册,以下是简单例子:
[/opt/svndata/repos]
user1 = rw
user2 = r

6. 使用import导入文件
新建好的版本库是空的,需要导入工作目录。

1 $ svnadmin create /usr/local/svn/newrepos
2 $ svnimport mytreefile:///usr/local/svn/newrepos/some/project

但是在导入后,用来的目录树并没有转换成工作拷贝,为了开始工作,还是需要运行svn
checkout导出一个工作拷贝。因为导入后,文件在版本库中是以特殊的形式存在db文件夹中的,不能以明文的方式查看。必须使用svn
checkout导出工作副本(workcopy)才能以正常方式查看。

1 svn checkoutfile:///usr/local/svn/newrepos/some/project workcopy

7. 启动服务
执行svnserve –d –r /opt/svndata/repos/ 启动服务, 以deamon方式运行。
本系统采用svnserve方式, 这是小团队项目的推荐方法. 这种方法维护最少, 配置最简单.

令简介:此指令用于启动svn服务,-d指明以守护模式运行,svn自动在3690端口监听。3690是默认端口,可以使用“–listen-
port=”或者“–listen-host=”来指定其它端口。-r选项用来指定svn服务的根目录,这样用户就可以使用相对路径访问,而不用提供完整
路径。
使用以下命令检出:(svnserver方式)

1 svn checkout svn://127.0.0.1/dir

以上为示例。IP需要根据具体情况调整,dir为版本库路径,若在启动时已指定则可省略。
版本库信息在版本库文件夹里,所以要删除版本库只需要删除版本库所在的文件夹即可。
另外工作副本只是自己维护的文件夹,可以用Windows直接删掉,对别人没有影响。千万不要使用版本库的删除命令,否则版本库里的内容也会被删除。

617 thoughts on “Linux下SVN安装配置

  1. Pingback: buy viagra
  2. Pingback: cialis
  3. Pingback: writing your thesis
  4. Pingback: thesis topic
  5. Pingback: what is viagra
  6. Pingback: cialis generic name
  7. Pingback: levitra dosage
  8. Pingback: cephalexin steroid
  9. Pingback: cialis professional
  10. Pingback: online pharmacy
  11. Pingback: is viagra safe
  12. Pingback: viagra side effects
  13. Pingback: aripiprazole drug
  14. Pingback: zyloprim
  15. Pingback: lipitor and norvasc
  16. Pingback: 500 mg amoxicillin
  17. Pingback: drugstore online
  18. Pingback: atorvastatin kmle
  19. Pingback: zithromax class
  20. Pingback: 24 hour pharmacy
  21. Pingback: canada pharma limited
  22. Pingback: Viagra Super Active
  23. Pingback: bupropion 150mg sr
  24. Pingback: viagra
  25. Pingback: cost of buspirone
  26. Pingback: carvedilol recalls
  27. Pingback: buy levitra online
  28. Pingback: canada cialis
  29. Pingback: viagra fuck
  30. Pingback: show cialis working
  31. Pingback: cialis professional
  32. Pingback: viagra cvs price
  33. Pingback: cialis/generic
  34. Pingback: cialis sales canadian
  35. Pingback: cialis purchase
  36. Pingback: amoxicillin chewable
  37. Pingback: dogs cephalexin
  38. Pingback: cymbalta ssri
  39. Pingback: molecule cialis
  40. Pingback: ejaculate on viagra
  41. Pingback: cialis online
  42. Pingback: mandy flores viagra
  43. Pingback: teva viagra cost
  44. Pingback: diy viagra recipes
  45. Pingback: cheapest viagra
  46. Pingback: sister viagra prank
  47. Pingback: cialis reviews by men
  48. Pingback: viagra gay sex
  49. Pingback: viagra wiki
  50. Pingback: my dick on viagra
  51. Pingback: 100 mg viagra
  52. Pingback: generic cialis
  53. Pingback: better than viagra
  54. Pingback: getroman viagra
  55. Pingback: how to use cialis
  56. Pingback: tadalafil dosage
  57. Pingback: thesis proposal help
  58. Pingback: thesis assistance
  59. Pingback: auto essay writer
  60. Pingback: viagra cumshot
  61. Pingback: viagra military myth
  62. Pingback: viagra connect
  63. Pingback: 5 mg cialis daily
  64. Pingback: generic cialis
  65. Pingback: viagra pill cheap
  66. Pingback: otc version of cialis
  67. Pingback: buy sildenafil usa
  68. Pingback: viagra 50mg pill
  69. Pingback: comprar viagra pfizer
  70. Pingback: cialis soft gel
  71. Pingback: Zakhar Berkut hd
  72. Pingback: 4569987
  73. Pingback: news news news
  74. Pingback: stockists of cialis
  75. Pingback: psy
  76. Pingback: psy2022
  77. Pingback: projectio-freid
  78. Pingback: kinoteatrzarya.ru
  79. Pingback: topvideos
  80. Pingback: video
  81. Pingback: afisha-kinoteatrov.ru
  82. Pingback: Ukrainskie-serialy
  83. Pingback: site
  84. Pingback: cialis and food
  85. Pingback: top
  86. Pingback: cialis doses
  87. Pingback: cialis mastercard
  88. Pingback: cheap generic viagra
  89. Pingback: cialis reliable sites
  90. Pingback: generic cialis canada
  91. Pingback: pfizer viagra 100mg
  92. Pingback: buy cialis pills
  93. Pingback: cialis peak effect
  94. Pingback: order viagra
  95. Pingback: tadalafil 10mg coupon
  96. Pingback: viagra pill cutter
  97. Pingback: women taking cialis
  98. Pingback: chelovek-iz-90-h
  99. Pingback: podolsk-region.ru
  100. Pingback: lipitor generic cost
  101. Pingback: meloxicam warnings
  102. Pingback: what is metoprolol
  103. Pingback: men viagra
  104. Pingback: viagra versus cialis
  105. Pingback: levitra 5 mg
  106. Pingback: duloxetine hcl
  107. Pingback: mirtazapine for dogs
  108. Pingback: wellbutrin
  109. Pingback: generic for buspar
  110. Pingback: bupropion 300mg xl
  111. Pingback: metronidazole
  112. Pingback: bender na4alo 2021
  113. Pingback: blogery_i_dorogi
  114. Pingback: viagra doses
  115. Pingback: cialis price nz
  116. Pingback: sildenafil canada
  117. Pingback: acyclovir cost uk
  118. Pingback: amoxicillin allergy
  119. Pingback: donepezil 10 mg
  120. Pingback: warnings for cefdinir
  121. Pingback: cialis drug prices
  122. Pingback: womens viagra pill
  123. Pingback: tadalafil 30mg tablet
  124. Pingback: generic levitra india
  125. Pingback: sildenafil tablets
  126. Pingback: cialis drug
  127. Pingback: viagra vs cialis
  128. Pingback: online viagra
  129. Pingback: cheap viagra
  130. Pingback: chernaya vodova
  131. Pingback: 66181
  132. Pingback: roman sildenafil
  133. Pingback: amlodipine use
  134. Pingback: levitra singapore
  135. Pingback: Porno
  136. Pingback: vechernyy urgant
  137. Pingback: ukraine
  138. Pingback: what is furosemide 40
  139. Pingback: orlistat
  140. Pingback: dapoxetine india
  141. Pingback: propecia results
  142. Pingback: clomid dose male
  143. Pingback: A3ixW7AS
  144. Pingback: domperidone fda
  145. Pingback: zanaflex or soma
  146. Pingback: cialis for sale
  147. Pingback: real cialis pills
  148. Pingback: gidonline-ok-google
  149. Pingback: link
  150. Pingback: cialis free sample
  151. Pingback: cialis soft generic
  152. Pingback: buy generic viagra
  153. Pingback: viagra best buy
  154. Pingback: KremlinTeam
  155. Pingback: medunitsa.ru
  156. Pingback: kremlin-team.ru
  157. Pingback: psychophysics.ru
  158. Pingback: yesmail.ru
  159. Pingback: Suicide Squad 2
  160. Pingback: psiholog
  161. Pingback: hizhnyak-07-08-2021
  162. Pingback: himalayan viagra
  163. Pingback: generic viagra
  164. Pingback: cialis orange pill
  165. Pingback: buy cialis cheap
  166. Pingback: cialis tadalafil 10mg
  167. Pingback: Duna 2021
  168. Pingback: cheap viagra brisbane
  169. Pingback: female viagra pills
  170. Pingback: sildenafil
  171. Pingback: buy sildenafil
  172. Pingback: 1
  173. Pingback: real viagra sale
  174. Pingback: buy generic viagra
  175. Pingback: viagra 15 mg
  176. Pingback: cheap sildenafil 100
  177. Pingback: buy cialis online
  178. Pingback: viagra professional
  179. Pingback: purchase viagra
  180. Pingback: cialis 5mg
  181. Pingback: viagra pills discount
  182. Pingback: erection pills cialis
  183. Pingback: ivermectin for.covid
  184. Pingback: ivermectin horse
  185. Pingback: canadian cialis
  186. Pingback: ivermectin generic
  187. Pingback: viagra from canada
  188. Pingback: erection pills
  189. Pingback: viagra price
  190. Pingback: generic viagra india
  191. Pingback: viagra pills
  192. Pingback: cleantalkorg2.ru
  193. Pingback: buy viagra online
  194. Pingback: sildenafil viagra
  195. Pingback: red viagra tablets
  196. Pingback: viagra users group
  197. Pingback: cost for viagra
  198. Pingback: cialis pills uk
  199. Pingback: roman viagra
  200. Pingback: cialis suppliers
  201. Pingback: viagra pour homme
  202. Pingback: viagra substitutes
  203. Pingback: homemade viagra
  204. Pingback: otc viagra
  205. Pingback: pfizer viagra price
  206. Pingback: elexusbet
  207. Pingback: Eurocasino
  208. Pingback: madridbet
  209. Pingback: meritroyalbet
  210. Pingback: eurocasino
  211. Pingback: eurocasino
  212. Pingback: meritking
  213. Pingback: meritking
  214. Pingback: meritroyalbet
  215. Pingback: cialis from canada
  216. Pingback: aabbx.store
  217. Pingback: meritroyalbet
  218. Pingback: viagra price walmart
  219. Pingback: arrogant
  220. Pingback: Dead-Inside
  221. Pingback: cialis 20mg
  222. Pingback: cialis dosage
  223. Pingback: natural viagra gnc
  224. Pingback: viagra 200 mg tablet
  225. Pingback: oneviagrweb.com
  226. Pingback: madridbet
  227. Pingback: trcasino
  228. Pingback: elexusbet
  229. Pingback: ventolin inhaler buy
  230. Pingback: cialis coupon
  231. Pingback: viagra buy
  232. Pingback: trcasino
  233. Pingback: evohaler
  234. Pingback: tombala siteleri
  235. Pingback: tombala siteleri
  236. Pingback: flccc ivermectin
  237. Pingback: meritroyalbet
  238. Pingback: stromectol price us
  239. Pingback: ivermectin brand name
  240. Pingback: ivermectin 3mg price
  241. Pingback: ivermectin lice
  242. Pingback: stromectol tab
  243. Pingback: stromectol medicine
  244. Pingback: ivermectin india
  245. Pingback: ivermectin australia
  246. Pingback: stromectol tablets
  247. Pingback: 3rpUI4X
  248. Pingback: order ivermectin
  249. Pingback: uliocx
  250. Pingback: 34tfA26
  251. Pingback: 3J6w3bD
  252. Pingback: 3GrvxDp
  253. Pingback: 3rrZhf7
  254. Pingback: 3L1poB8
  255. Pingback: my-vse-mertvy-2022
  256. Pingback: cheap cialis india
  257. Pingback: cialis
  258. Pingback: tadalafil prices
  259. Pingback: provigil and viagra
  260. Pingback: cialis walmart
  261. Pingback: buy viagra from usa
  262. Pingback: stromectol 3 mg
  263. Pingback: cialis vs viagra
  264. Pingback: tadalafil liquid
  265. Pingback: tadalafil 20mg otc
  266. Pingback: tadalafil
  267. Pingback: cialis coupon
  268. Pingback: best price for cialis
  269. Pingback: merck covid pills
  270. Pingback: 1awkwardly
  271. Pingback: tadalafil prix
  272. Pingback: meritroyalbet
  273. Pingback: ivermectin 500mg
  274. Pingback: cialis best price
  275. Pingback: cialis generic
  276. Pingback: stromectol oral
  277. Pingback: stromectol tablets
  278. Pingback: casino online usa
  279. Pingback: norfloxacin
  280. Pingback: tadalafil cialis
  281. Pingback: cost generic viagra
  282. Pingback: buy cialis online
  283. Pingback: medicine erythromycin
  284. Pingback: azithromycin swelling
  285. Pingback: generic keflex
  286. Pingback: ivermectin bnf
  287. Pingback: z.globus-kino.ru
  288. Pingback: augmentin ototoxicity
  289. Pingback: stromectol 0 5 mg
  290. Pingback: azithromycin 1000mg
  291. Pingback: clindamycin testing
  292. Pingback: stromectol online
  293. Pingback: the lancet ivermectin
  294. Pingback: meritroyalbet
  295. Pingback: meritking
  296. Pingback: meritking
  297. Pingback: order lasix online
  298. Pingback: stromectol price uk
  299. Pingback: generic tadalafil
  300. Pingback: ivermectin 1%cream
  301. Pingback: eurocasino
  302. Pingback: eurocasino
  303. Pingback: yutub
  304. Pingback: madridbet
  305. Pingback: luckyland slot
  306. Pingback: iver mectin
  307. Pingback: ivermectin history
  308. Pingback: ivermectin sale
  309. Pingback: ivermectin oral
  310. Pingback: meritroyalbet
  311. Pingback: eurocasino
  312. Pingback: meritroyalbet
  313. Pingback: ivermectin tablets uk
  314. Pingback: ivermectin 2
  315. Pingback: meritroyalbet giriş
  316. Pingback: fuck google
  317. Pingback: grandpashabet
  318. Pingback: child porn
  319. Pingback: mazhor4sezon
  320. Pingback: filmfilmfilmes
  321. Pingback: gRh9UPV
  322. Pingback: 9-05-2022
  323. Pingback: TopGun2022
  324. Pingback: Xvideos
  325. Pingback: XVIDEOSCOM Videos
  326. Pingback: ivanesva
  327. Pingback: Netflix
  328. Pingback: Krylya-nad-Berlinom
  329. Pingback: FILM
  330. Pingback: designchita.ru
  331. Pingback: YA-krasneyu
  332. Pingback: design-human.ru
  333. Pingback: designmsu.ru
  334. Pingback: vkl-design.ru
  335. Pingback: irida-design.ru
  336. Pingback: use of ivermectin
  337. Pingback: psy online
  338. Pingback: do-posle-psihologa
  339. Pingback: uels ukrain
  340. Pingback: bahis siteleri
  341. Pingback: DPTPtNqS
  342. Pingback: qQ8KZZE6
  343. Pingback: D6tuzANh
  344. Pingback: SHKALA TONOV
  345. Pingback: Øêàëà òîíîâ
  346. Pingback: russianmanagement.com
  347. Pingback: 3Hk12Bl
  348. Pingback: 3NOZC44
  349. Pingback: 01211
  350. Pingback: tor-lyubov-i-grom
  351. Pingback: film-tor-2022
  352. Pingback: hd-tor-2022
  353. Pingback: hdorg2.ru
  354. Pingback: JXNhGmmt
  355. Pingback: Psikholog
  356. Pingback: netstate.ru
  357. Pingback: meritroyalbet
  358. Pingback: tor-lyubov-i-grom.ru
  359. Pingback: bit.ly
  360. Pingback: bucha killings
  361. Pingback: War in Ukraine
  362. Pingback: Ukraine news – live
  363. Pingback: viagra
  364. Pingback: stats
  365. Pingback: Ukraine-war
  366. Pingback: movies
  367. Pingback: gidonline
  368. Pingback: revatio
  369. Pingback: web
  370. Pingback: film.8filmov.ru
  371. Pingback: 匿名
  372. Pingback: 匿名
  373. Pingback: liusia-8-seriiaonlain
  374. Pingback: filmgoda.ru
  375. Pingback: rodnoe-kino-ru
  376. Pingback: confeitofilm
  377. Pingback: stat.netstate.ru
  378. Pingback: sY5am
  379. Pingback: Dom drakona
  380. Pingback: JGXldbkj
  381. Pingback: aOuSjapt
  382. Pingback: ìûøëåíèå
  383. Pingback: psikholog moskva
  384. Pingback: A片
  385. Pingback: Usik Dzhoshua 2 2022

发表评论