1 Linux under Create SVN repository 1.1 start SVN service
Svnserve-d-r/svnrootdirectry
Where Svnrootdirectry is your SVN root directory, for example on 192.85.1.2:/SVN. -d means that the service is executed later, and-R is the root
1.2 Create warehouse 1.2.1 Build repository in SVN root directory
Svnadmin Create Study
Command: Svnadmin Create MSM
Where MSM is the name of the version of the warehouse, the warehouse has been established after a warehouse name will appear in the folder, folder under the Conf and other directories and files,
Such as. Next you need to set permissions on the repository. Here's a note: The repositories are independent.
The file directory is as follows:
Where the directory under the Conf folder is:
1.2.2 Adding users
Modify the Authz file under the Conf folder:
Instruction brief: This profile takes the path-based authorization policy, specifying the path in parentheses, and the following lists the authorizations for each user.
Includes read-only R, read-write RW. If no users are listed, access is not allowed. You can also group users, please refer to the SVN manual, the following is a simple example:
<!--[if!supportlinebreaknewline]--> user group format:
[Groups]
< user group name > = < user 1>,< user 2>
Of these, 1 user groups can contain 1 or more users, separated by commas between users.
Repository directory format:
[< Repository >:/project/catalog]
@< user Group Name > = < permissions >
< user name > = < permissions >
Where the box number can be written in several ways:
/, indicates the root directory (storage directory) and the following. The root directory is specified at svnserve startup, and we specify/opt/svndata. This means that the permissions are set for all repositories.
A permission principal can be a user group, user, or *, and the user group is preceded by @,* to represent all users. Permissions can be W, R, WR, and NULL, and NULL indicates no permissions.
Add your user group under [groups] (remember to leave a blank before and after the equals sign)
under [/] to increase the user or user group permission settings, and finally, such as:
1.2.3 Modifying user passwords
After adding the user will need to set a password for the user, open the conf/passwd file:
Enter the following:
[Users]
< user 1> = < password 1> Admin = admin
< user 2> = < password 2> UserName2 = Password2
You can add multiple, this is the user name password pair.
Uncomment the [users] and add your user's password settings below (remember the space around the equals sign), such as:
1.2.4 to start SVN on user rights, password control
You need to start SVN to control user permissions, passwords, otherwise you can only read and not write.
Modify the svnserve.conf file,
Each parameter function is described in the comments in the configuration file, which is configured as follows:
[General]
Anon-access = none # makes non-authorized users inaccessible
auth-access = Write # Enables authorized users to have write permissions
Password-db =/opt/svndata/repos/conf/passwd # indicates password file path
authz-db =/opt/svndata/repos/conf/authz # access Control file
Realm =/opt/svndata/repos # authentication namespace, Subversion will be displayed in the authentication prompt,
And as a keyword for credential caching.
Cancel the preceding # # comments to OK:
Anon-access = Read
auth-access = Write
Password-db = passwd
Authz-db = Authz
Restart the SVN service:
Start SVN service Command svnserve-d-R/SVN
If quote: Svnserve:can ' t bind server socket:address already in use
Workaround:
Use "Ps-e|grep Svnserve" to find the service corresponding process number, use the KILL command, and then use the Start command,
With address access, if "svnserve.conf:12:option expected" occurs, the cause is: Subversion reads the configuration file
svnserve.conf, the configuration file with the preceding space is not recognized
Modified to read
1.2.5 Assigning write permissions to the DB directory in the SVN storage space
Cd/svn
sudo chmod 777-r warehousing name
Otherwise, you can't submit the file
2 SVN standard directory Structure 2.1 directory structure overview
2.1.1 Directory Trunk
Trunk is the main branch, is the daily development of the place, usually contains:
0-SRC Source
1-developdoc Development Documentation
2-productdoc Product Documentation
3-thirdpartytools third-party tools (plugins)
4-testing Test
5-deploydoc Deployment Documentation
2.1.2 Directory Branches
Ranches is a branch. Some of the phased release releases, which can be developed and maintained, are placed in the branches directory.
For example, for different user customized version, can also be placed in the branch for development.
2.1.3 Directory Tags
The tags directory is generally read-only, where a staged release is stored and archived only as a milestone version.
2.2 Rights Assignment: Modify the Authz file
Create SVN repositories and users under Linux