Windows SVN 搭建小结



本文介绍如何在 Windows 下使用 Virtual SVN Tortoise SVN 来搭建 SVN 客户端和服务器端。

 

Virtual SVN 下载地址:https://www.visualsvn.com/

Tortoise SVN 下载地址:https://tortoisesvn.net/

(下载最新版本的msi安装程序即可)

 

首先来搭建 SVN 服务器,安装VirtualSVNServer,选择VirtualSVN Server

VisualSVN Server 3.53 Setup Select Components Please select comw•ents you would like to install. You can either choose to perform the installation of VisualSVN Server or only install the corresponding administraton tools. Please select components you vvant to be installed on this computer. @VisualSVN Server and Administration Tools Install server-side comguynents and all the administration tools. C) Administraton Tools Only Install MMC snap-in, PovverSheII module and Subversion command-line tools to administer VisualSVN Server instances installed on other computers. Z] Add Subversion command-line tools to the PATH environment variable Update the PATH environment variable to enable direct access to the Subversion command4ine tools (such as 'svn.exe' and 'svnadmin.exe') from the Command Line.

 

选择StandardEdition

VisualSVN Server 3.5.3 Setup VisualSVN Server Editions Please select which edition of VisualSVN Server you'd like to install. There are bivo editons of VisualSVN Server available and depending on your needs you can choose which one suits you best. Standard Edition A Mnctonal server that is great for individuals and small groups. Truly free of charge and permitted for commercial use. En terprise Edi bon The best opton for SMS and enterprises. Provides additonal features such as Actve Directory Single Sign-On and Remote Server Administraton. Compare Editons.

 

指定VirtualSVNServer的安装路径,库(Repository)的根目录,SVNServer的访问(侦听)端口号:

VisualSVN Server 3.53 Setup Initial Server Configuration Please adjust the default configuration settings if necessary. Loca bon: Reposi tories: Server Port: 55555 ositories• Z] use secure connection (https://)

 

安装完成后,打开VirtualSVN Server Manager

VisualSVN Server File Action View Help O Visua[SVN Server (Loca Repositories Users Groups VisualSVN Server (Local) VISUALWNSERVER Standard Edition Status HTTP service is running VDFS service is disabled Enable Uoarade to Enterorise Edition Comoare Editions Update to the VisualSVN Server 3510 is available Details Logging Error logging is enabled Access logging is disabled Operational logging is disabled Open Event Viewer„ Configure logging Subversion Authentication

 

首先配置Groups,我们添加两个组,一个Admins组,一个Guest组:

VisualSVN Server File Action View Help O Visua[SVN Server (Local) Repositories Users Groups G roups Name Admins

 

接着添加两个用户:

VisualSVN Server File Action View Help O Visua[SVN Server (Local) Repositories Users Groups Users Name daniel guest

 

将用户daniel添加到Admins组中,将用户guest添加到Guests组中:

Edit Group Group name: damel admins

 

Edit Group Group name: guest

 

创建一个新的库(Repository):

O VisualSVN Server (Local) Create New Repositorym Repositorie Import Existing Repository... Browse

选择FSFS类型的库:

Create New Repository Repository Type Choose the nevv reg&tory type. Select the preferred repository type. @Regular FSFS regu)sitory Create a regular Subversion repository based on the standard FSFS data store. o Distributed VDFS regu)sitory Create a distributed Subversion regu)sitory based on the VisualSVN Distributed File System. The VDFS repositories act as standard Subversion repositories and allon data to be replicated bet,Neen geographically distributed sites.

指定库的名称:

Create New Repository Repository Name Specify the name for the nevv reg&tory. Regu)sitory Name: programming

创建一个空的库:

Create New Repository Repository Structure Choose the inital layout for the nevv reg&tory. Select the preferred inibal regu)sitory structure. @Empty regu)sitory (recommended option) C) Single-project regu)sitory (With the top-level 'trunk , branches' and 'tags' folders) You can create the desired regu)sitory structure later using the Create Folder or Create Project Structure context menu commands for the created regGtory.

选择自定义权限:

Create New Repository Repository Access Permissions Specify inital access permissions for the nevv reg&tory. Set the kind of permissions you want for the nevv repository. C) Nobody has access C) All Subversion users have Read / Write access @Customize permissions Regu)sitory access permissions can be adjusted later using the Properies or Manage Security context menu commands for the created regGtory.

在弹出的权限编辑窗口中我们为Admins组赋予读写权限,为Guests组分配只读权限:

Customize Permissions Security Group or user name: Name Guests Inherit from parent C) No Access @Read Only C) Read / Write Read / Write Read Only Learn more about access control and Dermis—ons

 

创建完成后,可以看到库的URL地址:

VisualSVN Server File Action View Help O Visua[SVN Server (Local) v Repositories polished documents raw documents programming Users Groups prog ram m Ing (https://DanieI-ThinkPad:55555/svn/prcgramming/) There are no items to show in this view.

 

库创建完成后,我们可以在客户端机器上安装TortoiseSVN Client端,安装全部选择默认安装选项即可。

安装完成后,在客户端机器上创建一个空的目录:

This PC Local Disk (D:) Programming Name Date modified Type Size This folder is empty.

 

右键选择SVN Checkout

Sort by Group by Refresh Customize this folder... Paste Paste sh ortcut Undo Rename Git GUI Here Git Bash Here Share with SVN Checkout... TortoiseSVN Pro perties Ctrl+Z

 

目录添加我们前面创建的库的URL地址:

Checkout sitory URL of regGtory: s: 'Daniel-ThinkPad: Checkou t dir ector y: D : ogr amming Multiple, independent norkjng copies Checkou t Depth Fully recursive Omit externals @HEAD revision C) Revision ro rammin Choose items... Shovv log

 

点击OK后,提示输入账号:

Authentication <https://daniel-thinkpad : 55555> VisualSVN Server Requests a username and a password Password: Z] Save authenbcabon

这里填写一个具有读权限的用户即可,我们使用Admins组中的daniel用户:

Checkout Finished! Path Command Updatng Completed Checkout from https://DanieI-ThinkPad:55555/svn/programming, revision HEAD, Fully recursive, Externals include D : programming At revision: O

Checkout成功后,可以在这个目录下看到一个名为".svn"的隐藏文件夹:

This PC Local Disk (D:) Name Programming Date modified 2017/3/16 15:47 Type File folder

 

接着我们将要放入库的文件拷贝到这个目录下,右键选择SVN Commit

ThisPC 》 LocalDisk(D:) 》 P 「 09 「 amming Date modified Size 2D17 / 1b1i47 Fi | e fol d er 2D17 / 2 / 121i Fi | e fol d er 2D17 / ~ , 2 ~ 1i49 Fi | e fol d er 2D17 / 2 / 121i Fi | e fol d er 2D17 / 2 / 121i Fi | e fol d er 2D17 / 2 / 121i Fi | e fol d er 2D17 / 2 / 121i51 Fi | e fol d er Sort by 2D17 / 2 / 121i52 Fi | e fol d er Group by 2D17 / 2 / 121i52 Fi | e fol d er Refresh 2D17 / 2 / 121i52 Fi | e fol d er Customize this folder. 2D17 / 2 / 121i52 Fi | e fol d er P 3 Ste 2D17 / 2 / 121i52 Fi | e fol d er Paste Shortcut 2D17 / 2 / 121i52 Fi | e fol d er 2D17 / 2 / 121i52 Fi | e fol d er U n d 0 M ove 2D17 / 2 / 121i52 Fi | e fol d er G G U | H ere 2D17 / 2 / 121i52 Fi | e fol d er Git 835h Here 2D17 / 2 / 121i52 Fi | e fol d er Share with 2D17 / 2 / 121i52 Fi | e fol d er SVN Update 2D17 / 2 / 121i52 Fi | e fol d er SVN Comm … 2D17 / 2 / 121111 Fi | e fol d er TortoiseSVN 2D17 / 2 / 121i52 Fi | e fol d er 2D17 / 2 / 1215 : Fi | e fol d er 2D17 / 2 / 枍 Fi | e fol d er Properties 2D17 / 2 / 1215 : Fi | e fol d er 2D17 / 2 / 1215 : Fi | e fol d er

选择要提交到SVN Server的文件:

- Commit - TortoiseSVN Commit to: https:IIdaniel-thinkpad:555551svnIprogra m ming I Recen t messages Changes made (double-click on file for dim: Check: All None Non-ve rsioned Versioned Path Z] 2013spospeedometer Z] 2013SPOSpeedometer /SPOSpeedometer Z] 2013SPOSpeedometer /SPOSpeedometer sln Z] 2013SPOSpeedometer/SPOSpeedometer suo Z] Shovv unversioned fles Shon externals from different repositories Keep locks Keep changelists Added Deleted Modified Files Directories Extension Status Property status Lock ersioned norwjersioned non -v ersioned 16006 files selected, 16006 files total Shovv log

点击确定后开始依次提交:

58198 PSEJILIOOLOZJEYLSELOS•, Sd 一 pa - 」 0 u 一 On ep 巴 2d5 亠 」 0M 一 u29 d 一 p 一 」 50 」 … 0 'L ESL*ZaIL100LOLZ3EH'JeOY\ Sd 一 pa - 5 」 0 u 一 On 五 \ ep \ 巴 2d5 亠 」 0M 一 u29 d 一 p 一 Luwe 」 50 」 … 0 LELEI 51 芒 」 5u2 」 」 」 5u24 IOS 5uppv 5uppv 5uppy 5uppy 5uppy 5uppy 5uppv

(注:需要使用有“写”权限的SVN用户来CommitSVN Update操作只需要读权限。)

 

提交完成后,库就已经初步创建完成了,可以在其他客户端中Checkout这个库,即可将刚刚提交的内容同步下来。

 

后续就是正常的SVN使用了,这里就不再赘述了。

  • 25
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值