SVN Centralized version control software

Source: Internet
Author: User

Brief introduction:

In today's popular version control software, SVN (centralized version control) is a much more extensive and time-consuming one, and now git (Distributed version control) is a bit more popular.

First, install SVN

Yum Install  ~]# SVN--1.6.  One (r934486)

Second, configure SVN

1. Create working directory and repository

mkdir /~]# svnadmin create/svn/ls /svn/myrepos/~]# tree/svn/myrepos/ conf//svn/myrepos/conf/passwd #用户认证配置文件 └──svnserve.conf #服务配置文件

2, modify the SVN repository configuration file (need to restart Svnserver)

grep ' ^#|^$ ' /svn/myrepos/conf/svnserve.conf [general]anon-access = None #匿名用户访问权限authWrite # Authenticated user access passwordpasswd #认证用户命名文件 authz-db == My First Repository # message [SASL]

3, add authentication user, password (username = password)

grep ' ^#|^$ ' /svn/myrepos/conf/passwd== Qingshan

4. Add Directory Authorization

grep ' ^#|^$ ' /svn/myrepos/conf/authz [aliases][groups][myrepos:/=  = R #授权认证用户qs (readable)* = #非授权认证用户 (no permissions)

5. Start svn in a daemon way

[[email protected] ~]# svnserve-d-r/svn #-d launch a svnserver,-r specified repository as daemon

#默认监听TCP 3690 Port, when booting in daemon mode, you can use--list-port 、--list-host to specify the port, host

grep 3690 TCP         0      0 0.0. 0.0:3690                0.0.  0.0:*                   LISTEN      3109/svnserve       

6. Authorization Test

 [[email protected] ~]# svn checkout--no-auth-cache--username Lys--password liuyisai svn:// 192.168.2.205/myrepos/home/lys/ out version 0   ~]# svn checkout--no-auth-cache--username qs--password qingshan svn:// 192.168.2.205/myrepos/home/qs  out version 0 . 
 [[email protected] ~]# touch /home/lys/ readme #创建测试文件 [[email protected]  ~]# svn add/home/lys/readme #添加到工作区A /home/lys/readme[[email protected]  ~]# s VN--no-auth-cache--username Lys--password liuyisai commit-m  '  add readme  " /home/lys/readme increased Home /lys/readme transfer file data. The version after submission is  1 . 
Touch /home/qs/~]# svn add/home/qs/readme1 A         /home/qs/'add readme1' /home/qs/readme1 SVN: Commit failed (details below): SVN: Authentication failed

Third, stop Svnserver

Kill $ (PSgrepgrep grepawk'{print $}' )

Four, svn backup, restore

1, logical backup (flexible backup, can be full, incremental backup--incremental, space-saving, suitable for version cubby smaller size)

[Email protected] ~]# svnadmin dump/svn/myrepos >/data/backup/myrepos_$ (date +%y%m%d). bak

2, physical backup (large space, backup, recovery speed)

[Email protected] ~]# svnadmin hotcopy/svn/myrepos//data/backup/myrepos_hot_$ (date +%y%m%d). bak

3. Logical Restore

[[email protected] ~]# svnadmin load/svn/myrepos/</data/backup/myrepos_20161024.bak #注意: If the repository is deleted, you will need to reconfigure the authenticated user after the restore, Authorization and so on!

4. Physical restoration

[Email protected] ~]# svnadmin hotcopy/data/backup/myrepos_hot_20161024.bak/  /svn/myrepos/

V. Win Client Connection

1. Download and install the Little Turtle (TortoiseSVN)

2, set up working directory, right-Checkout-----URL (Svn://192.168.2.205/myrepos)--Enter user name, password (lys/liuyisai)

3, test authorization, create a file, add, submit to see if it is authorized to match!

SVN Centralized version control software

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.