Build SVN server under Mac

Source: Internet
Author: User
Tags server port

1. Check whether the Svnserve is installed on the machine

1Zhangdeqiangdeimac:downloads hengjiang$ Svnserve--version2Svnserve, version1.9.3(r1718519)3Compiled Feb +  ., -: +: $On X86_64-apple-darwin15.3.04 5Copyright (C) -The Apache software Foundation.6 This software consists of contributions made by many people;7See the NOTICE file forMore information.8Subversion isOpen source software, see http://subversion.apache.org/9 TenThe following repository back-End (FS) modules is available: One  A* Fs_fs:module forworking with a plain file (FSFS) repository. -* Fs_x:module forworking with an experimental (FSX) repository. -  theCyrus SASL Authentication isAvailable.

2. Create an SVN repository in the current directory

1 zhangdeqiangdeimac:users hengjiang$ sudo svnadmin create SVN

3. Once created, a warehouse file is automatically generated and needs to be configured for the files in its subdirectory conf

1 zhangdeqiangdeimac:users hengjiang$ ls2 SVN Shared Hengjiang3 zhangdeqiangdeimac:users hengjiang$ CD SVN4 zhangdeqiangdeimac:svn hengjiang$ ls5 README.txt conf db format hooks Locks6 zhangdeqiangdeimac:svn hengjiang$ CD conf7 zhangdeqiangdeimac:conf hengjiang$ ls8Authz hooks-Env.tmpl passwd svnserve.conf9zhangdeqiangdeimac:conf hengjiang$ sudo nano svnserve.conf

The contents of the svnserve.conf  must note that  this file is sensitive to every character in a   place where a space is required  , where there is no space.  # notation
1 [General] 2 anon-access = Read3 auth-access = Write4 password-db = passed 5 authz-db = author6// Note The code is shelf write   no space   equal to one space   before and after Don't add any comments behind it.

passwd inside.

1 // Note This place is set password The    first user is admin   password is admin2// Second user is Nameforzhangjie   The password is Passwdforzhangjie3[users]4 # Harry = Harryssecret5 # Sally = Sallyssecret6 admin = Admin7 Nameforzhangjie = Passwdforzhangjie

The third is a file with the Authz file set permissions

1 //Permissions Settings Admin rights is called Admin User General user is called Nameforzhangjie user2 //[/] indicates the root of the meaning RW is the meaning of ReadAndWrite3 4 [Groups]5# harry_and_sally =harry,sally6# Harry_sally_and_joe = harry,sally,&Joe7 8admin =Admin9user =NameforzhangjieTen  One[/] Aadmin =RW -user =RW -  the  -[svn:/] -admin =RW -user = RW

4. Start the server

zhangdeqiangdeimac:conf hengjiang$ sudo nano authz // start the server, sudo is the current directory is not within the computer user rights, is in the root directory, so with administrator permissions to operate. -d-r is the startup parameter cannot be wrong  SVN is the server name to start. The one behind the--listen-host 192.168.1.47 is the server's network address   plus this parameter as long as the same network segment of the computer can directly access his 192.168. 1.47

The default local server port number is 3690, you can test

1zhangdeqiangdeimac:conf hengjiang$ telnet localhost36902Trying127.0.0.1...3Telnet:connect to Address127.0.0.1: Connection refused4Trying::1...5Telnet:connect to Address::1: Connection refused6 telnet:unable to connect to remote host7 zhangdeqiangdeimac:conf hengjiang$8 //that's how the normal reaction started.

5. To create a local directory on the desktop, is actually used to push to the server

1zhangdeqiangdeimac:~ hengjiang$ CD desktop/2 zhangdeqiangdeimac:desktop hengjiang$ ls3 23GamesNetwork Test43e6a2dde-1113-40b6-8127-f61d8eeebfb5.png TestDemo25 a6Zhangdeqiangdeimac:desktop hengjiang$ mkdir-P Q7 //Create a local directory Q and create a classic directory structure inside Q tags trunk branches three folders8 zhangdeqiangdeimac:desktop hengjiang$ CD Q9Zhangdeqiangdeimac:q hengjiang$ mkdir Tags trunk branches

6. Push the locally built directory structure to the server

1 // ' First init ' is a sign of this operation 2 // Q is to push up the file directory, because it is now on the desktop, so directly write this can be 3 // behind the SVN: // 192.168.1.47:3690/SVN is the SVN server address  (Local IP: port number/svn directory) 4 ' First init ' Q svn://192.168.1.47:3690/SVN

7. Then, you can checkout, then you can use it normally.

1 zhangdeqiangdeimac:desktop hengjiang$ SVN Co svn://192.168.1.47:3690/svn

A few points to note, the SVN server once opened he exists, even if you delete the server file is also present at this time with 1 zhangdeqiangdeimac:desktop hengjiang$ sudo killall Svnserve to kill all server programs and then open them. If you have a running project that cannot be killed, then you can only use a different port.

Build SVN server under Mac

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.