Setup and use of SVN server under Ubuntu

Source: Internet
Author: User
Tags subversion client

1. Installing Subversion Server
Subversion Server binaries maintained by the Ubuntu Project. Packages include the Subversion client, and tools to create a subversion repository and to make a repository available ove R a network.
Run This command as root:
$ apt-get Install Subversion

The above is derived from: Http://www.subversiondownload.com/ubuntu

from the above you can see that the installation is simple as long as you run the following command:


sudo apt-get install subversion

to verify that the installation is successful, you can use the following command:




SVN help--SVN helps svn--version--svn version svnserve--version--SVN Server version

2. Create SVN repository


Mkdir/u02/svnsvnadmin create/u02/svn/svnname  --svnname for repository name
3.SVN Configuration

once the repository is created, 3 configuration files are generated in this directory:

[Email protected] conf]# pwd/u02/svn/davesvn/conf[[email protected] conf]# lsauthz  passwd  svnserve.conf





(1) Under the SVNSERVE.CONF:SVN service configuration file.
(2) passwd: User name password file.
(3) Authz: Privilege profile.
 
svnserve.conf file, the file configuration entry is divided into the following 5 items:
anon-access: Controls the permissions of non-authenticated users to access the repository.
auth-access: Controls the permissions of the authentication user to access the repository.
password-db: Specifies the user name password file name.
authz-db: Specifies the permission profile file name through which path-based access control can be implemented.
Realm: Specifies the authentication domain for the repository, which is the name of the authentication domain that is prompted at logon. If the authentication domain of the two repositories is the same, it is recommended to use the same username password data file
Passwd File:
We enable this file in the svnserve.conf file. Then configure the following:
[[email protected] conf]# Cat passwd### This file is a example password file for svnserve.### It format is similar to th At the svnserve.conf. As shown in the### example below it contains one sections labelled [users].### the name and password for each user follow, One account per line. [users]# Harry = harryssecret# sally = Sallyssecretdave = Davepwdtianlesoftware = Tianlesoftwarepwd



Authz File:
find a good example of configuration on the Web:
[Groups]
admin = John, Kate
devteam1 = John, Rachel, Sally
devteam2 = Kate, Peter, Mark
docs = Bob, Jane, Mike
training = Zak
--here to put different users into different groups, the following in the Set Directory access permissions, the directory to operate on it.
 
# Specify default access rules for all libraries
# Everyone can read, admin can write, dangerous molecule without any permission
[/]--corresponding to my test:/u02/svn directory
* = R
@admin = RW
dangerman =
 
# allows developers to have full access to their project repository
[proj1:/]
@devteam1 = RW
[proj2:/]
@devteam2 = RW
[bigproj:/]
@devteam1 = RW
@devteam2 = RW
Trevor = RW
 
# Document writers have write access to all docs directories
[/trunk/doc]
@docs = RW
 
# trainers have full access to the training repository
[trainingrepos:/]
@training = RW
 
Let's configure our Authz file:
[email protected] conf]# cat authz[groups]admin = davedev=tianlesoftware[davesvn:/] @admin = Rw@dev = Rw[[email protected ] conf]#




4 Starting and stopping SVN services (1) Start the SVN service:
[Email protected] conf]# svnserve-d-R/U02/SVN



- D indicates background run
- R specifies that the root directory is/U02/SVN
[Email protected] conf]# Ps-ef | grep SVN



root 4592 1 0 18:04? 00:00:00 svnserve-d-r/u02/svn
root 4594 3709 0 18:04 pts/1 00:00:00 grep svn
(2) to stop the SVN service:
Ps-aux |grep svnkill-9 Process Kill


Reference: Linux build SVN server







Setup and use of SVN server under Ubuntu

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.