How to build and analyze SVN servers in CentOS

Source: Internet
Author: User
Tags collabnet
Original content. For more information, see the source. 1yum install svnyuminstall-ysubversion wait for a while and the following content is displayed. Depend

Original content. For more information, see the source.

1. install svn in yum
yum install -y subversion  
Wait for a while to display the following content.
Dependency Installed:  gnutls.i686 0:2.8.5-10.el6_4.2               libproxy.i686 0:0.3.0-4.el6_3                    libproxy-bin.i686 0:0.3.0-4.el6_3            libproxy-python.i686 0:0.3.0-4.el6_3             neon.i686 0:0.29.3-3.el6_4                   pakchois.i686 0:0.4-3.2.el6                      perl-URI.noarch 0:1.40-2.el6                Complete!
2. verify whether the installation is complete.
svnserve --version 
This is my display content.
Svnserve, Version 1.6.11 (r934133) is compiled on Apr 11: 28: 04 Copyright (C) 2000-2009 CollabNet. Subversion is open source software, see http://subversion.tigris.org/site. This product contains software developed by CollabNet (http://www.Collab.Net. The backend (FS) module of the following versions is available: * fs_base: The module can only operate on the BDB version Library. * Fs_fs: This module works with the text file (FSFS) version Library. Cyrus SASL authentication is available.
3. create an svn version Library
Mkdir/var/svn # I put the version library in the svn folder under the var directory, easy management of svnadmin create/var/svn/repo0 # I use svn as the directory of all version libraries and create a version Library named repo0
4. configure the current version Library

After a version Library is created, the following files are generated in the current version Library Directory. we are concerned with the configuration file.

[root@localhost svn]# lsrepo0[root@localhost svn]# cd repo0[root@localhost repo0]# lsconf  db  format  hooks  locks  README.txt[root@localhost repo0]# pwd/var/svn/repo0[root@localhost repo0]# cd conf[root@localhost conf]# ls -a.  ..  authz  passwd  svnserve.conf

Description:

(1) svnserve. conf: svn service configuration file.

(2) passwd: user name and password file.

(3) authz: permission configuration file.

4.1 modify the passwd file
### This file is an example password file for svnserve.### Its format is similar to that of svnserve.conf. As shown in the### example below it contains one section labelled [users].### The name and password for each user follow, one account per line.[users]# harry = harryssecret# sally = sallyssecretrepouser0 = user0passwdrock=rockpasswd
It corresponds to the username = password, where spaces on both sides of the equal sign are not required. 4.2 modify the authz file
[Aliases] # joe =/C = XZ/ST = Dessert/L = Snake City/O = Snake Oil, Ltd. /OU = Research Institute/CN = Joe Average # The alias definition [groups] # harry_and_sally = harry, sally # harry_sally_and_joe = harry, sally, & joeteam0 = erpouser0 # divide the created above into two groups team1 = rock # [/foo/bar] # harry = rw # & joe = r # The alias definition above is implemented here & it is easy to understand as a pointer # * = # [repository: /baz/fuz] # @ harry_and_sally = rw # * = r [repo0:/] @ team0 = r @ team1 = rw # The first group has only the read permission, the second group has read and write permissions # The permission configuration for a single version Library is implemented in this file
4.3 modify svnserve. conf
vim svnserve.conf
[General] ### These options control access to the repository for unauthenticated ### and authenticated users. valid values are "write", "read", ### and "none ". the sample settings below are the defaults. anon-access = none # users without logon cannot access auth-access = write # login users can write ### The password-db option controls the location of the password ### database file. unless you specify a path starting with a/, ### the file's location is relative to the directory containing ### this configuration file. ### If SASL is enabled (see below), this file will NOT be used. ### Uncomment the line below to use the default password file. password-db = passwd # The password file is passwd in the current directory ### the authz-db option controls The location of the authorization ### rules for path-based access control. unless you specify a path ### starting with a/, the file's location is relative to the ### directory containing this file. if you don't specify an ### authz-db, no path-based access control is done. ### Uncomment the line below to use the default authorization file. authz-db = authz # The authentication file is the authz in the current directory.
5. stop and start svn5.1 start svn
svnserve -d -r /var/svn/ 
5.2 close svn
Ps-aux | grep svnkill-9 process id
6. import the project
$ mkdir MyProject  $ mkdir MyProject/trunk  $ mkdir MyProject/branches  $ mkdir MyProject/tags  svn import MyProject svn://192.168.1.109/repo0/MyProject -m "first import project" 
7. export project
svn co svn://192.168.1.109/repo0/MyProject 
8. Summary

Today, when the Internet is so developed, you can find almost any technical article you want, but you will find that all the same [punctuation] articles appear on large and small websites, it is too difficult to find the second article with different viewpoints. It's crazy to take things. what our technicians need is innovation. The open source spirit starts from me. Writing technical blogs is more of a kind of practice and improvement. practice is the best teacher.

9 References
http://blog.csdn.net/shangliuyan/article/details/7351675http://www.2cto.com/os/201209/157198.html
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.