CentOS搭建SVN记录
1、安装subversion(client and server)
$ yum install subversion
$ yum install mod_dav_svn
安装成功之后使用 svnserve --version 看一下安装的版本
[root@localhost conf]# svnserve --version
svnserve, version 1.6.11 (r934486)compiled Aug 17 2015, 08:37:43Copyright (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.
svn的版本是1.6.11,是一个老旧的版本了,官网上的版本已经是1.9.4,先不纠结这个问题,先用这个老版本
2、代码库创建
SVN软件安装完成后还需要建立SVN库,我将svn库的路径设在了/var/www/svn/game/test/下面
mkdir -p /var/www/svn/game/test
svnadmin create /var/www/svn/game/test
创建成功之后可以cd到这个目录看看
[root@localhost test]# ll
total 24
drwxr-xr-x. 2 root root 4096 Aug 18 18:13 conf
drwxr-sr-x. 6 root root 4096 Aug 18 03:07 db
-r--r--r--. 1 root root2 Aug 18 01:21 format
drwxr-xr-x. 2 root root 4096 Aug 18 01:21 hooks
drwxr-xr-x. 2 root root 4096 Aug 18 01:21 locks
-rw-r--r--. 1 root root 229 Aug 18 01:21 README.txt
目录结构创建如上,创建成功。
3、配置代码库
cd到/var/www/svn/game/test/conf下面
svnserve.conf(### This file controls the configuration of the svnserve daemon, if you use it to allow access to this repository.)
passwd(### This file is an example password file for svnserve.)
authz(### This file is an example authorization file for svnserve.)vi svnserve.conf,在[general]下面追加或者打开注释
#匿名访问的权限,可以是read,write,none,默认为read
anon-access=none
#使授权用户有写权限
auth-access=write
#密码数据库的路径
password-db=passwd
#访问控制文件
authz-db=authz
#认证命名空间,subversion会在认证提示里显示,并且作为凭证缓存的关键字
realm=/opt/svn/repositories
PS:在[general]后面追加,我一开始看教程的时候,直接加在了文件的最后面,发现用户权限怎么都没有生效,查了好久才找到问题所在。
用户密码passwd配置 编辑passwd文件即可,内容很简单,username=passwd
权限控制authz配置,直接附上原文
### 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
4、相关命令
- 查看svn是否运行 ps -ef|grep svn|grep -v grep
- 停止SVN命令 killall svnserve
- 启动svn版本库 svnserve -d -r 目录名
- 如果目录名不同,svn的链接也不同。
- 如果我使用svnserve -d -r /var/www/svn/game/test
则svn的地址为:svn://ip
如果我使用svnserve -d -r /var/www/svn/
则svn的地址为:svn://ip/game/test
5、后续
这种直接用svnserve运行的
转载于:https://www.cnblogs.com/rainInSun/p/5786391.html
CentOS搭建SVN记录相关推荐
- [记录]CentOS搭建SVN服务器(主从同步)
CentOS搭建SVN服务器(主从同步) 1.安装步骤如下: 1)安装: #yum install subversion 2)查看安装位置: #rpm -ql subversion 3)查看版本: # ...
- CentOS 搭建svn服务器
搭建SVN服务,有效的管理代码,以下三步可以快速搞定. 1.安装 #yum install subversion 判断是否安装成功 [root@]# svnserve --version svnser ...
- centos 搭建 svn服务器
最近在折腾vps,顺便把一些东西都熟悉一遍. 本文主要介绍SVN独立服务器的的安装和简单配置: 安装(CentOS下yum即可方便的完成安装) # yum install subversion 测试安 ...
- Ubuntu/CentOs 搭建SVN服务器
安装 CentOS : yum install subversion Ubuntu: sudo apt-get install subversion 查看Subversion版本: 使用"s ...
- redhat/centos 搭建svn服务器环境
subversion支持3种服务配置 1.apache + mod_dav_svn 2.svnserve 3.穿越ssh隧道的svnserve 教程选择的是最简单的svnserve的服务 1.安装sv ...
- CentOs搭建svn
安装SVN yum install -y subversion 检查是否安装成功 svnserve --version 创建版本库 我们先创建/var/svn这么目录 mkdir /var/svn c ...
- Centos搭建SVN服务器及配置文件
2019独角兽企业重金招聘Python工程师标准>>> 1.安装 #yum install subversion 判断是否安装成功 yum安装结束时会显示版本 svnserve, v ...
- CentOS搭建SVN服务器
前言 LZ用的是Cenos6.9 查看是否安装 rpm -ql subversion 安装 yum install subversion 查看安装位置 rpm -ql subversion 查看是否安 ...
- Linux(Centos)快速搭建SVN服务器
2019独角兽企业重金招聘Python工程师标准>>> 一.SVN简介 SVN是Subversion的简称,是一个开放源代码的版本控制系统,相较于RCS.CVS,它采用了分支管理系统 ...
最新文章
- php 实现一致性hash 算法 memcache
- Linux安装软件时缺少依赖包的简单较完美解决方法!
- 关于JS中变量提升的规则和原理的一点理解(一)
- Windows下Caffe的学习与应用(二)——优化自己训练的模型(fine-tuning)
- 【python学习】——读取csv文件
- jzoj1370-飞船【RMQ初见】
- 华为鸿蒙系统智能手机_余承东再度确认:鸿蒙系统将适配到华为手机上
- android 开发 gradle 自己会容易混淆的东西
- ubuntu保存_Arch与Ubuntu安装软件对比
- 智能门禁(4)---基于face++和Onenet平台的人脸门禁系统
- linux oracle pam,Linux下安装Oracle11g软、硬件环境检测和修改
- git push本地代码到github出错
- 扔掉JUnit,迎接Spock
- IS2009制作Oracle 静默安装包(一)感谢空白先生特许授权
- atitit.ntfs ext 文件系统新特性对比
- Oracle数据库学习思维导图
- linux系统移植步骤
- 使用duet或spacedesk实现iPad作为电脑扩展屏幕
- 华为交换机Console口密码重置及配置
- html 播放360全景图,讯网360全景展示产品-html5全景图-flash全景展示-360度全景图制作...
热门文章
- php preg split,php preg_split()字符串分割函数的使用方法
- 最长上升子序列LIS 动态规划 二分查找算法
- 2019蓝桥杯A组:平方和(枚举,筛选)
- 2016CCPC长春:Sequence II(主席树)
- C++deque双端队列
- [python] linspace():获取等间隔数组
- python机器学习库sklearn——交叉验证(K折、留一、留p、随机)
- js系列教程9-表单元素全解
- mysql 体系架构设计_MySQL数据库的体系架构(转载)
- 【CF1152F】Neko Rules the Catniverse(动态规划)