Centos/ubuntu配置SVN服务
Centos安装svn
yum -y install subversion
ubuntu安装svn
apt-get install subversion
Centos配置svn
root@hello:~# mkdir -p /svn/svn1 root@hello:~# svnadmin create /svn/svn1/ root@hello:~# cd /svn/svn1/conf/ root@hello:/svn/svn1/conf# ls authz passwd svnserve.conf root@hello:/svn/svn1/conf# vim passwd 编辑passwd,在【users】下添加用户名和密码### 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 Test = 123456root@hello:/svn/svn1/conf# vim authz [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_and_sally,组内有harry和sally用户 # harry_sally_and_joe = harry,sally,&joe# [/foo/bar] 表示/foo/bar下的所有资源 # harry = rw harry 拥有读写权限 # &joe = r # * = 设置其他用户具有的权限# [repository:/baz/fuz] 表示repository下的/baz/fuz下的所有资源 # @harry_and_sally = rw 设置harry_and_sally用户组为读写权限 # * = r [svn1:/] 表示svn1下的所有资源 Test = rw 用户Test 权限为读写root@hello:/svn/svn1/conf# vim svnserve.conf[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 = none #匿名访问的权限,可以是read,write,none,默认为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 = SVN1 #认证空间名,SVN会在认证提示里显示,并且作为凭证缓存的关键字[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 开启sasl用户验证 ### 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
ubuntu配置svn
root@hello:/svn/svn1/conf# pwd /svn/svn1/conf root@hello:/svn/svn1/conf# ls authz hooks-env.tmpl passwd svnserve.confroot@hello:/svn/svn1/conf# vim passwd[users] Test = 123456root@hello:/svn/svn1/conf# vim authz[aliases] # joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average[groups][svn1:/] Test = rwroot@hello:/svn/svn1/conf# vim svnserve.conf [general] anon-access = none auth-access = write password-db = passwd authz-db = authz # groups-db = groups 指定“group file”的位置,而该目录下并没有groups文件,因此该配置不能被启用! realm = svn1 # force-username-case = none # hooks-env = hooks-env[sasl] # use-sasl = true # min-encryption = 0 # max-encryption = 256
开机自动启动SVN脚本:
#!/bin/bash PatH=`/svn/svn1` SvN=`which svnserve` $SvN -d -r $PatH
添加开机启动
echo "bash /脚本绝对路径/脚本名" >> /etc/rc.d/rc.local
SVN启动控制脚本
根据实际情况进行修改 路径等信息
#!/bin/bash #chkconfig: 345 95 95 #description: svn stop(){ kill $(ps -ef | grep "svnserve -d -r" | grep -v grep | awk '{print $2}') > /dev/null 2>&1 if [ ! $? -eq 0 ] thenecho "stop ERROR..." fi } start(){ svnserve -d -r /svn/ > /dev/null 2>&1 if [ ! $? -eq 0 ] thenecho "start ERROR..." fi } restart(){ stop start } case $1 in stop)stop ;; start)start ;; restart)restart ;; *)echo "please INPUT stop|start|restart"exit 110 ;; esac
添加到系统服务(仅针对centos6.x系统)
将上面脚本命名为svnd
chmod +x ./svnd mv ./svnd /etc/init.d/ chkconfig svnd --add chkconfig svnd on chkconfig svnd --list
转载于:https://www.cnblogs.com/LuckWJL/p/9928145.html
Centos/ubuntu配置SVN服务相关推荐
- Ubuntu搭建SVN服务 - 内网穿透实现公网远程访问
写在前面:博主是一只经过实战开发历练后投身培训事业的"小山猪",昵称取自动画片<狮子王>中的"彭彭",总是以乐观.积极的心态对待周边的事物.本人的技 ...
- Linux配置SVN 服务端
1.安装 SVN 服务端 安装 Subversion Subversion 是一个版本控制系统,相对于的 RCS . CVS ,采用了分支管理系统,它的设计目标就是取代 CVS . 安装:yum in ...
- ubuntu配置FTP服务教程
ubuntu配置FTP服务教程 文章目录 ubuntu配置FTP服务教程 前言: 教程: 前言: 局域网内各个主机的代码和数据迁移,实在是一个比较难搞的事儿. 之前试过scp复制,但是不能用鼠标操作, ...
- Linux (Ubuntu)安装SVN服务端详细篇
1 先查看是否已经安装了svn: 如果没有安装svn则: root@houwp:~# svn --version The program 'svn' is currently not installe ...
- linux安装配置svn服务端
在线安装SVN 使用svn --version 命令查看SVN是否已经安装. 或者 $ rpm -qa subversionsubversion-1.14.1-1.x86_64 如果没有安装,使用yu ...
- Linux CentOS下配置SVN+SVN勾子
环境介绍: 操作系统:CentOS release 6.5 (Final) 64位 网络环境:内网 1 配置SVN 1.1 安装SVN组件包 使用yum安装svn所需的组件包 # yum –y ...
- CentOS 7 安装SVN服务端
CentOS7下安装SVN服务 1. yum命令即可方便的完成安装 # sudo yum install subversion 测试安装是否成功: # svnserve --version 更改svn ...
- win11 安装Subversion与配置 svn服务端
一.下载 服务器端程序版本 目前Subversion的最新版本是 1.9.0-alpha2,这是一个测试版.官方网站推荐使用的版本是1.8.9,原话是:The best available versi ...
- (SVN笔记)https内网IP端口配置SVN服务端+内网SVN客户端联合使用
目录 1.前言 2.SVN服务端设置 3.开始使用SVN (1)新建版本库 (2)迁入项目到SVN服务端 (3)检索项目/拉取项目check out (4)提交代码commit (5)更新代码upda ...
最新文章
- 【设计原则和建议】 构造和析构对象
- 信号处理频谱分析中,如何选择合适的窗函数
- shell的if判断比较
- JavaScript学习笔记07【6个经典案例——电灯开关、轮播图、自动跳转首页、动态表格、表格全选、表单验证】
- while循环里面scanf_5.1 for循环
- linux dev urandom,Linux random vs urandom 区别
- 【Java】多线程SynchronizedVolatile、锁升级过程 - 预习+第一天笔记
- Linux 4.15 rc7,Linux学习之十五(sed命令)-2017-4-23
- 如何在Ubuntu中使用root账号登录(新增Ubuntu12.04/14.04)?
- [再学Python] - 2 - math库和random库
- freemarker中使用@spring.*标签实现国际化
- 选择合适的回归损失函数
- javscript DOM基础知识(常用篇)
- 爬虫爬取csdn登陆页面持续加载,selenium模拟无法进行的解决方案
- 伦敦国王学院计算机申请要求,伦敦大学国王学院教育中计算机应用文学硕士研究生申请要求及申请材料要求清单...
- python基础19-36题
- CTC 技术介绍概述——啃论文系列
- Java如何控制生成pdf的大小_如何使用pdfbox或其他Java库减小合并的PDF / A-1b文件的大小...
- Windows简体系统和繁体系统下的乱码处理
- nxlog 日志采集
热门文章
- 第三讲:Asp.Net+Autofac+EF/ADO.NET Winform OA(3)-启用DevExpress皮肤功能
- 中间件(1)分布式缓存
- 笔记:2016-06-02
- 不用临时变量交换两个变量的值
- Eclipse c++ 中[Linker error] undefined reference to `WSAStartup@8'的解决办法
- Android用户界面设计“.NET研究”:框架布局
- Linux mount 修改文件系统的读写属性
- JAVA中数组Array与List互转
- jmeter获取mysql数据并作为请求参数使用
- bootstrap-datepicker 日期格式设置