Linux Installation svn

Source: Internet
Author: User
Tags svn update

Yum-y Install Subversion MOD_DAV_SVN


Mkdir/data/svn

Svnadmin create/data/svn/test \ \ New Test Warehouse

SVN import/data/svn/test/file:///data/svn/test-message \ \ Initialize Test directory


Vim/data/svn/test/conf/svnserve.conf

Anon-access = None

auth-access = Write

Password-db = passwd

Authz-db = Authz


vim/data/svn/test/conf/passwd

Add SVN users, such as:

Test = [email protected]

test1 = 123qwe \username = password


Vim/data/svn/test/conf/authz

[Groups]

admin = Test \\groupname = Test,test1 Multiple users separated by commas


[test:/] \\test is the name of the SVN after the colon/represents the root directory for all

@admin = rw \ \ references the group defined above and needs to be preceded by @, followed by permissions

test1 = rw \ As user input directly, followed by permissions



svnserve-d-r/data/svn/\ \ start svn



Vim/etc/httpd/httpd.conf

Add to:

LoadModule Dav_svn_module modules/mod_dav_svn.so

LoadModule Authz_svn_module modules/mod_authz_svn.so


\ \ Bottom Join

<virtualhost *:80>

Documentroot/data/svn

Errorlog Logs/svn_error.log

Customlog Logs/svn_access.log Common

<directory "/data/svn/" >

Options FollowSymLinks

AllowOverride All

Order Allow,deny

Allow from all

</Directory>

<Location/svn>

DAV SVN

Svnparentpath/data/svn

AuthType Basic

AuthName "TEST_SVN"

authuserfile/data/svn/test/conf/apache_passwd

Authzsvnaccessfile/data/svn/test/conf/authz

Require Valid-user

</Location>

</VirtualHost>


cd/usr/lib64/httpd/modules/

CP mod_dav_svn.so mod_authz_svn.so/usr/local/apache2/modules/


/USR/LOCAL/APACHE2/BIN/HTPASSWD-DC/DATA/SVN/TEST/CONF/APACHE_PASSWD Test


Chown-r daemon.daemon/data/svn \daemon for Apache users

chmod 755/data/svn/test/conf/*

/usr/local/apache2/bin/apachectl restart

visit:http://IP/svn/test


Follow the steps if you need to create a new directory under the test root directory:

Mkdir/data/svn/test/dirname

SVN import/data/svn/test/dirname/file:///data/svn/test/dirname-message

Vim/data/svn/test/conf/authz \ \ Add test1 Read and write access to the directory

[Test:/dirname]

Test1 = RW

: wq!

Immediate effect

Visit: Http://IP/svn/test/dirname


SVN common operations

SVN co svn://10.0.0.75/test \\checkout test directory to local

SVN up \ \ Update SVN data

SVN update-r 5 file or directory name \ \ Restore files or directories to version 5th

CP ~/test./&& svn add test/&& svn commit-m "remarks" \ \ Add Test directory

SVN mkdir test && svn commit-m "remarks" \ \ Add Test directory

SVN status \ \ To view the status of all files or directories under the current directory, or to follow a file or directory name, normally not displayed

[?: not in SVN control; M: Content modified; C: conflict; A: Scheduled to be added to the repository; K: Locked]

SVN status-v \ \ The first column remains the same, the second column shows the work version number, the third and fourth columns show the last modified version number and the modified person

SVN log \ \ To view all files or directory logs under the current directory, or specify a specific file or directory name later

SVN info \ \ View the directory details, or you can specify a specific directory name later

SVN diff-r 5:10 \ \ Compare the differences between the 5th and 10th versions of a file or directory, or you can specify a specific file or directory name later

SVN merge-r 5:10 filename \ \ Merge the differences between version 5 and version 10 to the current file

SVN list \ \ View files and directories under test repository

SVN lock-m "remarks" filename && svn unlock filename \ locking/unlock (for files)

SVN delete test && svn ci-m "remarks" \ \ Delete Test directory

This article is from the ", Mineral water" blog, please be sure to keep this source http://guwenqiang.blog.51cto.com/5462040/1568963

Linux Installation svn

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.