Update
Programming
in the
"
Regret Medicine
"
--SVN
a
, Historical Origins
1. Version
control software
A: The main source code version of the control and management
2
,
Version Control
Software
Origins
CVS: The earliest open source version control software (open source)
VSS: Microsoft Development and Development Visual SourceSafe, entry-level products, inexpensive, with Windows visual interface, no need for additional technical training, easy to operate
ClearCase: Backbone, very powerful for source code management, but higher thresholds, higher fees (IBM)
SVN: Mainstream Git: Mainstream
Interview question: What is version control software? What version control software have you used?
A: Mainly on the source code version control and management, I understand the CVS and VSS, more familiar with SVN, the current development is to use SVN.
3.
What
It's SVN .
SVN full name SubVersion
SVN is a version management tool that has risen in recent years and is the successor to CVS. Currently, most open source software uses svn as the code version management software. (GitHub,oschina,CSDN)
Support for Windows,Linux,MacOS
Formerly known as CVS
Time Machine
4
,
installation and use of SVN
SVN belongs to C/S structure software, which is divided into client and server side
Client:
Http://tortoisesvn.net/downloadsS
Server-side:
Linux system rpm package
two
,SVN
Server-Side
Installation and use
1.
installation
Install command:yum install-y subversion networking
Local Packages
2.
Configuring the Version warehouse
Create a directory in /usr/local/ svn
Create a file directory under /usr/local/svn/ Sunny ( name can be arbitrarily taken )
Svnadmin Create/usr/local/svn/sunny
3.SVN configuration
you can see that there are 3 configuration files under the configuration file /usr/local/svn/sunny/conf in the repository.
Authz Setting up user rights profiles
passwd Setting up user account configuration file
svnserve.conf Setting the svnd Basic configuration file
1) Open the svnserve.conf Configuration repository information and the path of the user file and user password file, the repository path
①# anon-access = None(anonymous access not allowed)
②# auth-access = Write(write allowed)
③# password-db = passwd ( need to enter password when accessing )
④#authz-db = authz # access permission settings
Remove the comments from the above four lines
2) Create permissions for SVN group and group users
VI Authz
①[Group]
G1=U1,U2,U3// Create a G1 Group and specify a user u1,u2,u3
②[/]// define permissions under the root directory
@g1 = RW//g1 Group User rights are read and write
* = r// other users have read access only
③ Save exit
3) Create or modify user passwords
VI passwd
①[Users]
U1 = 123//The password for the user named U1 is 123456
② Save exit
4.SVN startup
(After svn is configured , we can start the svn service . )
Start the svnserve-d-R version Library directory
such as svnserve-d-r/usr/local/svn/
See if it starts
Ps-ef | grep SVN
1) automatic start of SVN
Vi/etc/rc.local opening a self-boot file to add
/usr/bin/svnserve-d-r/usr/local/svn/
2) enter into the virtual machine /var/www/html/lau directory
Cd/var/www/html/lau
SVN checkout Svn://192.168.234.132/sunny
Windows Modify code,linux standby update
3) Linux Automatic Update
Create a file in /usr/local/svn/sunny/hooks/ post-commit must give it executable permissions
Chmod-r 777 Post-commit
join in the vi/usr/local/svn/sunny/hooks/post-commit
#!/bin/sh
Export Lang=en_us. UTF-8
/USR/BIN/SVN update/var/www/html/lau/sunny--username U1--password 123
three
,
Install client SVN
and use
1. Installation
Client SVN is a sub-version, divided into a
installation of the system, the installation of the four-bit operating system
Install TortoiseSVN first, then install the language pack
Must be restarted after installation.
2.
use of SVN
Create a work area on the client
Note: The client and server side must be guaranteed to communicate properly. The firewall must be turned on to allow SVN to pass
#vi/etc/sysconfig/iptables
Add the following statement
-A rh-firewall-1-input-p tcp-m state--state new-m TCP--dport 3690-j ACCEPT
Restart Iptables
#service iptables Restart
1) Checkout ( to synchronize the work area and server Warehouse )
2) Submit (the files in the local work area are uploaded to the server's repository)
3) Update (download the latest file from the server repository to the local work area)
4) Submit (file resubmit in local work area with server synchronization)
Four,
SVN 's
working with schematic diagrams
Four
, an icon set in SVN
1.
Sync
icon:
Description: The local file has been synchronized with the server-side file, with the same size and modification time.
2, not affected by
Version Control icons
Description: The current file exists locally and does not exist on the server side
3
, add
icons
Note: The current file exists locally and does not exist on the server, but the next time the file is submitted, it is automatically submitted
4. Modification
icons
Note: The current file and server side file is not synchronized, the current file has been modified, will automatically prompt red exclamation mark
5. Delete
icons
Description: The file was deleted on the server and was not deleted locally
6.
Conflict Icons
Description: The current file conflicts with the server file and must be resolved before uploading
7
,
Ignore icon
Description: The current file is not submitted to the server, the default display ignores the icon
Build SVN under Linux