`
hilary3113
  • 浏览: 262842 次
  • 性别: Icon_minigender_1
  • 来自: 邯郸
社区版块
存档分类
最新评论

mac 上配置svn服务

 
阅读更多

刚接手mac,闲来没事从网上查了下资料小配一下。

1、创建svn仓库:
创建一个保存数据的目录,我用的是其它网友的目录 /opt/svn/repos

       sudo su (然后输入密码)

mkdir /opt

mkdir /opt/svn
mkdir /opt/svn/repos
即创建了目录/opt/svn/repos/

进入到仓库配置目录 cd /opt/svn/repos/conf

2、编辑配置文件 vi svnserve.conf 取消下列行的注释
anon-access = read
auth-access = read
password-db = passwd (密码配置的保存文件)
auth-db = authz (认证配置的保存文件)

### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository.  (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)

### Visit http://subversion.tigris.org/ for more information.

[general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are "write", "read",
### and "none".  The sample settings below are the defaults.
anon-access = read
auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control.  Unless you specify a path
### starting with a /, the file's location is relative to the the
### directory containing this file.  If you don't specify an
### authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa.  The default realm
### is repository's uuid.
# realm = My First Repository

[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated
### to the effective key length for encryption (e.g. 128 means 128-bit
### encryption). The values below are the defaults.
# min-encryption = 0
# max-encryption = 256

 注意删除后上面不要留空格,不然会报错:

.subversion/config:94: Option expected

3、编辑认证文件 vi authz

格式为 [groups]
用户组名 = 用户组成员
[需要授权的目录]
@组名 = 权限
用户名 = 权限

### 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

# [/foo/bar]
# harry = rw
# &joe = r
# * =

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
test=hilary
[/]
hilary=rw
4编辑密码配置文件 vi 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 = sallyssecret
#username = password
hilary=3113
5.启动svnserve
svnserve -d -r /opt/svn/repos
结束服务可以用 killall -9 svnserve

svn地址:svn://localhost

注:很可能会遇到权限问题,可使用 sudo 命令
sudo chflags -R nouchg /opt/svn/repos

sudo chown -R UserName /opt/svn/repos
sudo chmod -R 755 /opt/svn/repos

 

分享到:
评论

相关推荐

    mac下配置svn服务器.docx

    mac下配置svn服务器的参考文档,希望大家加油喔

    svn+xcode配置

    svn+xcode配置, 配置后,方便代码的提交与更新。

    mac 上的svn图形化工具

    这是mac上的svn的gui工具,很实用,用起来很方便。不需要过多的配置。很容易上手。

    SVN 服务器客户端安装包 配置及使用文档

    SVN代码管理是程序开发必须的工具,本资源包含了SVN的服务器及客户端安装包,以及源下载地址的列表内含包括 windows XP ,windows7 ,MAC OS,LINUX等多个系统的客户端及服务器安装程序。另附安装及使用配置文档,绝无...

    mac os install eclipse and setting svn

    针对mac os 缺少javah的情况,在eclipse下配置SVN。

    浅析SVN在Android Studio中的安装和配置方法

    主要介绍了SVN在Android Studio中的安装和配置方法,本文通过图文并茂给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

    mac下svn与svk整合

    苹果系统下的svk安装配置,并于svn。apahce整合发布

    SVN使用手册中文版快速入门

    在分支上工作 分支背后的关键概念 在分支间拷贝修改 拷贝特定的修改 合并背后的关键概念 合并的最佳实践 手工追踪合并 预览合并 合并冲突 关注还是忽视祖先 常见用例 合并一条分支到另一支 取消修改 找回删除的项目 ...

    SVN使用手册中文版.chm

    在分支上工作 分支背后的关键概念 在分支间拷贝修改 拷贝特定的修改 合并背后的关键概念 合并的最佳实践 手工追踪合并 预览合并 合并冲突 关注还是忽视祖先 常见用例 合并一条分支到另一支 取消修改 找回删除的项目 ...

    svn配置kdiff3的代码

    svn配置diff工具为kdiff3的代码

    Mac环境下搭建svn环境和使用方法

    本篇文章主要介绍了Mac环境下搭建svn环境的使用方法。由于Mac自带了svn的服务器端和客户端功能,所以我们可以在不装任何第三方软件的前提下使用svn功能,只需要简单配置,有兴趣的可以了解一下。

    Cornerstone_4.1破解版mac版SVN客户端

    Cornerstone是Mac上最佳的SVN管理工具 Cornerstone for Mac 是一个强大的,面向用户的版本控制实用程序,构建在开源Subversion版本控制系统之上,使复杂的版本控制项目尽可能简单。此外,Cornerstone全面支持...

    代码/文件 对比工具 mac

    mac 文件对比工具 正式版 免费。svn 对比

    Chameleon 变色龙 2.2svn-r2401 Mac

    变色龙目录一般可放在MAC OS系统分区的根目录Extra,也就是/Extra a.在Extra目录下有Extensions(/Extra/Extensions) 这个目录其实它相当于MAC OS的/System/library/Extensions 所以可以把kext直接放在这里,当...

    在Eclipse中使用SVN与CVS代码管理工具管理项目

    但是微软收购的只是source safe的Windows版本,在美国还有另外两家公司分别获得了继续开发和销售source safe的Mac版本和Unix版本的许可,在MS买进vss之后,基本上没有对vss进行任何的研发,MS内部自身也不用vss。...

    使用Subversion进行版本控制(针对 Subversion 1.4)

    6. 服务配置 概述 选择一个服务器配置 svnserve服务器 svnserve使用SSH通道 Apache 的 HTTP 服务器 推荐 svnserve,一个自定义的服务器 调用服务器 svnserve作为守护进程 使用svnserve通过inetd 通过通道使用...

    IDEA 2020 设置项目集成git 及svn和git之间的切换问题

    主要介绍了IDEA 2020 设置项目集成git 及svn和git之间的切换问题,本文通关图文并茂的形式给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

    pubsg:svn 自动发布工具

    mac: sudo npm install pubsg -g install npm install 配置 package.json "publishSet": { "builShell": "npm build", //webpack 打包命令 "svnPath": "../svn", //svn地址 "distPath": "./dist/", //打包后资源...

Global site tag (gtag.js) - Google Analytics