Create SVN repository
Create the repository using the svn command
[w3big@centos6 ~]# svnadmin create /opt/svn/w3big01 [w3big@centos6 ~]# ll /opt/svn/w3big01/ total 24 drwxr-xr-x 2 root root 4096 2016/08/23 16:31:06 conf drwxr-sr-x 6 root root 4096 2016/08/23 16:31:06 db -r--r--r-- 1 root root 2 2016/08/23 16:31:06 format drwxr-xr-x 2 root root 4096 2016/08/23 16:31:06 hooks drwxr-xr-x 2 root root 4096 2016/08/23 16:31:06 locks -rw-r--r-- 1 root root 229 2016/08/23 16:31:06 README.txt
Enter / opt / svn / w3big01 / conf directory to modify the default profile configuration, including svnserve.conf, passwd, authz associated user configuration and permissions.
1, svn service profile svnserve.conf
svn repository for the service profile files in the directory conf / svnserve.conf. The document consists of only one [general] configuration segments.
[general] anon-access = none auth-access = write password-db = /home/svn/passwd authz-db = /home/svn/authz realm = tiku
anon-access: control of non-authenticated users access to the repository, the range of "write", "read" and "none". That is "write" to read and write, "read" is read-only, "none" means no access. Default value: read
auth-access: users access control authentication repository. In the range of "write", "read" and "none". That is "write" to read and write, "read" is read-only, "none" means no access. Default value: write
authz-db: assign permissions configuration file name, the file can be achieved through a path-based access control. Unless you specify an absolute path, or file location as a relative path relative to the conf directory. Default value: authz
realm: Specifies the authentication domain repository, that is, when the login prompt authentication domain name. If the two authentication domain repository of the same, it is recommended to use the same username password data files. Default: a UUID (Universal Unique IDentifier, globally unique identifier).
2, the user name password file passwd
Username password file specified by the configuration item svnserve.conf password-db, default conf directory passwd. The document consists of only one [users] Configuration segments.
Configuration line format [users] configuration section as follows:
<用户名> = <口令>
[users] admin = admin thinker = 123456
3, permissions profile
Rights profiles specified by svnserve.conf configuration items authz-db, default conf directory authz. The configuration file consists of a [groups] configuration section and several privileges repository path segments.
Configure [groups] configuration section line format is as follows:
<用户组> = <用户列表>
Section name format repository path permission segment is as follows:
[<版本库名>:<路径>]
[groups] g_admin = admin,thinker [admintools:/] @g_admin = rw * = [test:/home/thinker] thinker = rw * = r
This example is to use svnserve -d -r / opt / svn with multiple database svnserve way to start SVN, so the URL: svn: //192.168.0.1/w3big01