Install TracSVN in Ubuntu

Source: Internet
Author: User
I. For details about installing and configuring SVN, refer to idea.

I. SVN installation and configuration

See http://www.linuxidc.com/Linux/2011-11/47128.htm for details

1. Install SVN, including using apache2 to browse SVN plug-ins

  1. $ Sudo apt-GetInstall subversion
  2. $ Sudo apt-GetInstall libapache2-svn// This is the apache installation part. You do not need to install this part if you do not use the http protocol.

2. Configure the svn Server

First, create a subversion user group, add both www-data and yourself to the group, and create a code repository.

  1. $ Sudo addgroup subversion
  2. $ Sudo usermod-G subversion-a www-data
  3. $ Sudo mkdir/opt/svn// Create the SVN root location
  4. $ Cd/opt/svn// Enter the SVN root location
  5. $ Sudo mkdir nginx// Create a project code library
  6. $ Sudo svnadmin create/home/svn/npmonitor// Create a new code library
  7. // If the access is unavailable, perform the following authorization statements:
  8. $ Sudo chown-R root: subversion nginx// Here you need to add permissions to www-data, because apache is used later.
  9. $ Sudo chmod-R g + rws nginx// This is to grant the group members the corresponding permissions on all files added to the file warehouse.

3. Configure SVN access methods

The Subversion File Repository can be accessed (checked Out and checked Out) in many different ways-either through a local hard disk or through various network protocols.

To access the SVN File Repository through the WebDAV protocol, you must configure your Apache 2 Web server. You must add the following code snippet to your/etc/apache2/mod-available/dav_svn.conf file:

  1. DAV svn
  2. SVNPath/opt/svn/webbase
  3. AuthType Basic
  4. AuthName"Subversion Repository"
  5. AuthUserFile/etc/apache2/dav_svn.passwd 
  6. # To enable authorization via mod_authz_svn
  7. AuthzSVNAccessFile/etc/apache2/dav_svn.authz
  8. Require valid-use

Next, you need to create the/etc/apache2/dav_svn.passwd file. This file contains detailed information about user authorization. To add a user, run the following command:

$sudo htpasswd -c /etc/apache2/dav_svn.passwd user_name

It will prompt you to enter the password. When you enter the password, the user will be created.

Next, you need to create the/etc/apache2/dav_svn.authz file. This file is used to configure its access control.

For example, create the dav_svn.authz file and enter

User_name = rw 

This allows user_name to access the read and write permissions of files in webbase.

For detailed configuration, see the authz file under/opt/svn/webbase/conf.

When you add the preceding content, you must restart the Apache 2 Web server. Enter the following command:

$ Sudo/etc/init. d/apache2 restart

 

After webadmin is added, the following prompt is displayed. You can add the version library "webbase" as needed. Now you should run trac-admin $ ENV repository resync "webbase" to synchronize the Trac and version libraries. You should also set a post-commit hook on the version library to call trac-admin $ ENV changeset added "webbase" $ REV for each submitted Change set. Example: $ sudo trac-admin/path/to/env changeset added "$1" "$2"
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.