mac自带了svn客户端和服务端功能。

1.查看svn版本

svnserve --version
yintingtingdeMacBook-Pro:~ yintingting$ svnserve --version
svnserve, version 1.9.4 (r1740329)
compiled Nov 15 2016, 20:35:27 on x86_64-apple-darwin15.0.0 Copyright (C) 2016 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/ The following repository back-end (FS) modules are available: * fs_fs : Module for working with a plain file (FSFS) repository.
* fs_x : Module for working with an experimental (FSX) repository.

2.创建svn目录

sudo mkdir -p /Users/yintingting(根据自己的用户名修改)/svn/mycode    //创建了一个文件夹,这个文件夹路径可以自己随意设定

sudo svnadmin create /Users/yintingting(根据自己的用户名修改)/svn/mycode   //将之前创建的文件夹设置为svn的代码库

(下图svn_dir相当于mycode文件夹的样子)

3.

conf文件夹是配置文件夹,里面有相关配置,先选择svnserve.conf配置,如下图:

# anon-access = read

# auth-access = write

# password-db = passwd

# authz-db = authz

去掉这几个前面的#和空格,

anon-access 表示匿名访问权限(如果把anon-access=read修改为anon-access=none,这样就禁止了匿名访问,只有输入账号密码才可以访问)

4.

我们创建个帐户,要进passwd文件配置,在[users]后面加ytt=123,表示创建了ytt帐户,密码是123.

### 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 = sallyssecret
ytt = 123
xsd = 123

5.文件authz可以配置用户组及权限,可以把passwd里添加的用户加到一个用户组里或创建一个用户组,这样就可以对整个组设置权限了,还不用对每个用户进行单独权限设置。我们这里加了个zyxgroup组,包括用户zyx,权限是对根目录有读写权限,[/]表示根目录。

修改文件时写入不了就用vi编辑器,如果vi编辑器加了!还改不了,那就修改文件权限。

比如:切换到root用户:sudo -i
         读写权限:chmod 666 你的文件(777也行,随便你,关键有w权限)

### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to:
### - a single user,
### - a group of users defined in a special [groups] section,
### - an alias defined in a special [aliases] section,
### - all authenticated users, using the '$authenticated' token,
### - only anonymous users, using the '$anonymous' token,
### - anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### (''). [aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average [groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
yttgroup = xsd,ytt
# [/foo/bar]
# harry = rw
# &joe = r
# * = # [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[/]
@yttgroup=rw

6.启动svn服务器

svnserve -d -r /Users/yintingting/svn

注意不要输入svnserve -d -r /Users/yintingting/svn/mycode

7.关闭svn服务器的话,可以用ps找到它的pid,然后kill它就可以了。或者用活动监视器

ps -e | grep svnserve
5137 ??         0:00.00 /Library/Developer/CommandLineTools/usr/bin/svnserve -d -r svn_dir
5142 ttys000 0:00.00 grep svnserve

kill 5137进程即可。

下面就是怎样在eclipse中使用了。。。。。。。

1.eclipse装上subclipse插件,help ->eclipse marketplace,搜索subclipse,安装,注意下面勾选内容(最好subclipse和svnkit都选)

安装成功,window->show view->other,会出现如下图窗口

选择SVN资源库,点击OK,下方出现svn资源库

打开eclipse偏好设置,svn接口选一个(我这里选的是SVNKit,因为JavaHL(JNI) not available,而mac电脑用这个太麻烦),如果JavaHL可用那就用JavaHL好了。

切换到“SVN资源库”,新建-》资源库位置,

URL填写svn://ytt@localhost/mycode (ytt是用户名,之前创建的),在出来界面中输入用户名和密码,OK.

mac中svn服务器的搭建以及如何在eclipse中使用的更多相关文章

  1. 基于Cent os 云服务器中SVN 服务器的搭建---具体实践是可行的 一次备注便于后续查找

    https://blog.csdn.net/shadowyingjian/article/details/80588544http://www.hongyanliren.com/2015m04/329 ...

  2. Mac下SVN服务器环境的搭建和配置(除展示图片外,所有命令在Linux/Unix下适用)

    这几天领导没有安排工作,闲着没事就想把自己这两年做iOS开发时感觉知识有欠缺的地方想好好深入地补习一下,昨天和今天就计划好好学习下SVN和git的从创建和到原理,到命令,到界面的使用.一不小心被另一领 ...

  3. linux(centos7)下SVN服务器如何搭建

    linux(centos)下SVN服务器如何搭建?说到SVN服务器,想必大家都知道,可以是在LINUX下如何搭建SVN服务器呢?那么今天给大家分享一下linux(centos)搭建SVN服务器的思路! ...

  4. svn服务器的搭建备份和还原和svnmanager的使用

    svn服务器的搭建备份和还原和svnmanager的使用 一.svn服务端软件的安装和配置 1.安装svn版本库软件 # yum install -y subversion 2.建立svn版本库数据存 ...

  5. centos7下SVN服务器如何搭建

    Centos7 搭建svn服务器 linux(centos)下SVN服务器如何搭建?说到SVN服务器,想必大家都知道,可以是在LINUX下如何搭建SVN服务器呢?那么今天给大家分享一下linux(ce ...

  6. Ubuntu SVN服务器的搭建与配置(转)

    Ubuntu SVN服务器的搭建与配置 一.         安装 sudo apt-get install subversion sudo apt-get install libapache2-sv ...

  7. 配置mac机svn服务器

    这几天一直纠结如何配置mac机svn服务器,在网上查了很多资料,无奈本人底子太差,菜鸟级别,理解能力有限,照网上的总是配置不好,最后无奈问了刘超老师,终于配置成功.现在写一下具体配置过程,菜鸟级别可以 ...

  8. svn 服务器的搭建以及客户端的使用

    1.svn 服务器的搭建以及客户端的使用,安装见下面的博客 https://blog.csdn.net/zh123456zh789/article/details/80921179 说明:服务器只是用 ...

  9. SVN服务器本地搭建与使用

    转载请注明原文地址:http://www.cnblogs.com/ygj0930/p/6623026.html  使用SVN进行代码管理,需要搭建服务端资源库,然后在使用SVN的电脑安装SVN客户端或 ...

随机推荐

  1. 【java】浅谈for循环

    for语法: for(初始化条件; 判断条件(bool型,不可缺省); 条件改变)// 初始化条件,条件改变可以是多条,eg for(x=1,y=1;x<4;x++,y++) { 执行的操作 } ...

  2. 【python】序列化和反序列化

    序列化可以理解为:把python的对象编码转换为json格式的字符串,反序列化可以理解为:把json格式字符串解码为python数据对象.在python的标准库中,专门提供了json库与pickle库 ...

  3. 阅读OReilly.Web.Scraping.with.Python.2015.6笔记---找出网页中所有的href

    阅读OReilly.Web.Scraping.with.Python.2015.6笔记---找出网页中所有的href 1.查找以<a>开头的所有文本,然后判断href是否在<a> ...

  4. JavaWeb工程 目录结构***

    以下是mavaen推荐的项目目录. ├── pom.xml └── src     ├── main     │   ├── java     │   │   └── group     │   │  ...

  5. PREV-4_蓝桥杯_剪格子

    问题描述 如下图所示,3 x 3 的格子中填写了一些整数. +--*--+--+|10* 1|52|+--****--+|20|30* 1|*******--+| 1| 2| 3|+--+--+--+ ...

  6. 【Properties】在Properties中配置List

    my.properties master.pool[0].id=poolId001 master.pool[0].endpoint=http://192.168.1.101:8080/v1 maste ...

  7. spring4.0之六:Generic Qualifier(泛型限定)

    Spring 4.0已经发布RELEASE版本,不仅支持Java8,而且向下兼容到JavaSE6/JavaEE6,并移出了相关废弃类,新添加如Java8的支持.Groovy式Bean定义DSL.对核心 ...

  8. 服务注册发现consul之三:服务发现比较:Consul vs Zookeeper vs Etcd vs Eureka

    这里就平时经常用到的服务发现的产品进行下特性的对比,首先看下结论: Feature Consul zookeeper etcd euerka 服务健康检查 服务状态,内存,硬盘等 (弱)长连接,kee ...

  9. document.write的用处!

    document.write是JavaScript中对document.open所开启的文档流(document stream操作的API方法,它能够直接在文档流中写入字符串,一旦文档流已经关闭,那d ...

  10. 面试总结之Google

    准备Google面试的总结 - 知乎 https://zhuanlan.zhihu.com/p/40866467 [不周山之算法与数据结构]壹 总览 | 小土刀 https://wdxtub.com/ ...