SVN entry and configuration

Source: Internet
Author: User
Tags subversion client svn client svn update
SVN, or Subversion, is a free and open source version control system that can recover data to earlier versions or check the data modification history. The data can be source code, it can also be another type of file. Before the emergence of SVN, CVS was a de facto standard for open-source world version control tools, but CVS had some inherent defects and fixed these defects. "> <LINKhref =" http://www.php

SVN, or Subversion, is a free and open source version control system that can recover data to earlier versions or check the data modification history. The data can be source code, it can also be another type of file.

Before the emergence of SVN, CVS was a de facto standard for open-source version control tools in the world. However, CVS has some inherent defects and it takes a lot of effort to fix these defects. therefore, the initiators of SVN, Brian behlenddorf and CollabNet, decided to rewrite a version control system to retain the basic idea of CVS, but to correct the errors and unreasonable features. As a result, SVN emerged as the successor of CVS. SVN designers strive to win the favor of CVS users through two ways: maintain the design of open-source systems and the interface style as similar as possible to CVS, while trying to make up for many notable defects of CVS. As a result of these efforts, migration from CVS to SVN does not require significant changes, so more and more people have chosen SVN.
Http://svnbook.red-bean.com
Http://www.subversion.org.cn

Directory

I. use of the client
1.1 In Linux (Ubuntu)
1.2 In Windows
1.3 Use SVN + ssh authentication in Linux (related materials not found @_@)
1.4 Use SVN + ssh authentication in Windows
II. server configuration
2.1 configure svnserve in Linux
2.2 configure svnserve in Windows
2.3 configure svnserve + ssh in Linux
2.4 configure svnserve + ssh in Windows (Cygwin, omitted)
2.5 APache-based SVN server configuration in Linux
2.6 APache-based SVN server configuration in Windows
3. create a version Library
3.1 create a version Library in Linux
3.2 create a version Library in Windows

Most people use SVN from the client. The following describes how to use the client first. Assume that the SVN server is ready. the folder address is http: // domain/svn/trunk/myproject, the username is test, and the password is test. (If SVN is configured on the server side, access using the URL starting with svn: //; if SVN + SSH is configured on the server side, access using the URL starting with svn + ssh)

I. use of the client

1.1 Linux (Ubuntu) systems are generally used

1) first, install the svn client. use $ sudo apt-get install subversion in ubuntu (for other commands, see baigoogledu)

2) checkeout command: when used for the first time, use the checkout command to copy the server directory to the current local directory, and create a hidden folder to record version information:
[Working directory] $ svn checkout "http: // domain/svn/trunk/myproject" -- username test
Enter the password

3) svn update command: Get the latest version on the server
[Working directory] $ svn update (except for adding the url and user name and password for the first time, the system will remember it later)

4) svn add command: to add non-version-controlled local files to version control:
[Working directory] $ svn add hello. c

5) svn commit command: Upload local files to the server

[Working directory] $ svn commit (if a new file exists, svn add first)

1.2 In Windows

1) install the client: http://tortoisesvn.net/downloads

2) create a folder (working directory), right-click and select checkout, and enter the URL and user name and password.

3) right-click the working directory and choose update.

4) right-click the working directory and add

5) right-click the working directory and choose commit.

1.3 Use SVN + ssh authentication in Linux(No related materials found @_@)

1.4 Use SVN + ssh authentication in Windows

(Refer to setting up svn servers in ubuntu and creating svn + ssh clients in windows)

1.4.0 install TortoiseSVN, Puttygen, and Pageant
Http://sourceforge.net/projects/tortoisesvn
Http://www.chiark.greenend.org.uk /~ Sgtatham/putty/

1.4.1 convert private key format
1) convert files in Linux Copy the key to windows and run Puttygen;
2) choose conversions> Import Key and select a file. Enter passphrase for key, and Enter the passphrase keyword used to create a public/private key pair;
3) Select Parameters as SSH-2 DSA or SSH-2 RSA-> Save private key-> Save file name as username> key. ppk.

1.4.2 establish the association between TortoiseSVN and Pageant, and add the private key to Pageant:
1) right-click TortoiseSVN-> Settings-> Network-> SSH client, and enter:
C: \ Program Files \ TortoiseSVN \ bin \ TortoisePlink.exe
2) right-click TortoiseSVN-> RepoBrowser and enter the URL:
Svn + ssh :// @ /Usr/local/svn/trunk
3) run Pageant, right-click the icon in the lower-right corner of the screen-> Add Key, and set the private Key file Add key. ppk.
-- If you do not want to cache the ssh password, steps 8th and 9 are not required. you only need to keep step 2, but you need to enter the password twice each time you go to the check out and check in folders, annoying you :)

II. server configuration

There are three options for deploying Web servers, from simple to complex

· Svnserve

· Svnserve over SSH

· Apache + mod_dav_svn module

The following describes svnserve in the simplest way.

[Update] Windows Server configurations can be installed with the visual SVN Server.

Http://www.visualsvn.com/

Reference link: VisualSVN Series Introduction (for detailed installation process introduction, I will not describe it here)

2.1 & 2.2 configure svnserve

Svnserve is a lightweight server that can communicate with the client through a custom stateful protocol based on TCP/IP. the client starts with svn: // or svn + ssh: // svnserve URL to access a svnserve server.

2.1 configure svnserve in Linux

2.1.0 similarly, use the command $ sudo apt-get install subversion

2.1.1 svnserve acts as an independent daemon and listens for requests
$ Svnserve-d
$ # Svnserve is now running, listening on port 3690
-- You can use -- listen-port = [port number] to specify the port, or -- listen-host = [host name] to specify the host name.
Assume that you have created a version library in the/usr/local/repositories/project path (the establishment of the version library will be mentioned later). In this case, the client can use svn: // [host]/usr/local/repositories/project for access
-- You can use the-r option to limit the output of only version libraries in the specified path, so that client access is more concise:
$ Svnserve-d-r/usr/local/repositories
The client only needs to use svn: // [host]/project to access

2.1.2 use svnserve through inetd
$ Svnserve-I
-- In this case, svnserve tries to use the custom protocol to communicate with the subversion client through stdin and stdout. the default port is 3690. You can add the following lines in/etc/services:
Svn 3690/tcp # subversion
Svn 3690/udp # subversion
-- If you are using a classic Unix-like inetd daemon, you can go to/etc/inetd. add the following lines to the conf file. if a client connects to port 3690, inetd generates a svnserve process for service.
Svn stream tcp nowait svnowner/usr/bin/svnserve-I

2.1.3 set built-in authentication for svnserve

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.