Today try to build an SVN server to play, online patchwork find some information.
Reference link http://blog.csdn.net/tianlesoftware/article/details/6119231
About SVN
Subversion (SVN) is an open source version control system, which means that subversion manages data that changes over time. This data is placed in a central data archive (repository). This archive is much like an ordinary file server, but it remembers every change in the file. You can then restore the file to the old version, or browse the history of the document.
Some of the concepts in SVN:
(1). Repository (source code library)
Where source code is stored uniformly
(2). Checkout (extract)
When you have no source code on your hands, you need to checkout a copy from Repository.
(3). Commit (Submit)
When you've changed the code, you'll need to commit to repository.
(4). Update (Updated)
When you have checkout a source code, update you can be synchronized with the source code on the repository, you will have the latest changes
The daily development process is actually like this (assuming you've been checkout and working for a few days): Update (Get the latest code)--Make your own changes and debug success--Commit (you can see your changes).
If two programmers modify the same file at the same time, SVN can merge the two programmer's changes, in fact, the SVN management source code is in the behavior unit, that is, two programmers as long as not modify the same line program, SVN will automatically merge two changes. If the same line, SVN will prompt the file confict, conflict, need to manually confirm.
Client software:
(1) Commonly used client software under Windows TORTOISESVN. It is a free open source client.
(2) to MyEclipse, there are some SVN plugins.
SVN Server Setup
To install the SVN package with Yum:
[email protected] ~]# Yum install-y Subversion
To verify the installation version:
[Email protected] ~]# Svnserve--version
Three. Create SVN repository
[Email protected] ~]# MKDIR/U02/SVN
[[email protected] ~]# svnadmin create/u02/svn/davesvn--davesvn as repository name
SVN Configuration
Once the repository is created, 3 configuration files are generated in this directory:
[Email protected] conf]# pwd
/u02/svn/davesvn/conf
[[email protected] conf]# ls
Authz passwd svnserve.conf
(1) SVNSERVE.CONF:SVN service configuration file.
(2) passwd: User name password file.
(3) Authz: Privilege profile.
svnserve.conf file
The file configuration item is divided into the following 5 items:
Anon-access: Permissions for anonymous users to access the repository.
Auth-access: Permissions for non-anonymous users to access the repository.
PASSWORD-DB: Specifies the user name password file name.
AUTHZ-DB: Specifies the permission profile file name through which path-based access control can be implemented.
Realm: Specifies the authentication domain for the repository, which is the name of the authentication domain that is prompted at logon. If the authentication domain of the two repositories is the same, it is recommended to use the same username password data file
PASSWD file:
We enable this file in the svnserve.conf file. Then configure the following:
[email protected] conf]# cat passwd
# # # This file is a example password file for Svnserve.
# # # Its format was similar to that of svnserve.conf. As shown in the
# # # example below it contains one section labelled [Users].
# # # The name and password for each user follow, one account per line.
[Users]
# Harry = Harryssecret
# sally = Sallyssecret
Dave = Davepwd
Tianlesoftware = Tianlesoftwarepwd
To configure our Authz file:
[email protected] conf]# cat Authz
[Groups]
admin = Dave
Dev=tianlesoftware
[davesvn:/]
@admin = RW
@dev = RW
start and stop SVN services
(1) Start the SVN service:
[Email protected] conf]# svnserve-d-R/U02/SVN
-D indicates background run
-r specifies that the root directory is/U02/SVN
[Email protected] conf]# Ps-ef | grep SVN
Root 4592 1 0 18:04? 00:00:00 svnserve-d-R/U02/SVN
Root 4594 3709 0 18:04 pts/1 00:00:00 grep svn
(2) To stop the SVN service:
Ps-aux |grep SVN
Kill-9 process Kill
Setup of SVN server under Linux