Build SVN server in Linux

Source: Internet
Author: User
Tags parent directory svn xml parser

Download tool

[Plain]View Plaincopyprint?
    1. 1. subversion-1.6.17.tar.gz
    2. 2. subversion-deps-1.6.17.tar.gz

Two decompression of two packs:

1. Prior to this, I have created a user svnroot specifically used to install the management svn, extracted in the/home/root/directory

[Plain]View Plaincopyprint?
    1. TAR-XZVF subversion-1.6.17.tar.gz
    2. TAR-XZVF subversion-deps-1.6.17.tar.gz

2. Compiling the installation

[Plain]View Plaincopyprint?
    1. ./configure--prefix=/home/svnroot/subversion--without-berkeley-db
    2. prefix specifies the installed directory, WITHOUT-BERKELEY-DB indicates that the Berkeley database is not used
    3. In this step may not succeed, because there are some dependent software is not installed, see the following "Problems encountered"
    4. Make
    5. Make install

3. Add Environment Variables

[Plain]View Plaincopyprint?
    1. Can be added in/etc/profile
    2. Exprot path= $PATH:/home/svnroot/subversion/bin
    3. 4. See if the installation was successful
    4. /home/svnroot/subversion/bin/svnserve--version
    5. If SVN version is present, the installation is successful

Build the warehouse in three

1. Create a Directory

[Plain]View Plaincopyprint?
    1. Mkdir-p/HOME/SVNROOT/SVNDATA/REPOS1
    2. Plus the parameter p, which is created automatically if there is no parent directory
    3. Note:/home/svnroot/svndata here will be the root of all warehouses, and REPOS1 is one of the warehouses.

2. Create a warehouse

[Plain]View Plaincopyprint?
    1. Svnadmin CREATE/HOME/SVNROOT/SVNDATA/REPOS1
    2. This uses SVN to build the REPOS1 as a repository. The REPOS1 folder will generate a series of corresponding configuration files for the REPOS1 warehouse.

Four configuration warehouses

1. View the files after the warehouse is created

[Plain]View Plaincopyprint?
    1. Enter/svndata/repos1/conf, you will find a few configuration files

2. Modify Svnserve.conf

[Plain]View Plaincopyprint?
    1. VI svnserve.conf
    2. Open this configuration file, you can see a lot of configuration items have been commented out, just need to press the following several changes can be
    3. [General]
    4. Anon-access = None
    5. auth-access = Write
    6. Password-db = passwd
    7. Authz-db=authz

3. Directory control file Authz (or called permission control file)

[Plain]View Plaincopyprint?
  1. VI Authz
  2. Default is not configured, to configure the following example
  3. [Groups]
  4. admin = svnadmin
  5. [repos1:/]
  6. @admin = RW
  7. Svnadmin = RW
  8. The configuration permissions control files above are configured in the following format:
  9. [Groups]
  10. < user group name > = < user 1>,< user 2>
  11. [< Repository >:/project/catalog]
  12. @< user Group Name > = < permissions >
  13. < user name > = < permissions >
  14. Where the box number can be written in several ways:
  15. /, which indicates the root directory and the following. The root directory is specified at svnserve startup and we specify/home/svnadmin/svndata. This means that the permissions are set for all repositories.
  16. repos1:/, which indicates that permissions are set on version library 1
  17. Repos2:/occi, which indicates that permissions are set on OCCI projects in version Library 2
  18. REPOS2:/OCCI/AAA, which represents the AAA directory setting permissions on the OCCI project in version Library 2
  19. A permission principal can be a user group, user, or *, and the user group is preceded by @,* to represent all users. Permissions can be W, R, WR, and NULL, and NULL indicates no permissions.

4. Modify the user password file passwd

[Plain]View Plaincopyprint?
    1. VI passwd
    2. The default is not configured for any users, you can configure the sample configuration as follows
    3. [Users]
    4. Svnadmin = 123456
    5. Configuration format for user passwords:
    6. [Users]
    7. < user 1> = < password 1>
    8. < user 2> = < password 2>
    9. Note: Here the configuration file, in addition to comments, each line must be top line, or else will be an error.

Five Start SVN

[Plain]View Plaincopyprint?
    1. Svnserve-d-r/home/svnadmin/svndata
    2. -d means running in the background,-R means ...
    3. Note: This is/home/svnadmin/svndata, not/home/svnadmin/svndata/repos1. This is the command that SVN takes to make all the repository root directories, not a warehouse. It must be noted here.

Six basic tests

[Plain]View Plaincopyprint?
    1. SVN Co SVN://192.168.6.74/REPOS1
    2. Checkout, you will be asked to enter a user name password, only the configured user can verify the

Summary of issues:

1.configure:error:no XML Parser was found:expat or libxml 2.x required

[Plain]View Plaincopyprint?
    1. Error message requires installation of expat (download expat2.tar.gz)
    2. Cd/usr/local
    3. Tar-xvzf expat2.tar.gz
    4. CD EXPAT2
    5. ./configure
    6. Make
    7. Make install

2.configure:error:we require OpenSSL; Try--with-openssl

[Plain]View Plaincopyprint?
  1. The error message requires OpenSSL to be installed, so I installed a OpenSSL with the following installation methods:
  2. Cd/usr/local
  3. TAR-ZXVF openssl-1.0.0a.tar.gz
  4. CD openssl-1.0.0a
  5. ./config
  6. ./config-t
  7. Make depend
  8. Make
  9. Make Test
  10. Make instal
  11. After installation, an SSL directory is generated under/usr/local with the OpenSSL path configured for SVN
  12. ./configure--prefix=/home/svnadmin/subversion--without-berkeley-db--with-openssl=/usr/local/ssl
3.configure:error:subversion requires zlib [Plain]View Plaincopyprint?
    1. Error prompts to install Zlib
    2. Download zlb:http://zlib.net/
    3. Cd/usr/local
    4. Tar-xvzf zlib-1.2.5.tar.gz
    5. CD zlib-1.2.5
    6. ./configure
    7. Make
    8. Make install

4.SVN Checkout https://xxx.xxx.xxx/

[Plain]View Plaincopyprint?
      1. Svn:ssl is not supported
      2. I looked it up from the internet and said it was in execution./configure to add--with-ssl
      3. ./configure--with-openssl=/usr/local/ssl--with-zlib=/usr/local/zlib--with-ssl--with-libs=/usr/local/ssl

Build SVN server in Linux

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.