How to build an SVN server on the local machine

Source: Internet
Author: User

How to build an SVN server on the local machine

Objective: To back up code locally without a formal SVN server.

Download:

Http://subversion.tigris.org/

Http://subversion.apache.org/

Http://www.visualsvn.com/server/download/

 

Download Apache: httpd.apache.org/download.cgi

SVN download: subversion.tigris.org/servlets/ProjectDocumentList

Tortoise download: prdownloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.3.2.5840-svn-1.3.0.msi

Download Tortoise Simplified Chinese Language Pack: In prdownloads.sourceforge.net/tortoisesvn/?agepack_1.3.2_zh_cn.exe

How to Build and use the SVN server in Windows

Refer:

1. Download the Subversion server program.

Download the binary installation file from the official website, download the Binary Package, find Windows NT, 2000, XP and 2003, and select "this directory ", so we can see a lot of download content, currently you can download svn-1.4.0-setup.exe.

Download the Subversion of the Windows client TortoiseSVN.

TortoiseSVN is a tool that extends Windows Shell and can be seen as a plug-in for Windows resource manager. After installation, Windows can identify the working directory of Subversion.
The official website is TortoiseSVN, the Download method is similar to the svn server in front, in the Download page we can choose to Download the version, the current maximum stable version of the installation file for the TortoiseSVN-1.4.0.7501-win32-svn-1.4.0.msi.

2. server and client Installation

Install the server and run svn-1.4.0-setup.exe directly. Follow the prompts to install svn-1.4.0-setup.exe. In this way, we have an environment where the server can run.

Install TortoiseSVN, also directly run the TortoiseSVN-1.4.0.7501-win32-svn-1.4.0.msi according to the prompts to install, but after the completion of the last will prompt whether to restart, in fact, restart is just to make svn work copy in the special style of windows effective, it has nothing to do with all the actual functions. In order to immediately see the good results, restart the machine.
 

3. Create a version Library (Repository)

To run the Subversion server, you must first create a version Library (Repository), which can be seen as a database for storing data on the server. After the Subversion server is installed, you can run it directly, for example:

svnadmin create E:/svndemo/repository

A version library is created in the directory E:/svndemo/repository.

We can also use TortoiseSVN to perform this step graphically:
Right-click the directory E:/svndemo/repository and choose TortoiseSVN> Create Repository here... ", then you can select the version library mode. Here you can use the default mode, and then create a series of directories and files.

4. Configure users and permissions

Go to the E:/svndemo/repository/conf directory and modify svnserve. conf:
# [General]
# Password-db = passwd
Changed:
[General]
Password-db = passwd, modify the passwd file in the same directory, and remove the following three lines of comment:
# [Users]
# Harry = harryssecret
# Sally = sallyssecret
Finally changed:
[Users]
Harry = harryssecret
Sally = sallyssecret

Generally, the user name and password of the svn project are authenticated in a unified manner. To avoid entering the password every time, you remember the password when using TortoiseSVN, the user name and password here should be the same as that of the project to avoid unexpected situations.

5. Run the independent server

Run the following command in any directory:
Svnserve-d-r E:/svndemo/repository our server program has started. Do not close the command line window. Close the window will also stop svnserve.

During use, it is found that even if this window is closed, svn is as good ~~ I don't know why ~

6. initialize the Import

Go to the project root directory we want to import. In this example, E:/svndemo/initproject. the directory contains a readme.txt file:


Right-click TortoiseSVN and choose Import...
Enter "svn: // localhost/" in the URL of repository /"
OK
After that, the directory remains unchanged. If no error is reported, all the data has been imported to the version library we just defined.

Note that this step can be performed on another host with TortoiseSVN installed. For example, if the IP address of the host running svnserve is 133.96.121.22, the content entered in the URL section is "svn: // 133.96.121.22 /".

Here, I don't know why, using svn: // localhost/has always been an issue. Finally, I used file: // E: /svndemo/repository/instead ~~

7. Basic client operations

Extract the version library to a working copy:
Go to any empty directory, in this example, E:/svndemo/wc1, right-click-> Checkout, enter svn: // localhost/in URL of repository /, in this way, we get a copy of work.
Make changes in the work copy and submit:
Open readme.txt, modify it, and right-click Commit... to submit the modification to the version library. We can run it.

View the modifications:
Right-click readme.txt-> TortoiseSVN-> Show Log, so that we can see all the submissions to this file. Right-click on version 1 and choose Compare with working copy. We can Compare the differences between the working copy file and Version 1.

 

-------------------------------------- Split line --------------------------------------

Subversion configuration instances in Linux

CentOS 6.2 SVN setup (YUM installation)

Deploy Apache + SVN in CentOS 6.5

Build an SVN server using Apache + SVN

Set up and use the SVN server in Windows + reset the password on the client

Install SVN in Ubuntu Server 12.04 and migrate Virtual SVN data

Build svn service and migration method on Ubuntu Server

Build SVN server with online storage

-------------------------------------- Split line --------------------------------------

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.