1. Install Subversion
Yum-y Install Subversion
2. Open 3690 Port
SVN uses 3690 as the port
3, create SVN warehouse repository, future projects will be stored here, note that the repository as the root directory of SVN, can easily store multiple projects
Mkdir/opt/svn
4. Create our Project
Svnadmin Create/opt/svn/project_1svnadmin create/opt/svn/project_2
5. Configure project accounts and access rights
The configuration file for this project is generated when the project is created with Svnadmin
vi /opt/svn/project_1/conf/passwd //account password .... [users]admin = 123456 //account = Password james = 123456....vi /opt/svn/project_1 /conf/authz //User User group access to the project .... [groups] //user group definition super = admingeneral = james .... [/foo/bar] //The path permissions relative to the SVN server root directory @super = rwadmin = rw....//multiple projects can be shared by a authz as a permission configuration, You can use the format to differentiate items at this time [project_1:/] //project root Super group users can read and write @super = rwadmin = rw // You can also specify users [project_1:/branches]//general group users can only read and write branches @general = rw .... [Authz-db in Project_2:/] //project_2 svnserve.conf need to point to this configuration file to @super = rwvi /opt/svn/ project_1/conf/svnserve.conf //project configuration ... anon-access = read //turn on anonymous access auth-access = write //Certified writable password-db = passwd //account password file authz-db = authz //permissions authentication file Realm = /opt/svn/project_1 //Field limited to current project ...
5. Import our Project
SVN import ~/project_1 file:///opt/svn/project_1-m "Import project_1" svn import ~/project_2 file:///opt/svn/project_2- M "Import project_2"
Project_1 and Project_2 are your own project file structure.
|-branches//Branch |-tags//Label |-trunk//Main Library
6. Open Service
Svnserve-d-R/OPT/SVN
7, try to check out project_1 to the current directory
SVN checkout svn://yoursvnserverip/project_1//admin can be checked out but James will prompt for no permissions because we have permission for project_1 configuration James can only read and write branches directory SVN Checkout svn://yoursvnserverip/project_1/branches//admin sure can check out James can also check out svn updatesvn add filenamesvn commit-m ' Description
Here in detail the SVN permission configuration that piece
Successful use of SVN to create a project will generate the warehouse directory structure for this project, where the project's configuration file is in the Conf folder
passwd Account name Password
[Users]
Username = Userpassworld
Authz User Rights
Svnserve.conf project Configuration "multiple projects can be configured as"
Anon-access Anonymous Permissions
Auth-access Authentication Permissions
Password-db account file to specify a common file
Authz-db permission file to specify a common file
Realm scopes can specify a top-level domain
Configure SVN server under CentOS