SVN introduction Subversion is a free/open source version control system that allows subversion to manage files and directories, as well as their modifications, across time. This allows you to restore the old version of the data, or check the history of the data modification. Because of this feature, many people regard the version control system as a "time Machine". SVN's components
- SVN Client command-line tool
- svnversion Tools for reporting the status of the working copy (in terms of the version number of the project)
- Svnlook can directly check the warehouse tools
- svnadmin Tools for creating, resizing, or repairing Subversion repositories
- MOD_DAV_SVN Apache HTTP Server Plug-in that allows users to access the repository over the network
- Svnserve A custom, standalone server program that can be run as a daemon or called by SSH, another way to allow users to access the repository over the network
- svndumpfilter filtering Subversion repository dump data stream program
- Svnsync A program that can make incremental mirror backups of a warehouse across a network
- Svnrdump A program that can dump and load warehouse history across the network
- SVNMUCC The tool supports URL-based operations on multiple warehouses in a single commit without a working copy
In simple terms, versioning is the Data warehouse, which can record every change you make to a file. This way, even if you change in pitch darkness a few months after the boss said no, or as in the past, you will not be crazy, simple recovery version of the operation will take care of everything
Common version control software:
CVS most software development companies now use SVN instead of CVS due to previous CVS coding issues
SVN Centralized version Controller
git Distributed versioning Controller
SVN Server run mode
- Standalone server access s svn://ip/svn_test
- with HTTP services such as Apache http://IP/svn_test
- Local file file:///svn_test
Build SVN server + Apache to implement version control server
Install SVN server, Apache, MOD_DAV_SVN package
Yum Install The subversion httpd mod_dav_svn# mod_dav_svn module is a plug-in for the HTTP service that allows the repository to be displayed on the website via the HTTP protocol
Create a repository directory and modify the appropriate permissions
[Email protected] ~]#mkdir/var/Repos[[email protected]~]# Svnadmin create/var/repos/Damowang.cn[[email protected]~]#ls/var/repos/damowang.cnconf db Format hooks locks readme.txt[[email protected]~]# svnserve-d-r/var/repos/# Open Service #-d means running in daemon (background)-r specifies that the SVN root directory is/var/Repos[[email protected]~]# netstat-antup|grep 3690TCP0 0 0.0.0.0:3690 0.0.0.0:* LISTEN15492/svnserve
Configure Apache
See Apache support Subversion two dynamic libraries have no installation success
Find /-name mod_dav_svn.so/usr/lib64/httpd/modules/Find /-name Mod_authz_ svn.so/usr/lib64/httpd/modules/mod_authz_svn.so
Configure Apache to access SVN server via MOD_DAV_SVN module
[[email protected] ~]# vim/etc/httpd/conf.d/subversion.conf # file exists directly modified, does not exist on handwriting <Location/svn> /var/" SVN server of damowang! " /home/svn/passwd/home/svn/authrequire valid-user</ Location>
Comments:
<Location/svn> Apache virtual directory late via link: http://192.168.94.111/svn to access
DAV SVN
Svnparentpath/var/repos Store path to the warehouse: absolute path to damowang.cn
AuthType Basic
authname "SVN server of damowang!" Apache messages that pop up during authentication
authuserfile/home/svn/passwd passwd Store user name and password
Authzsvnaccessfile/home/svn/auth permission to store users
Require Valid-user
</Location>
Establish local access control file /home/svn/passwd,#后期通过 the httpd server accesses SVN, uses the user information in this file to authenticate the user and password
mkdir /home/~]# htpasswd-c/home/svn/passwd damowangnew password:re- for-C is only used when creating a user password file for thefirst time using the Create/home/svn/cat /home/svn/passwd Damowang: $apr 1$rk05bgl7$h2xog1ywzqpflucpmutuu0
Create a local Project Repository permission control file
[Email protected] ~]# vim/home/svn/auth[/] # =rw # chown -R apache.apache/var/repos/~]# systemctl start httpd
SVN The access address is http://192.168.94.111/svn/damowang.cn
SVN client
Subversion Windows Client TORTOISESVN configuration:
Http://tortoisesvn.net/about.zh.html
Download the package that corresponds to the system
Create a new folder on Windows after installation
Just fill in your username and password.
Upload and download
Put the files in the folder
Select the uploaded file and click OK
Re-visit Web page
Damowang user has RW permissions click on the filename to see the file contents
test the client under Linux:
[[Email protected] repos]# SVN checkout http://192.168.94.111/svn/damowang.cnCertification field: //192.168.94.111:80> SVN server of damowang!password for "root": Authentication field://192.168.94.111:80> SVN server of damowang!User name: Damowang "Damowang" Password:-----------------------------------------------------------------------Note!your password, for the authentication domain://192.168.94.111:80> SVN server of damowang!can only be saved in clear text on disk!if possible, consider configuring your system so that subversion can save the encrypted password. Please refer to the documentation for more information. You can pass in the "/root/.subversion/servers "SET options in" store-plaintext-passwords "yes" or "no" to prevent this warning from appearing again. -----------------------------------------------------------------------to save an unencrypted password (yes/no)?NoA Damowang/server.crt Remove Version1. [Email protected] repos]# CD Damowang[[email protected] damowang]#lsSERVER.CRT
CentOS 7 build version control server using Svn+apache