Linux install SVN (centos_6.6)

Source: Internet
Author: User
Tags gpg svn uuid

First, the Environment preparation

system:centos_6.6

ip:192.168.30.129

Install Yum:

rpm -Uhv http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Second, install SVN
[Email protected]/0 # yum-y Install subversionloaded plugins:fastestmirror, securitysetting up install ProcessDete                                                                                                     Rmining fastest Mirrorsepel/metalink | 5.0 KB 00:00 * base:mirrors.btte.net * epel:mirrors.opencas.cn * extras:mirrors.btte.net * updates:mirrors.bt Te.netbase |                                                                                                   3.7 KB 00:00 base/primary_db |                                                                                                              4.6 MB 00:06 Epel |                                                                                                   4.3 KB 00:00 epel/primary_db |                                                          5.7 MB 00:44 Extras                                                  |                                                                                                 2.9 KB 00:00 extras/primary_db  |                                                                                                           KB 00:00 Updates |                                                                                                3.4 KB 00:00 updates/primary_db | 3.3 MB 00:04 resolving dependencies--> Running Transaction Check---> Package subversion.x86_64 0:1.6.11-15.e L6_7 'll be installed--> finished Dependency resolutiondependencies resolved=====================================                          ==================================================================================================== Package Arch Version Repository size======== =================================================================================================================================installing:subversion x8 6_64 1.6.11-15.el6_7 Updates 2.3 mtransaction summary=== =============================================================================================================== =======================install 1 package (s) total download size:2.3 minstalled size:12 mdownloading packages:subver sion-1.6.11-15.el6_7.x86_64.rpm | 2.3 MB 00:02 warning:rpmts_HdrFromFdno:Header V3 rsa/sha1 Signature, key ID c105b9de:nokeyretrieving key from F  Ile:///etc/pki/rpm-gpg/rpm-gpg-key-centos-6importing gpg key 0xc105b9de:userid:centos-6 key (CentOS 6 Official Signing Key) <[email protected]> package:centos-release-6-6.el6.centos.12.2.x86_64 (@ anaconda-centos-201410241409.x86_64/6.6) From:/etc/pki/rpm-gpg/rpm-gpg-key-cEntos-6running rpm_check_debugrunning Transaction testtransaction Test succeededrunning Transactionwarning:rpmdb  Altered outside of Yum.                                                                                     Installing:subversion-1.6.11-15.el6_7.x86_64                                                                                     1/1 verifying:subversion-1.6.11-15.el6_7.x86_64                                                                                                    1/1 Installed:subversion.x86_64 0:1.6.11-15.el6_7 complete!

Enter RPM-QL subversion to view the installation location

[email protected]/0 # rpm -ql subversion/etc/bash_completion.d/etc/bash_completion.d/subversion/etc/rc.d/init.d/svnserve/etc/subversion/usr/bin/svn/usr/bin/svnadmin/usr/bin/svndumpfilter/usr/bin/svnlook/usr/bin/svnserve/usr/bin/svnsync/usr/bin/svnversion....

View SVN Help

[Email protected]/0 # SVN--HELPUSAGE:SVN <subcommand> [options] [args]subversion command-line client, Version 1.6.11.Type ' svn help <subcommand> ' for specific subcommand. Type ' svn--version ' to see the program version and RA modules or ' svn--version--quiet ' to see just the version number.  Most subcommands take file and/or directory arguments, recursingon the directories. If no arguments is supplied to such acommand, it recurses on the current directory (inclusive) by default. Available Subcommands:add Blame (praise, annotate, Ann) Cat Changelist (CL) Checkout (CO) cleanup commit (c i) copy (CP) Delete (Del, remove, RM) diff (di) export Help (?, h) Import info list (ls) lock log Me Rge mergeinfo mkdir Move (MV, rename, ren) propdel (Pdel, PD) Propedit (Pedit, PE) propget (Pget, PG) PROPLI St (plist, PL) propset (PSet, PS) Resolve resolved revert status (Stat, ST) switch (SW) unlock update (UPSubversion is a tool for version control. For additional information, see http://subversion.tigris.org/[email protected]/0 # svnadmin--helpgeneral 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
Third, create the SVN repository directory
[email protected]/0 # mkdir -p /usr/local/svn/test
Iv. Creating a version Library
[email protected]/0 # svnadmin create /usr/local/svn/testTest_1 [~] 2016-01-10 15:03:28[email protected]/0 # ll /usr/local/svn/testtotal 24drwxr-xr-x. 2 root root 4096 Jan 10 15:03 confdrwxr-sr-x. 6 root root 4096 Jan 10 15:03 db-r--r--r--. 1 root root    2 Jan 10 15:03 formatdrwxr-xr-x. 2 root root 4096 Jan 10 15:03 hooksdrwxr-xr-x. 2 root root 4096 Jan 10 15:03 locks-rw-r--r--. 1 root root  229 Jan 10 15:03 README.txt
V. Enter the Conf directory (the SVN repository configuration file)
[email protected]/0 # cd conf/Test_1 [/usr/local/svn/test/conf] 2016-01-10 15:12:38[email protected]/0 # lltotal 12-rw-r--r--. 1 root root 1080 Jan 10 15:03 authz-rw-r--r--. 1 root root  309 Jan 10 15:03 passwd-rw-r--r--. 1 root root 2279 Jan 10 15:03 svnserve.conf

Authz file is a permission control file

passwd is the account password file

Svnserve.conf SVN service configuration file

Six, set the account password
[email protected]/0 # vim passwd ### This file is an example password file for svnserve.### Its format is similar to that of svnserve.conf. As shown in the### example below it contains one section labelled [users].### The name and password for each user follow, one account per line.[users]# harry = harryssecret# sally = sallyssecrettest = test123other = test123

Add users and passwords to the [users] block in the format: account = password, such as Test = test123

Seven, set permissions
[email protected]/0 # vim authz....[/]test = rwother = r

This means that the repository's root test has read and write permissions, and other only read permissions.

Viii. Modification of svnserve.conf files
[email protected]/0 # vim svnserve.conf....anon-access = noneauth-access = writepassword-db = passwdauthz-db = authzrealm = /usr/local/svn/test

Open a few notes below:

Anon-access = None #匿名用户不可访问

auth-access = Write #授权用户可写

Password-db = passwd #使用哪个文件作为账号文件

Authz-db = Authz #使用哪个文件作为权限文件

Realm =/var/svn/svnrepos # certified space name, repository directory

Nine, start the SVN repository
[email protected]/0 # svnserve -d -r /usr/local/svn[email protected]/0 # ps -ef |grep svnroot      3082     1  0 15:31 ?        00:00:00 svnserve -d -r /usr/local/svn
X. Test Connection
[Email protected]/0 # Mkdir-p/opt/testtest_1 [/opt] 2016-01-10 15:37:01[email protected]/0 # cd/opt/test/ test_1 [/opt/test] 2016-01-10 15:37:08[email protected]/0 # SVN Co svn://127.0.0.1/test/opt/test/authentication Realm: <svn://127.0.0.1:3690>/usr/local/svn/testpassword for ' root ': Authentication realm: <svn:// 127.0.0.1:3690>/usr/local/svn/testusername:testpassword for ' test ':------------------------------------------  -----------------------------attention! Your Password for authentication realms: <svn://127.0.0.1:3690>/usr/local/svn/testcan Only is stored to disk Unenc  rypted!  You is advised to Configureyour system so that Subversion can store passwords encrypted, ifpossible. See the documentation for details. You can avoid future appearances of this warning by setting the valueof ' option to Store-plaintext-passwords ' Yes ' or ' no ' in '/root/.subversion/servers '.-----------------------------------------------------------------------Store Password unencrypted (yes/no)? Yeschecked out revision 0. [Email protected]/0 # SVN InfoPath:. Url:svn://127.0.0.1/testrepository root:svn://127.0.0.1/testrepository UUID: Ec5619f6-c7b2-4018-a560-616f7d6462ccrevision:0node Kind:directorySchedule:normalLast Changed rev:0last Changed Date : 2016-01-10 15:45:56 +0000 (Sun, Jan 2016)

Linux SVN more commands can query Help information!

Xi. Test upload file, view version
  [email protected]/0 # Touch filetest_1 [/opt/test] 2016-01-10 16:15:57[email protected]/0 # echo " SVN is Test "> File test_1 [/opt/test] 2016-01-10 16:16:14[email protected]/0 # svn add File A filetest_1 [/opt/test] 2016-01-10 16:16:21[email protected]/0 # SVN commit file-m ' test ' Adding filetransmitting file da Ta. Committed revision 1.test_1 [/opt/test] 2016-01-10 16:16:56[email protected]/0 # lltotal 4-rw-r--r--. 1 root root 16:16 filetest_1 [/opt/test] 2016-01-10 16:17:08[email protected]/0 # SVN info file Path:filen Ame:fileurl:svn://127.0.0.1/test/filerepository root:svn://127.0.0.1/testrepository UUID: Ec5619f6-c7b2-4018-a560-616f7d6462ccrevision:1node Kind:fileSchedule:normalLast Changed author:testlast Changed Rev : 1Last Changed date:2016-01-10 16:16:42 +0000 (Sun, Jan) Text last updated:2016-01-10 16:16:14 +0000 (Sun, ten Ja N) checksum:304b5e95556c9066f5aa1268ede6df6a  

The display version has been updated to 1

12. Testing on Windows

Install TORTOISESVN First

Find a place to create a new SVN directory, right-click-Check out

Add SVN repository URL and checkout directory

Enter your account password User:test passwd:test123

You can see that the file files submitted by the server have been updated

More operations on Windows don't say much here, see Help!

Linux install SVN (centos_6.6)

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.