【SVN】Linux搭建SVN服务
1.yum安装svn
yum install -y subversion
日志打印
Loaded plugins: fastestmirror Determining fastest mirrors Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was 12: Timeout on http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds') * base: centos.ustc.edu.cn * extras: centos.ustc.edu.cn * updates: centos.ustc.edu.cn base | 3.7 kB 00:00 extras | 3.4 kB 00:00 extras/primary_db | 29 kB 00:00 updates | 3.4 kB 00:00 updates/primary_db | 4.7 MB 00:01 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package subversion.x86_64 0:1.6.11-15.el6_7 will be installed --> Processing Dependency: perl(URI) >= 1.17 for package: subversion-1.6.11-15.el6_7.x86_64 --> Processing Dependency: apr >= 1.3.0 for package: subversion-1.6.11-15.el6_7.x86_64 --> Processing Dependency: libneon.so.27()(64bit) for package: subversion-1.6.11-15.el6_7.x86_64 --> Processing Dependency: libaprutil-1.so.0()(64bit) for package: subversion-1.6.11-15.el6_7.x86_64 --> Processing Dependency: libapr-1.so.0()(64bit) for package: subversion-1.6.11-15.el6_7.x86_64 --> Running transaction check ---> Package apr.x86_64 0:1.3.9-5.el6_2 will be installed ---> Package apr-util.x86_64 0:1.3.9-3.el6_0.1 will be installed ---> Package neon.x86_64 0:0.29.3-3.el6_4 will be installed --> Processing Dependency: libproxy.so.0()(64bit) for package: neon-0.29.3-3.el6_4.x86_64 --> Processing Dependency: libpakchois.so.0()(64bit) for package: neon-0.29.3-3.el6_4.x86_64 ---> Package perl-URI.noarch 0:1.40-2.el6 will be installed --> Running transaction check ---> Package libproxy.x86_64 0:0.3.0-10.el6 will be installed --> Processing Dependency: libproxy-python = 0.3.0-10.el6 for package: libproxy-0.3.0-10.el6.x86_64 --> Processing Dependency: libproxy-bin = 0.3.0-10.el6 for package: libproxy-0.3.0-10.el6.x86_64 ---> Package pakchois.x86_64 0:0.4-3.2.el6 will be installed --> Running transaction check ---> Package libproxy-bin.x86_64 0:0.3.0-10.el6 will be installed ---> Package libproxy-python.x86_64 0:0.3.0-10.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================================================================= Package Arch Version Repository Size ========================================================================================================================================================================================================= Installing: subversion x86_64 1.6.11-15.el6_7 base 2.3 M Installing for dependencies: apr x86_64 1.3.9-5.el6_2 base 123 k apr-util x86_64 1.3.9-3.el6_0.1 base 87 k libproxy x86_64 0.3.0-10.el6 base 39 k libproxy-bin x86_64 0.3.0-10.el6 base 9.0 k libproxy-python x86_64 0.3.0-10.el6 base 9.1 k neon x86_64 0.29.3-3.el6_4 base 119 k pakchois x86_64 0.4-3.2.el6 base 21 k perl-URI noarch 1.40-2.el6 base 117 k Transaction Summary ========================================================================================================================================================================================================= Install 9 Package(s) Total download size: 2.8 M Installed size: 13 M Downloading Packages: (1/9): apr-1.3.9-5.el6_2.x86_64.rpm | 123 kB 00:00 (2/9): apr-util-1.3.9-3.el6_0.1.x86_64.rpm | 87 kB 00:00 (3/9): libproxy-0.3.0-10.el6.x86_64.rpm | 39 kB 00:00 (4/9): libproxy-bin-0.3.0-10.el6.x86_64.rpm | 9.0 kB 00:00 (5/9): libproxy-python-0.3.0-10.el6.x86_64.rpm | 9.1 kB 00:00 (6/9): neon-0.29.3-3.el6_4.x86_64.rpm | 119 kB 00:00 (7/9): pakchois-0.4-3.2.el6.x86_64.rpm | 21 kB 00:00 (8/9): perl-URI-1.40-2.el6.noarch.rpm | 117 kB 00:00 (9/9): subversion-1.6.11-15.el6_7.x86_64.rpm | 2.3 MB 00:00 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 2.0 MB/s | 2.8 MB 00:01 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Warning: RPMDB altered outside of yum. ** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows: 2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of libmysqlclient.so.16()(64bit) 2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit) 2:postfix-2.6.6-2.2.el6_1.x86_64 has missing requires of mysql-libs Installing : libproxy-bin-0.3.0-10.el6.x86_64 1/9 Installing : libproxy-python-0.3.0-10.el6.x86_64 2/9 Installing : libproxy-0.3.0-10.el6.x86_64 3/9 Installing : apr-1.3.9-5.el6_2.x86_64 4/9 Installing : apr-util-1.3.9-3.el6_0.1.x86_64 5/9 Installing : perl-URI-1.40-2.el6.noarch 6/9 Installing : pakchois-0.4-3.2.el6.x86_64 7/9 Installing : neon-0.29.3-3.el6_4.x86_64 8/9 Installing : subversion-1.6.11-15.el6_7.x86_64 9/9 Verifying : libproxy-0.3.0-10.el6.x86_64 1/9 Verifying : libproxy-bin-0.3.0-10.el6.x86_64 2/9 Verifying : pakchois-0.4-3.2.el6.x86_64 3/9 Verifying : libproxy-python-0.3.0-10.el6.x86_64 4/9 Verifying : neon-0.29.3-3.el6_4.x86_64 5/9 Verifying : perl-URI-1.40-2.el6.noarch 6/9 Verifying : subversion-1.6.11-15.el6_7.x86_64 7/9 Verifying : apr-1.3.9-5.el6_2.x86_64 8/9 Verifying : apr-util-1.3.9-3.el6_0.1.x86_64 9/9 Installed: subversion.x86_64 0:1.6.11-15.el6_7 Dependency Installed: apr.x86_64 0:1.3.9-5.el6_2 apr-util.x86_64 0:1.3.9-3.el6_0.1 libproxy.x86_64 0:0.3.0-10.el6 libproxy-bin.x86_64 0:0.3.0-10.el6 libproxy-python.x86_64 0:0.3.0-10.el6 neon.x86_64 0:0.29.3-3.el6_4 pakchois.x86_64 0:0.4-3.2.el6 perl-URI.noarch 0:1.40-2.el6 Complete!
2.版本验证
svnserve --version
svnserve, version 1.6.11 (r934486) compiled Aug 17 2015, 08:37:43 Copyright (C) 2000-2009 CollabNet. Subversion is open source software, see http://subversion.tigris.org/ This product includes software developed by CollabNet (http://www.Collab.Net/). The following repository back-end (FS) modules are available: * fs_base : Module for working with a Berkeley DB repository. * fs_fs : Module for working with a plain file (FSFS) repository. Cyrus SASL authentication is available.
3.创建svn版本库
mkdir /usr/sunny/svn svnadmin create /usr/sunny/svn/test
4.修改svn配置文件
创建完版本库之后会在test/conf/下生成三个配置文件:
- authz:权限配置文件
- passwd:帐号文件
- svnserve.conf:SVN服务配置文件
svnserve.conf 文件, 该文件配置项分为以下5项:
- anon-access: 控制非鉴权用户访问版本库的权限。
- auth-access: 控制鉴权用户访问版本库的权限。
- password-db: 指定用户名口令文件名。
- authz-db:指定权限配置文件名,通过该文件可以实现以路径为基础的访问控制。
- realm:指定版本库的认证域,即在登录时提示的认证域名称。若两个版本库的认证域相同,建议使用相同的用户名口令数据文件。
设置
[general] anon-access = none auth-access = write password-db = passwd authz-db = authz
修改passwd文件:
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 = sallyssecret
sunny = 123456
zhangsan = 123456
lisi = 123456
wangwu = 123456
maliu = 123456
修改auth文件
### 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 admin = sunny team1 = sunny,zhangsan team2 = sunny,zhangsan,lisi,wangwu,maliu [test:/] @admin = rw @team1 = rw
例子:
[groups] #--这里把不同用户放到不同的组里面,下面在设置目录访问权限的时候,用目录来操作就可以了。 admin = sunny devteam1 = sunny,zhangsan devteam2 = sunny,lisi,wangwu devteam3 = sunny,zhangsan,lisi,wangwu,maliu docs = sunny,zhangsan training = sunny #为所有库指定默认访问规则,所有人可以读,管理员可以写,危险分子没有任何权限#对应目录:/usr/sunny/svn [/] * = r @admin = rw dangerman = #允许开发人员可以完全访问他们的项目版本库 [project1:/] @devteam1 = rw [project2:/] @devteam2 = rw [project3:/] @devteam3 = rw [bigproject:/] @devteam1 = rw @devteam2 = rw @devteam3 = rw trevor = rw #文档编写人员对所有的docs目录有写权限 [/trunk/doc] @docs = rw #培训人员可以完全访问培训版本库 [TrainingRepos:/] @training = rw
5.启动服务
svnserve -d -r /usr/sunny/svn
-d表示后台运行
-r表示svn的根目录
设置开机自动启动
#启动svn(可以把这个放到/etc/local/rc.local文件中,实现开机自启动) svnserve -d -r /usr/sunny/svn #验证是否开启成功 sudo netstat -anp | grep svnserve
6.连接svn资源库
svn://192.168.2.11/test
【SVN】Linux搭建SVN服务的更多相关文章
- Linux搭建SVN服务器(服务端)
Linux搭建SVN服务器(服务端) 1 安装SVN SVN客户端:TortoiseSVN,官网下载:https://tortoisesvn.net/downloads.html(客户端) # yum ...
- linux 搭建SVN服务端
搞了个服务器,然后现在想搞点事情,于是乎整个SVN在上面,算是熟悉下svn的操作过程 以下内容转载自: https://yq.aliyun.com/articles/6693 ------------ ...
- 最全Linux搭建SVN服务端教程
文章首推 支付宝接口对接 高德地图调用 验证码登录 QQ邮箱登录 今日主题:Linux搭建SVN服务端 简介 相信程序员对SVN还是不陌生的,虽然现在用Git比较多,但是SVN也是用的,SVN可以做代 ...
- 原 Linux搭建SVN 服务器2
原 Linux搭建SVN 服务器 发表于1年前(2014-08-05 17:55) 阅读(12257) | 评论(3) 31人收藏此文章, 我要收藏 赞3 摘要 Linux搭建SVN 服务器 目录 ...
- 原 Linux搭建SVN 服务器
原 Linux搭建SVN 服务器 发表于1年前(2014-08-05 17:55) 阅读(12257) | 评论(3) 31人收藏此文章, 我要收藏 赞3 摘要 Linux搭建SVN 服务器 目录 ...
- Linux搭建SVN 服务器
Linux搭建SVN 服务器 1 安装SVN 2 使用客户端连接 2.1 使用windows的客户端 2.2 使用Linux下的命令行 3 ...
- Linux搭建SVN 服务器(转)
转自:http://my.oschina.net/lionel45/blog/298305 Linux搭建SVN 服务器 作者: 沈小然 日期:2014年 8月 5日 1 安装 ...
- Linux搭建SVN
Linux搭建SVN 服务器 1 安装SVN 官网下载:http://subversion.apache.org/packages.html SVN客户端:TortoiseSVN,官网下载:http: ...
- Linux搭建svn服务
svn是为了方便代码进行版本控制 Linux)svn服务器 --> windows) svn访问端 ********* [root@svn ~]# yum install -y subversi ...
- linux搭建svn服务并手动同步代码到web目录和自动更新
1.安装svn服务端 yum -y install subversion 2.查看安装路径等信息 rpm -ql subversion 3.查看svn帮助信息 svn help 4.创建svn版本库目 ...
随机推荐
- 【CSS3】CSS3自学
CSS3学习网址:http://www.runoob.com/css3/css3-tutorial.html
- 十天精通CSS3(5)
background-origin 设置元素背景图片的原始起始位置. 语法: background-origin : border-box | padding-box | content-box; 参 ...
- 十天精通CSS3(2)
圆角效果 border-radius border-radius是向元素添加圆角边框. 使用方法: border-radius:10px; /* 所有角都使用半径为10px的圆角 */ border- ...
- git分支名一直带rebasing,如何去除
git分支名一直rebasing, 使用git rebase --continue git rebase --skip git reset --abort 都没有用, 最后直接删除 当前目录下的.gi ...
- [LeetCode] 116&117. Populating Next Right Pointers in Each Node I&II_Medium tag: BFS(Dont know why leetcode tag it as DFS...)
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *nex ...
- Leetcode: Merge k Sorted List
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 参 ...
- Summary: Depth-first Search(DFS)
There are generally two methods to write DFS algorithm, one is using recursion, another one is using ...
- liferay总结的通用的工具类
在写增删改查的时候,自己动手写了几个通用的工具类,这几个通用的工具类也是基于API写的 第一个是liferay中的分页.跟我们做普通的web开发,分页是一样的首先需要建立一个分页的实体的类 packa ...
- vmware tool安装
https://www.vmware.com/support/ws55/doc/ws_newguest_tools_linux.html VMware Workstation 5.5 Features ...
- 全局修改composer源地址
查看 composer 主目录:通过 composer config -l -g 命令可以列出 composer 的全局配置信息,在这些信息中查找 [home] 配置项就是 composer 的主目录 ...