A full set of tutorials on building an independent SVN Server using CentOS

Source: Internet
Author: User

A full set of tutorials on building an independent SVN Server using CentOS

Source: http://blog.csdn.net/xuzhuang2008/article/details/8474587

Environment: centos6.3

1. First, check whether svn is installed on the machine.

Rpm-qa | grep svn

2. If no installation is executed

Yum-y install subversion

3. Create a svn directory after installation

Mkdir/home/svn

4. Create a version Repository

Svnadmincreate/home/svn/project

The red part is the version repository name used in the configuration file.

5. Put the project you want to put on svn into the project directory 6. initialize your version Repository

Svn import Folder/file: // home/svn/project-m "version description" -- username xx -- password xx

Note that, if the user name and password are not added, the client can update the data without entering the user name and password.

7. Add a user

To add SVN users, you only need to add an entry in the format of "username = password" to the/home/svn/project/conf/passwd file. For testing, I added the following content:

[users]
# harry = harryssecret
# sally = sallyssecret
pm = pm_pw

8. Modify the User Access Policy

/Home/svn/project/conf/authz records the user's access policy. The following is a reference:

[groups]
project_p = pm

# [Project:/] If there is only one version under your repository, you don't need to use xxx directly with a slash.

# [Project:/xxx] If there are multiple versions under your repository, xxx is the name of the folder.

# Select one of the above two based on your own situation
@ Project_p = rw
* =

Note: The preceding information indicates that only the project_p user group has the permission to read and write the root directory. R indicates that the directory has read permission, w indicates that the directory has write permission, and rw indicates that the directory has read and write permissions. * = In the last row indicates that no one except the user group with the preceding permissions is allowed to access this directory. This is very important and must be added!

9. Modify the svnserve. conf file to improve the efficiency of user and policy configuration.

The content of svnserve. conf is as follows:

[general]
anon-access = none
auth-access = write
password-db = /home/svn/project/conf/passwd
authz-db = /home/svn/project/conf/authz

10. Start the server

# svnserve -d -r /home/svn
Note: If the svn configuration is modified, restart the svn Service as follows:

# ps -aux|grep svnserve
# kill -9 ID
No.
# Svnserve-d-r/home/svn

11. Test Server


# svn co svn://192.168.x.x/project

12. By now, the independent svn server has been established.

Note that if the client wants to use

The url address must look like this svn: // 192.168.x.x/project. It's not the htttps header.

To use the http header, configure the http support for the svn server.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.