【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版本库目 ...
随机推荐
- JSON Web Token – 在 Web 应用间安全地传递信息
出处:子回 使用 JWT 令牌和 Spring Security 来实现身份验证 八幅漫画理解使用JSON Web Token设计单点登录系统
- 【Python虫师】多窗口定位
<注意>iframe框架 iframe也称作嵌入式框架,嵌入式框架和框架网页类似,它可以把一个网页的框架和内容嵌入在现有的网页中. 框架(framework)是一个基本概念上的结构,用于去 ...
- crawlspider爬虫:定义url规则
spider爬虫,适合meta传参的爬虫(列表页,详情页都有数据要爬取的时候) crawlspider爬虫,适合不用meta传参的爬虫 scrapy genspider -t crawl it it. ...
- mysql 连接查询 join
本文用到的表 CREATE TABLE `cls` ( `cls_id` ) NOT NULL AUTO_INCREMENT, `name` ) NOT NULL, PRIMARY KEY (`cls ...
- ubuntu 安装ftp nginx tomcat,mysql
tomcat sudo apt-get install tomcat 访问方式,http://loclahost:8080 进入sbin目录下 sudo ./startup.sh开启 sudo ./s ...
- HTTP权威指南读书笔记
HTTP权威指南笔记 读书有两种境界,第一种境界是将书读薄,另一种是读厚.本篇文章就是HTTP权威指南的读书笔记,算是读书的第一重境界,将厚书读薄.文章对HTTP的一些关键概念做了比较详细的概述,通读 ...
- Struts2-综合项目
综合项目:视频后台管理系统 开发环境:Tomcat6(服务器)+jdk6(windows操作系统) 使用技术:struts2(后台)+jsp(前台显示)+ajax(信息传递)+json(服务器响应前台 ...
- Summary: Arrays vs. Collections && The differences between Collection Interface and Collections Class
转自http://www.anylogic.com/anylogic/help/index.jsp?topic=/com.xj.anylogic.help/html/code/Arrays_Colle ...
- Linux root用户下强制静音的问题
解决方法 pulseaudio --start --log-target=syslog suorce /etc/profile
- jq table页二级联动
<div class="layerRtb layerRtb-threecolumn"> <div class="clearfix layerRtb-he ...