Build SVN server in Linux

Source: Internet
Author: User
Download tool 1subversion-1617targz2subversion-deps-1617t

1. download tool

1. subversion-1.6.17.tar.gz2. subversion-deps-1.6.17.tar.gz

2. decompress two packages:

1. Before that, I have created a user named svnroot to install and manage svn, and decompress it in the/home/root/directory.

tar -xzvf  subversion-1.6.17.tar.gztar -xzvf  subversion-deps-1.6.17.tar.gz

2. Compile and install

. /Configure -- prefix =/home/svnroot/subversion -- without-berkeley-db // prefix specifies the installation directory, without-berkeley-db indicates that the berkeley database is not used // This step may fail because some dependent software is not installed. for details, see makemake install

3. add environment variables

You can add exprot PATH = $ PATH in/etc/profile: /home/svnroot/subversion/bin4. check whether the installation is successful/home/svnroot/subversion/bin/svnserve -- version // if the SVN version is displayed, the installation is successful.

3. create a warehouse

1. create a directory

Mkdir-p/home/svnroot/svndata/repos1 with the P parameter. if there is no parent directory, it is automatically created. note:/home/svnroot/svndata will be the root directory of all warehouses, repos1 is a repository.

2. create a repository

Svnadmin create/home/svnroot/svndata/repos1 use SVN to create repos1 as a repository. A series of configuration files for the repos1 repository will be generated in the repos1 folder.

4. configure the repository

1. view the file after the repository is created

Log on to/svndata/repos1/conf and you will find several configuration files.

2. modify svnserve. conf

Vi svnserve. open the configuration file in conf and you can see that many configuration items have been commented out, you only need to modify the following parameters to [general] anon-access = noneauth-access = writepassword-db = passwdauthz-db = authz.

3. Directory control file authz (or permission control file)

Vi authz is not configured by default. refer to the following example to configure [groups] admin = svnadmin [repos1: /] @ admin = rwsvnadmin = the configuration format of the permission control file on rw is as follows: [groups]
 <用户组名>
  
=
  <用户1>
   
,
   <用户2>
    
,...... [
    <版本库>
     
:/Project/directory] @
     <用户组名>
      
=
      <权限>
       <用户名>
         =
        <权限>
          The section in 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/home/svnadmin/svndata. In this way,/sets permissions for all version libraries. Repos1:/, indicating that the repos2:/occi permission is set for version 1, indicating that the repos2:/occi/aaa permission is set for The occi project in version 2 ,, indicates that the permission subject for the aaa Directory of the occi project in version 2 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.
        
       
      
     
    
   
  
 

4. modify the user password file passwd

Vi passwd is not configured for any user by default. you can configure [users] svnadmin = 123456 user password in the following configuration example: [users]
 <用户1>
  
=
  <密码1>
   <用户2>
    
=
    <密码2>
     
Note: in the configuration file, each line except the comment must be the top line; otherwise, an error is reported.
    
   
  
 
5. start SVN
Svnserve-d-r/home/svnadmin/svndata-d indicates running in the background, and-r indicates ...... Note: Here is/home/svnadmin/svndata, not/home/svnadmin/svndata/repos1. This is the command that SVN uses to make the root directory of all repositories take effect, not a specific repository. Note.
6. basic test
Svn co svn: // 192.168.6.74/repos1checkout, the user name and password are required. only the configured user can pass the verification.

Problem summary:

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

If the error message is displayed, the supervisor installs expat(download expat2.tar.gz) cd/usr/localtar-xvzf expat2.tar.gz cd expat2./configuremakemake install

2. configure: error: We require OpenSSL; try -- with-openssl

The error message needed to install openssl, so I installed an openssl, the installation method is as follows: cd/usr/localtar-zxvf openssl-1.0.0a.tar.gzcd openssl-1.0.0a. /config. /config-tmake dependmakemake testmake instal after installation, an ssl directory is generated under/usr/local, and the openssl path is added when SVN is configured. /configure -- prefix =/home/svnadmin/subversion -- without-berkeley-db -- with-openssl =/usr/local/ssl
3. configure: error: subversion requires zlib
Error message need to install zlib download zlb: http://zlib.net/cd/usr/localtar-xvzf zlib-1.2.5.tar.gzcd zlib-1.2.5./configuremakemake install

4. svn checkout https://xxx.xxx.xxx/

Svn: SSL is not supported checked from the Internet and said it is being executed. /add -- with-ssl to configure. /configure -- with-openssl =/usr/local/ssl -- with-zlib =/usr/local/zlib -- with-ssl -- with-libs =/usr/local/ssl
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.