Linux installation and configuration SVN standalone server svnserve

  

svn server has two modes of operation: independent server svnserve and apache as a module of apache, communicated by webdav/deltav protocol.

Svn stores version data in two ways: BDB and FSFS. The BDB method may lock data when the server is interrupted. The FSFS method is more secure and has good compatibility.


1. Install subversion

# wget http://subversion.tigris.org/downloads/subversion-1.6.13.tar.gz

# wget http://subversion.tigris.org/downloads /subversion-deps-1.6.13.tar.gz

# tar -xzvf subversion-1.6.13.tar.gz -C ../software/

# tar -xzvf subversion- Deps-1.6.13.tar.gz -C ../software/

# cd ../software/subversion-1.6.13/

# ./configure --prefix=/Usr/local/subversion-1.6.13

# make clean

# make

# make install

# ./svnserve --version

svnserve, version 1.6.13 (r1002816)

compiled Jun 1 2011, 10:19:12


Copyright (C) 2000-2009 CollabNet.

Subversion is open source software, see http://subversion.tigris.org/

This product includes software developed by CollabNet (http://www.Collab.Net/).< Br>


The following repository back-end (FS) modules are available:


* fs_fs : Module for working with a plain file (FSFS) repository .


Cyrus SASL authentication is available.

Output Interest the installation was successful.


Two. Create a library file

1.Create a folder

# mkdir -p /www/svn/repository

2. Create a repository and specify the data storage mode as FSFS

# ./svnadmin create --fs-type fsfs /www/svn/repository/

# ls /www/svn/repository/

conf db format hooks locks README. Txt

3.Create project temporary directory

# mkdir -p /www/svn/tmp/{trunk,tags,branches}

4. Copy project files to trunk

# cp -r nginx /www/svn/tmp/trunk/

5. Import the required managed items into the repository repository

# ./Svn import /www/svn/tmp/file:///www/svn/repository/-m "first import"

-m Annotation for identifying operations

/ww/svn/Tmp/trunk/nginx project file location

file:///www/svn/repository created depot

Adding /www/svn/tmp/trunk/nginx/client_body_temp

Adding /www/svn/tmp/trunk/nginx/uwsgi_temp

Adding /www/svn/tmp/trunk/nginx/logs

Adding /www/svn/tmp/Trunk/nginx/logs/access.log

Adding /www/svn/tmp/trunk/nginx/logs/error.log

Adding /Www/svn/tmp/trunk/nginx/html

Adding /www/svn/tmp/trunk/nginx/html/50x.html

Adding /www/svn/tmp/trunk/Nginx/html/index.html

Adding /www/svn/tmp/trunk/nginx/fastcgi_temp

Adding /www/svn/tmp/trunk/nginx/conf

Adding /www/svn/tmp/trunk/nginx/conf/uwsgi_params

Adding /www/svn/tmp/trunk/nginx/conf/fastcgi_params

Adding /www/svn/tmp /trunk/nginx/conf/uwsgi_params.default

Adding /www/svn/tmp/trunk/nginx/conf/fastcgi.conf

Adding /www/svn/tmp/trunk/nginx /conf/fastcgi_params.default

Adding /www/svn/tmp/trunk/nginx/conf/fastcgi.conf.default

Adding /www/svn/tmp/trunk/nginx/conf /nginx.conf

Adding /www/svn/tmp/trunk/nginx/conf/scgi_params

Adding /www/svn/tmp/trunk/nginx/conf/win-utf

Adding /www/svn/tmp/trunk/nginx/conf/nginx.conf.default

Adding /www/svn/tmp/trunk/nginx/conf/mime.types

Adding /www/svn/tmp/trunk/nginx/conf/scgi_params.default

Adding /www/svn/tmp/trunk/nginx/conf/mime.types.default

Adding /www/svn/tmp/trunk/nginx/conf/koi-win

Adding /www/svn/tmp/trunk/nginx/conf/koi-utf

Adding /www/Svn/tmp/trunk/nginx/proxy_temp

Adding /www/svn/tmp/trunk/nginx/scgi_temp

Adding /www/svn/tmp/trunk/nginx/sbin

Adding (bin) /www/svn/tmp/trunk/nginx/sbin/nginx


Committed revision 1.


6 Check if the import is successful

# ./svn list --verbose file:///www/svn/repository/

1 root Jun 01 10:48 ./

1 root Jun 01 10:48 client_body_temp/

1 root Jun 01 10:48 conf/

1 root Jun 01 10:48 fastcgi_temp/

1 root Jun 01 10:48 html/

1 root Jun 01 10:48 logs/

1 root Jun 01 10:48 proxy_temp/

1 root Jun 01 10:48 sbin/

1 root Jun 01 10:48 scgi_temp/

1 root Jun 01 10:48 uwsgi_temp/


7.Permission to modify repository files

# chmod 770 repository

# chmod -R g+w repository


3. User Management

1. Modify the configuration file of the repository

# vim /www/svn/repository/conf/svnserve.conf

[general]

anon-access = read

auth-access = write

password-db = passwd

authz-db = authz

realm = repository

[sasl]


2. Modify the user files that allow access to the repository

# vim /www/svn/repository/conf/passwd

The file format is as follows:

[users] //Cannot be omitted

username1=password1

username2=password2 //one line per user

New User List

xuhh = xuhh@766


3. Modify User Permission to Access Repository

# vim /www/svn/Repository/conf/authz

Note: The username that appears in the permissions configuration file must be defined in the passwd file. Changes to the permissions configuration file authz will take effect immediately.

The file format is as follows:

User Group Format:

[groups]

user_group_name=username1,username2 //Comma separated by user

Copyright © Windows knowledge All Rights Reserved