Install and configure subversion in linux

Source: Internet
Author: User
Preface:

Svn (subversion) is a version management tool that has emerged in recent years and is the successor of cvs. Currently, most open-source software uses svn as the code version management software.

Test environment:

Centos 6.3 + subversion 1.6.11

SVN installation and configuration:

Directly use yum to install subversion

yum install subversion

Run the svnadmin command to create the project directory.

svnadmin create /var/www/project

After executing the Create Project command, the following file directories are automatically generated:

* Dav Directory: Provides the directories used by apache and mod_dav_svn to store internal data.
* Db Directory: stores all version-controlled data files.
* Hooks Directory: directory for storing hook script files
* Locks Directory: used to place the subversion. See the directory for hard-locking data. It is used to track the client that accesses the file library.
* Format File: a text file with only one integer. Indicates the version number of the current file library configuration.
* Conf directory: it is the configuration file of this warehouse (the Warehouse's user access account, permissions, etc)

Go to the conf directory.

# Vim svnserve. conf [general] anon-access = noneauth-access = writepassword-db =/var/www/project/conf/passwdauthz-db =/vsr/www/project/conf/authzrealm = project ####################################### ############## vim passwd [users] dick = dicklaobi = laobi # username and password ############ ######################################## ### vim authz [groups] group1 = dickgroup2 = laobi [project: /] dick = rw # Grant dick read and write permissions @ group1 = rw # Grant group1 read and write permissions to the group [project: /laobi] # Set the permission limit for the laobi folder in the root directory. laobi = rw @ group2 = rw * = # Do not allow operations by other users without permission. This parameter must be added. Otherwise, operations by other users cannot be restricted.

Group1 and group2 are groups

[Project:/] is the project root directory

Enable and disable the SVN Server

Svnserve-d-r/var/www # ps Query Process [root @ localhost conf] # ps-ef | grep svnroot 2146 1 0? 00:00:00 svnserve-d-r/var/wwwroot 2210 1910 0 00:00:00 pts/0 grep svn

Several Basic SVN operations on the server

Pull files from Warehouse

svn co svn://192.168.2.136/project

Add File

svn add test.txt

Upload files

svn commit test.txt


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.