Linux Svnserver Build

Source: Internet
Author: User

1. Ubuntu pc one. It is best to be the latest Ubuntu stable version number 2. Run the following command to install Subversion:

sudo apt-get updatesudo apt-get Install Subversion

3. If the root path of the code SVN repository is set to/home/svnroot, run the following command to create a new folder:

sudo mkdir/home/svnroot

4. Create a new code warehouse. If the warehouse name is: example

Cd/home/svnrootsudo Svnadmin Create Example

When this command finishes running, a folder named example will be/home/svnroot under the. This is the example code warehouse.


5. Edit access permissions for the example warehouse

That is: Change the three files under/home/svnroot/example/conf: Authz passwd svnserve.conf

Of
Username and password are saved in the passwd
User group definitions and access permission definitions for each folder are saved in Authz
The configuration used in this code warehouse is saved in svnserve.conf (does it agree with anonymous users?). Specify username and password databases ... )
Here is a typical configuration:

passwd instances:

[users]xiaoming = 1111xiaowang = 2222xiaoli = 3333laowang = 4444shuangshuang = 5555dashi = 6666

Authz instance (Admin can read and write all folders, dev can read and write branch. Dev only reads Trunk/tag):

[aliases]# Joe =/c=xz/st=dessert/l=snake city/o=snake oil, ltd./ou=research institute/cn=joe Average[groups]admin = Xiaolidev = laowang,shuangshuang,dashi,xiaowang,xiaoming[/] @admin = Rw@dev = R[/trunk] @admin = Rw@dev = R[/tag] @admin = RW @dev = R[/branch] @admin = Rw@dev = RW

svnserve.conf instance (turn off anonymous access.) Specify user database and authentication database):

# # # This file controls the configuration of the Svnserve daemon, if you### with it to allow access to this repository. (If you are allow### access through http:and/or file:urls, then this file is### irrelevant.) # # # Visit http://subversion.tigris.org/for more information. [general]### These options control access to the repository for unauthenticated### and authenticated users. Valid values are "write", "read", # # # and "None". The sample settings below is the defaults.anon-access = Noneauth-access = write### The password-db option controls the LO Cation of the password### database file. Unless specify a path starting with a/,### the file's location is relative to the directory containing### this config Uration file.### If SASL is enabled (see below), this file would not be used.### uncomment the line below to use the Defaul T password file.password-db = passwd### The AUTHZ-DB option controls the location of the authorization### rules for Path-b ased access control. Unless you specifyA path### starting with a/, the file's location was relative to the the### directory containing this file. If you don ' t specify an### authz-db, no path-based access control are done.### uncomment the line below to use the default Authorization file.authz-db = authz### This option specifies the authentication realm of the repository.### If the Reposit Ories has the same authentication realm, they should### has the same password database, and vice versa.  The default realm### is Repository's uuid.# realm = My First repository[sasl]### This option specifies whether you want to Use the Cyrus sasl### library for authentication. Default is false.### the This section would be ignored if svnserve are not built with cyrus### SASL support; To check, the run ' Svnserve--version ' and look for a line### reading ' Cyrus SASL authentication is available. ' # USE-SASL = true### These options specify the desired strength of the security layer### that you want SASL to provide. 0 means no encryption, 1 means### IntegrIty-checking only, values larger than 1 is correlated### to the effective key length for encryption (e.g. means 128-b it### encryption). The values below is the defaults.# min-encryption = 0# max-encryption = 256

6. Add SVN service to the system self-boot project

-Create svnd.sh. Content such as the following

#!/bin/bashsvnserve-d-r/home/svnroot

Put this file in/etc/init.d/svnd.sh
The function of this script: start the SVN service, only after starting the service, the external machine talent through a variety of SVN tools to access the Svnserver.


-Add operational permissions

sudo chmod a+x/etc/init.d/svnd.sh

-Edit Rc.local

Vim/etc/rc.local


Before exit 0 . Plus /etc/init.d/svnd.sh .
-Restart the server, and then run the command:

Ps-e | grep svnserve
From the command result, check that the SVN service is booting with the system on its own initiative.




Copyright notice: This article Bo Master original article. Blog, not reproduced without consent.

Linux Svnserver Build

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.