STEP1: Go to the SVN root directory
Cd/usr/local/svn
STEP2: Creating a version Repository
Svnadmin Create test
Where test is the name of the version of the Repository, the warehouse is established after a warehouse name will appear in the folder, the folder below a few directories and files conf,
STEP3: Increase User
Modify the Authz file under the Conf folder:
[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:
STEP4: Modify User Password
After adding the user will need to set a password for the user, open the conf/passwd file:
Enter the following:
STEP5: Control of user rights and passwords for startup SVN
You need to start SVN to control user permissions, passwords, otherwise you can only read and not write.
Modify the svnserve.conf file,
[General]
Anon-access = none # makes non-authorized users inaccessible
auth-access = Write # Enables authorized users to have write permissions
Password-db = passwd # indicates password file path
AUTHZ-DB = # access Control file
Realm = My First Repository # Authentication namespace, Subversion is displayed in the authentication prompt, and is used as a keyword for credential caching.
Cancel the preceding # # comments and modify as needed to OK:
Anon-access = None
auth-access = Write
Password-db = passwd
Authz-db = Authz
The contents of the modified file are:
STEP6: Restart the SVN service:
Start svn service command sudo svnserve-d-r/usr/local/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, kill the process using the KILL command, and then use the Start command,
With address access, if "svnserve.conf:20:option expected" is present, the cause is: Subversion reads the configuration file
svnserve.conf, a configuration file with a preceding space is not recognized, such as:
Modified to:
No need to restart SVN
For more information, please visit: http://www.iyuze.cn/article/489.html
Create SVN repositories under Linux