UbuntuLinuxApache2 + Subversion configure svn Service

Source: Internet
Author: User
Subversion is an open-source version control system. The following describes how to install and configure Subversion in Ubuntu: 1. environment UbuntuLinux (11.x) + apache2 + Subversion (1.6.12) II. configuration 1. apt-get install svnkenchen @ ubuntu :~ $ Sudoapt-getinstallsubversionsubversion-tools

Subversion is an open-source version control system. The following describes how to install and configure it in Ubuntu:

I. Environment

Ubuntu Linux (11.x) + apache2 + Subversion (1.6.12)

Ii. Configuration

1. apt-get install svn

Kenchen @ ubuntu :~ $ Sudo apt-get install subversion-tools

2. apt-get install apache2

Kenchen @ ubuntu :~ $ Sudo apt-get install apache2 libapache2-svn

3. Create the svn directory (/home/svn) and configure the directory owner and permission to (www-data)

Kenchen @ ubuntu :~ $ Sudo mkdir/home/svn
Kenchen @ ubuntu :~ $ Sudo chmod www-data: www-data-R/home/svn/
Kenchen @ ubuntu :~ $ Sudo chmod 770-R/home/svn/

4. Create the svn user password configuration file:/etc/apache2/dav_svn.passwd

Kenchen @ ubuntu :~ $ Sudo htpasswd-c/etc/apache2/dav_svn.passwd kenchen

5. Create the svn directory permission configuration file:/etc/apache2/dav_svn.authz

Kenchen @ ubuntu :~ $ Sudo vi/etc/apache2/dav_svn.authz
# Define a group
[Groups]
Admin = kenche
Tests = pet
# Define the access permission for the root directory of the Repository
[Devroot:/] # configure the devroot permission of the version Library
* = # Access by all users is prohibited by default
@ Admin = rw # The admin group has read and write permissions.
Pet = r # user pet has read permission

6. Configure/etc/apache2/mod-enabled/dav_svn.conf

Kenchen @ ubuntu :~ $ Sudo vi/etc/apache2/mod-enabled/dav_svn.conf


DAV svn # Enabled
SVNParentPath/home/svn # Set the svn repository path
AuthType Basic # enable apache Basic verification
AuthName "Subversion Repository" # Set the verification box title
AuthUserFile/etc/apache2/dav_svn.passwd # specify the file name to verify the user
AuthzSVNAccessFile/etc/apache2/dav_svn.authz # enable directory-level authorization
Require valid-user

7. Create a svn repository (devroot)

Kenchen @ ubuntu :~ $ Su-www-data
Kenchen @ ubuntu :~ $ Svnadmin create/home/svn/devroot

8. The configuration is complete. Restart The apache2 service.

Kenchen @ ubuntu :~ $ Sudo apache2ctl restart

9. Now you can enter http: // 127.0.0.1/svn/devroot/in the browser to access

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