Installation of SVN under Linux

Source: Internet
Author: User
Tags svn client

1. SVN introduction

2. Install SVN service

3. Configure SVN Service


1. SVN introduction

SVN, full name subversion, is a cross-platform, open source version Management control tool. Manages various data changes over time, stored in a central data archive (repository), and backs up and records changes and updates for each file. It is possible to restore a file of any point in time to an older version of the desired one, or to browse the updated history of the specified files directly.

SVN-related sites:

Subversion website: http://subversion.tigris.org/http://subversion.apache.org/

SVN client: http://tortoisesvn.net/

SVN Chinese site: http://www.iusesvn.com/

English FAQ faq:http://subversion.apache.org/faq.zh.html

Official Handbook: http://svnbook.red-bean.com/in both English and Chinese



SVN server run mode (3 types):

1) Standalone server access

Access Address: Svn://192.168.1.123/bindoc

2) with HTTP services such as Apache

Access address: Http://192.168.1.123/binDoc or Https://192.168.1.123/binDoc

Note: This also has two ways: Install Apache and SVN separately, install VISUALSVN software or CSVN software

3) Local access

Access Address: File://192.168.1.123/binDoc

SVN Archive data format

SVN stores version data in 2 ways: BDB (a Transaction-safe table type) and FSFS (a storage system that does not require a database). Because the BDB mode is likely to lock the data when the server is interrupted, it is safer to fsfs the way.

BDB:

Berkeley DB (Berkeley DB), a fully tested background database implementation that can be used by the repository, cannot be used on a file system shared over a network, Berkeley DB is the default version library format prior to Subversion version 1.2.

FSFS:

A file system backend dedicated to the Subversion repository, which can be used with a network file system (for example, NFS or SMBFS) and is the default repository format for version 1.2 and later.


2. Install SVN service

1) Check to see if the SVN software program is installed:

[[email protected] ~]# Rpm-qa subversionsubversion-1.6.11-10.el6_5.x86_64 # # #若无这提示信息, it is not installed

2) If not installed, perform the following command to install

[[email protected] ~]# yum-y Install Subversion

Note: You can install the generic version with the above command without special feature requirements


3. Configure SVN Service

Set up SVN repository data store root (svndata) and user, password, and permissions directory (SVNPASSWD)

[[email protected] ~]mkdir-p/APPLICATION/{SVNDATA,SVNPASSWD}

SVN root to start the SVN service specified service

[[email protected] ~]svnserve-d-r/application/svndata/###-d run in daemon mode,-r specifies the root directory of SVN

View SVN process

[[email protected] ~]ps-ef|grep 3690

Detecting SVN ports

[[email protected] ~]netstat-lnt|grep 3690 or lsof-i: 3690

Create a project repository ( do not create the repository directory Bindoc)

[Email protected] ~]svnadmin Create/application/svndata/bindoc


Adjust SVN configuration files and permissions files

Example: Configuration allows users to Binbin read and write access

[Email protected] ~]cd/application/svndata/bindoc/conf
[Email protected] ~]CP svnserve.conf Svnserve.conf.ori
[Email protected] ~]CP PASSWD/APPLICATION/SVNPASSWD/PASSWD
[Email protected] ~]CP Authz/application/svnpasswd/authz

Modifying a configuration file svnserve.conf

# anon-access = Read

# auth-access = Write

# password-db = passwd

# authz-db = Authz

Modified to:

Anon-access = none # # #是否允许匿名访问, none is forbidden

auth-access = Write # # #访问权限

Password-db =/application/svnpasswd/passwd # # #统一设置管理svn用户和密码

Authz-db =/application/svnpasswd/authz # # #统一设置管理svn权限


Modifying a configuration file/application/svnpasswd/passwd

Add a new line under [users]

Binbin = binbin123 # # #等号左边为用户名, password on the right


Modifying a configuration file/application/svnpasswd/authz

At the bottom of the new

[bindoc:/]

Binbin = rw # # #等号左边为用户名, right for permissions

Note: The Repository directory user Rights format:

[< version Library name >:/project/directory]

@< user Group Name > = < permissions >

< user name > = < permissions >


Attention:

The user name that appears in the X permission profile must already be defined in the user profile

X changes to the permissions profile take effect immediately without restarting SVN, but the Master Profile svnserve.conf modification requires a service restart to take effect



Description: Restarting SVN can use the command Pkill svnserve to kill the SVN process using svnserve-d-r/application/svndata/to restart the SVN service


Appendix:

Use parameters for the Svnserve command

[Email protected] ~]# Svnserve--help
Usage:svnserve [-D |-i |-T |-x] [options]

Valid options:
-D [--daemon]: Daemon mode
-I [--inetd]: inetd mode
-T [--tunnel]: Tunnel mode
-X [--listen-once]: listen-once mode (useful for debugging)
-R [--root] arg:root of directory to serve
-R [--read-only]: Force read only, overriding repository config file
--config-file arg:read configuration from File ARG
--listen-port Arg:listen Port
[Mode:daemon, Listen-once]
--listen-host arg:listen hostname or IP address
[Mode:daemon, Listen-once]
-T [--threads]: Use threads instead of fork [Mode:daemon]
--foreground:run in foreground (useful for debugging)
[Mode:daemon]
--log-file arg:svnserve log file
--pid-file arg:write Server process ID to file ARG
[Mode:daemon, Listen-once]
--tunnel-user Arg:tunnel username (default is current UID ' s name)
[Mode:tunnel]
-H [--help]: Display this help
--version:show Program Version Information


Parameters of the Svnadmin command


[Email protected] ~]# svnadmin--help
General usage:svnadmin subcommand Repos_path [ARGS & OPTIONS ...]
Type ' Svnadmin help <subcommand> ' for help on a specific subcommand.
Type ' Svnadmin--version ' to see the program version and FS modules.

Available subcommands:
Crashtest
Create
Deltify
Dump
Help (?, h)
Hotcopy
List-dblogs
List-unused-dblogs
Load
Lslocks
Lstxns
Pack
Recover
Rmlocks
Rmtxns
Setlog
Setrevprop
Setuuid
Upgrade
Verify





This article is from "Little bin 30" blog, please be sure to keep this source http://xiaobin30.blog.51cto.com/9438146/1791961

Installation of SVN under 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.