Linux SVN independent configuration (not attached to Apache)

Source: Internet
Author: User
Tags dotproject collabnet

Log on as the root user.
Upload subversion-1.5.1.tar.gzand subversion-deps-1.5.1.tar.gz to the server.

Tar xfvz subversion-1.5.1.tar.gz
Tar xfvz subversion-deps-1.5.1.tar.gz
CD subversion-1.5.1
./Configure-Prefix =/opt/SVN-without-Berkeley-db-with-zlib
(Note: Run in svnserve mode without adding Apache compilation parameters. Store version libraries in fsfs format without compiling Berkeley-DB)
Make clean
Make
Make install

SVN Test
/Opt/SVN/svnserve-version

If the following figure is displayed, SVN is successfully installed:

Svnserve, version 1.5.1 (r21228)
Compiled Oct 12 2006, 10: 18: 56 copyright (c) 2000-2006 collabnet.
Subversion is open source software, see http://subversion.tigris.org/
This product has DES software developed by collabnet (http://www.Collab.Net /).

The following repository back-end (FS) modules are available:

* Fs_fs: module for working with a plain file (fsfs) repository.

2. SVN Configuration
Create SVN version library directory
You can create multiple:
/Opt/SVN/mkdir-P/opt/svndata/repos1
/Opt/SVN/mkdir-P/opt/svndata/repos2

Create SVN version Library
Svnadmin create/opt/svndata/repos1
Svnadmin create/opt/svndata/repos2

Modify the SVN version library configuration file
Version Library 1:
VI/opt/svndata/repos1/CONF/svnserve. conf

Modify the content:
[General]
Anon-access = none
Auth-access = write
Password-DB =/opt/SVN/CONF/pwd. conf
Authz-DB =/opt/SVN/CONF/authz. conf
Realm = repos1

Version library 2:
VI/opt/svndata/repos2/CONF/svnserve. conf

Modify the content:
[General]
Anon-access = none
Auth-access = write
Password-DB =/opt/SVN/CONF/pwd. conf
Authz-DB =/opt/SVN/CONF/authz. conf
Realm = repos2

That is, except realm = repos2, the other configuration files are exactly the same as those of version 1. If more version libraries are available, follow these steps.

Configure SVN Users Allowed to access
VI/opt/SVN/CONF/pwd. conf

To simplify the configuration, two version libraries share one user configuration file. If necessary, they can also be separated.

Note: modifications to user configuration files take effect immediately without the need to restart SVN.

The file format is as follows:
[Users]
<User 1 >=< password 1>
<User 2 >=< password 2>

[Users] is required. The following lists the users who want to access SVN. each user has a row. Example:
[Users]
Alan = Password
King = Hello

Configure SVN User Access Permissions
VI/opt/SVN/CONF/authz. conf

To simplify the configuration, the three version libraries share one permission configuration file/opt/SVN/CONF/pwd. conf. If necessary, they can also be separated. File.

Note:
* The user name displayed in the permission configuration file must be defined in the user configuration file.
* Changes to the permission configuration file take effect immediately without restarting SVN.

User Group format:
[Groups]
<User group name >=< user 1>, <user 2>
One user group can contain one or more users separated by commas.

Version library directory format:
[<Version library>:/project/directory]
@ <User group name >=< permission>
<User name >=< permission>

The box number can be written in multiple ways:
/, Indicating the root directory and the following. The root directory is specified when svnserve is started. We specify it as/opt/svndata. In this way,/sets permissions for all version libraries.
Repos1:/, indicating to set permissions for Version 1
Repos2:/ABC, indicating to set permissions for the ABC Project in version library 2
Repos2:/ABC/AAA, indicating to set permissions for the AAA directory of the ABC Project in version library 2

The permission subject can be a user group, user, or *. The user group is preceded by @, * indicating all users. The permission can be w, R, wR, or null. If it is null, no permission is granted.

Example:
[Groups]
Admin = root, Sufi, Other
 
[/]
@ Admin = RW
 
[Iceserver:/]
Root = RW
Sufi = RW
Other = RW
 
[Iceserver2:/]
Root = RW
Sufi = RW
Other = RW

SVN configuration is complete and useless files are deleted
Rm/opt/svndata/repos1/CONF/authz
Rm/opt/svndata/repos1/CONF/passwd
Rm/opt/svndata/repos2/CONF/authz
Rm/opt/svndata/repos2/CONF/passwd

Start SVN
Svnserve-d-r/opt/svndata

Where:
-D Indicates running in daemon mode (running in the background)
-R/opt/svndata specifies that the root directory is/opt/svndata

Check:
PS-Ef | grep svnserve

If the following information is displayed, the instance is successfully started:
SVN 6941 1 0? 00:00:00 svnserve-D-Listen-port 9999-r/opt/svndata

How to import files to a version using SVN:
/Opt/SVN/bin/SVN import-M "project"/var/www/dotproject SVN: // 192.168.6.109/repos1
Where-M "project" is the description of creation
/Var/www/dotproject is the directory of the file to be imported
SVN: // 192.168.6.109/repos1 is the svn path.

File Operations in the svn export version:
SVN checkout SVN: // 192.168.6.109/repos1 dotproject
Dotproject is the name of the directory to be imported.

SVN manual:
Http://www.subversion.org.cn/svnbook/1.1/

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.