1. The premise for installing svn server is to install apache http software. Why? Because SUBVERSION is a project under apache. apache provides integrated http, https, and other protocols.
Information Source:
In November 2009, Subversion was accepted into Apache Incubator, which is the first step for open source projects to become a fully-fledged Apache Software Foundation project. in February 2010, it became just that, an Apache Software Foundation project.
2. svn Problems
Like anything, it has its downsides, one of which is its speed. if you're working with a remote repository and you need to commit your files and you happen to be using a slow Internet connection, you are being waiting a long time.
Installation and Basic Applications
1. svn installation (divided into two types ):
Apt-get install:
Sudo apt-get update
Sudo apt-get install subversion libapache2-svn
Source code version
2. file permissions for creating warehouses and warehouses
Sudo mkdir/var/svn-repos/
Sudo groupadd subversion
Sudo chown-R www-data: subversion/var/svn-repos/* [the repository user belongs to the apache user (www-data), and the group is still svn: ensures that svn can be integrated in http and is secure at the same time]
Sudo chmod-R 770/var/svn-repos/* [the group must have write permission]
3. Create a project and plan
Sudo svnadmin create -- fs-type fsfs/var/svn-repos/project_test
Sudo svn mkdir-m "initial setup" file: // var/svn-repos/project_test/trunk
Sudo svn mkdir-m "initial setup" file: // var/svn-repos/project_test/branches
Sudo svn mkdir-m "initial setup" file: // var/svn-repos/project_test/tags
TIPS:You'll also be adding the trunk, branches, and tags directories into the repositories here to ensure the repository is in the correct format (FSFS format, default is DB format ).
4. start svn server
Svnserve-d-r/var/svn-repos/
-D: Specifies the directory to be enabled.
-R: run in the background
5. Disable the svn service.
SVN process name: svnserve
Search for svn-related PID values: ps aux | grep svnserve
Kill-9 PID Value
Or
KillAll-9 svnserve
Configuration
1. Allocate the user name and password.
1. Open the svnserve. conf file in the conf directory and disable anonymous user access. [do not leave spaces after deleting comments.] anon-access = none
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
#anon-access = read
#anon-access = write
#auth-access = write
#auth-access = none
Anon-access = none [Key]
[No left or remain white space in this configuration file when you remove the single comment]
2. Enable the passwd file to allow the configuration file to reference this password file.
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
Password-db = passwd [Key]
3. open passwd file in config dirctory, you can add new username and password
loin = 123456
It is worth noting that:
1. anon-access = read -- correct
Anon-access = read -- Error
After the annotations are removed, do not leave spaces. Otherwise, the svnserve. conf: 12: Option expected error may occur.
2. the user name and password must be separated by blank spaces. When there is no comment, do not leave spaces in front of the user name.
2. Assign permissions to the SVN working directory
Svn permission assignment can be implemented in a variety of ways: group-based assignment or individual user assignment. Either way, you must enable the authz file.
1. In the svnserve. conf file, delete the comments related to authz.
2. open authz file with your favorite editor, determine the directory for permission allocation, and use r (read) and w (write) for permission allocation
[/share]
kaiwen = rw
jennifer = rw
3. There are many situations in the configuration file that need to be considered:
- For a directory, the Group members have the same permissions, but they want to grant higher permissions to a group of users.
- A user can view all the projects in the root directory, but only one directory in the root directory of checkout can be viewed, other directories are not allowed to access or view [or sub-projects under the entire directory can be read, but only one project allows write]
A basic svn trunk Structure
/trunk/website/cms
/trunk/website/e-commerce
/trunk/website/bbs
/trunkc/website/blog
/trunk/mobile/mobile-webiste
/trunk/mobile/app
/trunk/prototype
/trunk/graphic
/trunk/sketch
Environment Description:
1. Technical Director [view and modify everyone's Code]
2. Three team leaders (one is e-commerce, one is cms and blog, and the other is mobile) [only responsible for various projects]
3. Each team has 3-5 employees (each group has a primary programmer). [You can perform any operation on projects that have been assigned to you, but you can only view projects of others]
4. A product manager [only allows you to view prototype and design]
5. One project manager [can view multiple independent group projects, or modify the design and development group projects]
SVN Security Configuration
SVN Layout Planning
3. SVN configuration for multiple warehouses (one for code and the other for log storage )?
4. Subversion integrates apache to implement http access (including https)
5. How to Create branch to detach a project (meaning of branch)