Build the SVN environment in Ubuntu-Apache

Source: Internet
Author: User
Environment Description: ttuserver12.04/svn1.6/apache21. First, create the svn group and user: addgroudsvnuseraddsvn-gsvn-m // Add the svn username,-g and create the svn group in which it belongs, -m simultaneously create the home Directory of the svn user passwdsvn // set the svn user's password 2. Install apach

Environment Description: Ubuntu Server 12.04/svn1.6/apache2

1. Create an svn group and user first:

Addgroud svn

Useradd svn-g svn-m // Add the svn username,-g and specify the svn group in which it is located.-m also creates the home directory where the svn user is located.

Passwd svn // set the svn User Password

 

2. Install apache2 and svn server

Sudo apt-get install apache2

Sudo apt-get install subversion

Sudo apt-get install libapache2-svn

After the above installation, you can directly access the apache homepage, such as http: // localhost/

 

3. Create an svn version Library

Sudo mkdir/var/svn

Sudo svnadmin create/var/svn/repos

You can view all the folders and configuration files of the svn version library in the/var/svn/repos directory, such as conf?db=format=hooks=locks=readme.txt.

 

4. Configure and import the project

Sudo mkdir/opt/idbtest

Sudo mkdir/opt/idbtest/branches

Sudo mkdir/opt/idbtest/tags

Sudo mkdir/opt/idbtest/trunk

Import the project to the version Library: svn import/opt/idbtest file: /// var/svn/repos/idbtest-m "initial import" // opt/idbtest indicates the project to be introduced. file: /// var/svn/repos/idbtest indicates the version library of svn, Which is initialized and introduced here.

 

5. Configure svn to apache for http web access

Sudo vi/etc/apache2/apache. conf, paste the following file to the end of apache. conf, as follows:

 

DAV svn

SVNPath/var/svn/repos

AuthType Basic

AuthName "Subversion Repository"

AuthUserFile/var/svn/repos/conf/passwd

Require valid-user

Note: This configuration file tells apache that the svn access path is related to the configuration file. Restart the apache server, and then you can remotely access the server through http: // localhost/svn.

Restart apache server:/etc/init. d/apache2 restart

Of course, you need to verify the login user. Next we will introduce how to add svn users.

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.