Build svn Based on apache

Source: Internet
Author: User

Foreword most senior programmers may now use github for code management tools. However, many companies still choose svn as the code version management tool considering the ease of implementation and the ability to accept the code, the following describes how to build a svn version Library Based on apache install svn related modules installation Command [html] sudo apt-get install subversion libapache2-svn after successful installation configure the svn version library to create the svn root directory [html] mkdir-p/home/svn create the required version library [html] cd/home/svn/sudo svnadmin create version Library because apache is used to access svn, so the directory owner is www-data can be [html] sudo chown-R www-data.www-data version library name configuration Apache modify apache svn-based module configuration file [html] sudo vim/etc/apache2 /mod-available/dav_svn.conf after modification, the configuration file content is as follows [html] # dav_svn.conf-Example Subversion/Apache configuration # For details and further options see the Apache user manual and # the Subversion book. # NOTE: for a setup with multiple vhosts, you will want to do this # configuration in/etc/apache2/sites-available/*, not here. # <Location URL>... </Location> # URL controls how the repository appears to the outside world. # In this example clients access the repository as http: // hostname/svn/# Note, a literal/svn shocould NOT exist in your document root. <Location/svn> # Uncomment this to enable the repository DAV svn # Set this to the path to your repository # SVNPath/home/svn # Alternatively, use SVNParentPath if you have multiple repositories under # under a single directory (/var/lib/svn/repo1,/var/lib/svn/repo2 ,...). # You need either SVNPath and SVNParentPath, but not both. SVNListParentPath on SVNParentPath/home/svn # Access control is done at 3 levels: (1) Apache authentication, via # any of several methods. A "Basic Auth" section is commented out # below. (2) Apache <Limit> and <limitlimit T>, also commented out # below. (3) mod_authz_svn is a svn-specific authorization module # which offers fine-grained read/write access control for paths # within a repository. (The first two layers are coarse-grained; you # can only enable/disable access to an entire repository .) note that # mod_authz_svn is noticeably slower than the other two layers, so if # you don't need the fine-grained control, don't configure it. # Basic Authentication is repository-wide. it is not secure unless # you are using https. see the 'htpasswd' command to create and # manage the password file-and the documentation for the # 'auth _ basic 'and 'authn _ file' modules, which you will need for this # (enable them with 'a2enmod '). authType Basic AuthName "Subversion Repository" AuthUserFile/etc/apache2/clusters # To enable authorization via mod_authz_svn AuthzSVNAccessFile/etc/apache2/clusters # The following three lines allow anonymous read, but make # committers authenticate themselves. it requires the 'authz _ user' # module (enable it with 'a2enmod '). # <limitverification t get propfind options report> Require valid-user # </limit#t> </Location> note: in pairs with <Location/svn> and </Location>, DAV svn enables the DAV module and supports either SVNPath or SVNParentPath. We recommend that you use SVNParentPath, in this way, you can create multiple SVN version libraries under the svn root directory to enable BASIC authentication and read more comments in English, create a svn account [html] sudo htpasswd [-c]/etc/apache2/dav_svn.passwd $ username. Note: /etc/apache2/dav_svn.passwd is the file parameter-c specified by AuthUserFile in dav_svn.conf of apache. this parameter is required when the specified file does not exist. When the specified file exists, this parameter is not required, otherwise, the system overwrites the record access permission control in the original file and modifies the AuthzSVNAccessFile. the specified file [html] sudo vim/etc/apache2/dav_svn.authz creates a group and configures the read/write control sample file [html] [groups] haotest1-admin = wangzhengyi haotest1-dev = wangzhengyi, chen Shan [haotest1:/] @ haotest1-dev = r @ haotest1-admin = rw [haotest1:/trunk] @ haotest1-dev = rw [haotest1: /tags] @ haotest1-admin = rw parameter description [groups] For the haotest1 version library set two groups, one admin, one dev [haotest1:/] This is the root directory of the haotest1 version library, only the r permission is available for the dev group, that is, the dev group can only be checked out,
If you have the rw permission for admin, you can create, delete, modify, and so on. If you don't understand it, google. If you say it is too much, it's boring to check out the remote host ip address in the test scenario at path of the version library detected by check out command [html] svn co http: // -- username wangzhengyi create directory and submit

Related Article

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: 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.