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 = 123456 root@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.conf root@hello:/svn/svn1/conf# vim passwd [users]
Test = 123456 root@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 = rw root@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 ]
then
echo "stop ERROR..."
fi
}
start(){
svnserve -d -r /svn/ > /dev/null 2>&1
if [ ! $? -eq 0 ]
then
echo "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

  

Centos/ubuntu配置SVN服务的更多相关文章

  1. ubuntu配置tftp服务

    ubuntu配置TFTP服务: TFTP是用来下载远程文件的最简单的网络协议,基于UDP协议.xinetd是新一代的网络守护进程服务程序,经常用于管理多种轻量型internet服务. sudo apt ...

  2. Ubuntu配置SSH服务

    本文主要解决Ubuntu配置SSH服务的问题 1.1.修改可用的agt源 sudo vim /etc/apt/sources.list 1.2.更新代码包 sudo apt-get update 2. ...

  3. [Linux] PHP程序员玩转Linux系列-Ubuntu配置SVN服务器并搭配域名

    在线上部署网站的时候,大部分人是使用ftp,这样的方式很不方便,现在我要在线上安装上SVN的服务器,直接使用svn部署网站.因为搜盘子的服务器是ubuntu,因此下面的步骤是基于ubuntu的. 安装 ...

  4. Centos7配置SVN服务端

    环境 Centos 7 SVN 1.7 安装SVN Shell> yum install subversion -y 准备配置和仓库 Shell> mkdir -p /mydata/rep ...

  5. CentOs linux安装SVN服务

    SVN服务器有2种运行方式:1.独立服务器(例如:svn://xxx.com/xxx):2.借助apache   (例如:http://svn.xxx.com/xxx):为了不依赖apache,我选择 ...

  6. 阿里云(CentOs)搭建SVN服务

    系统环境 CentOS Linux release 7.6.1810 (Core) 一.通过yum命令安装svnserve,命令如下: yum -y install subversion 此命令会全自 ...

  7. Centos7 配置 svn服务端

    转载至:Linux(阿里云Centos7)环境下搭建svn服务器以及权限配置详细步骤 本篇文章主要介绍在CentOS7中采用yum安装方式.优点:简单,一键安装,不用手动配置环境变量等.缺点:安装位置 ...

  8. CentOS 7 安装SVN服务端

    CentOS7下安装SVN服务 1. yum命令即可方便的完成安装# sudo yum install subversion 测试安装是否成功:# svnserve --version 更改svn的默 ...

  9. 手动配置SVN服务

    现在理论上是不用手动添加,娘的一路下一步总是有问题,备份一个. 1 安装svnservice(是一个服务)    a 在Windows NT中本身包含了一个安装服务的工具"Service C ...

随机推荐

  1. Python_selenium之获取当前页面的href属性,id属性,图片信息和截全屏

    Python_selenium之获取当前页面的href属性,id属性,图片信息和截全屏 一.  获取当前页面的全部信息 1. 图片信息包括图片名称.图片大小等信息 2. 只需将图片信息打印出来(ima ...

  2. python学习之路----输出所有大小写字母

    print([chr(i) for i in range(48, 58)]) # 所有数字print([chr(i) for i in range(65, 91)]) # 所有大写字母print([c ...

  3. django用户认证系统——登录4

    用户已经能够在我们的网站注册了,注册就是为了登录,接下来我们为用户提供登录功能.和注册不同的是,Django 已经为我们写好了登录功能的全部代码,我们不必像之前处理注册流程那样费劲了.只需几分钟的简单 ...

  4. IOS-添加分段控件SegmentControl

    本文转载至 http://www.cnblogs.com/tx8899/archive/2012/06/05/2537020.html 添加分段控件 控件是一种小型的.自包含的UI组件,可以用在各种U ...

  5. 《转》架设一个BLOG需要整合多少东西?

    本文转载自大CC 1 Wordpress本身需要花费功夫的地方不多,比较容易,但Themes要花不少功夫调整,有时还得改CSS.推荐几个Wordpress Themes网站: - http://the ...

  6. Objective-C规范注释心得——同时兼容appledoc(docset、html)与doxygen(html、pdf)的文档生成

    作者:zyl910 手工写文档是一件苦差事,幸好现在有从源码中抽取注释生成文档的专用工具.对于Objective-C来说,目前最好用的工具是appledoc和doxygen.可是这两种工具对于注释的要 ...

  7. python if x:

    # !usr/bin/env python # -*- coding:utf-8 _*- """ @author:happy_code @email: happy_cod ...

  8. 理解java集合——集合框架 Collection、Map

    1.概述: @white Java集合就像一种容器,可以把多个对象(实际上是对象的引用,但习惯上都称对象)"丢进"该容器中. 2.Java集合大致可以分4类: @white Set ...

  9. delphi,数据类型,字符、浮点、整数、数组

    字符型:string 浮点型:real 整数:integer DELPHI的浮点数声明不是用float,而是用real(8个字节),single(8个字节,单精度浮点),double(16个字节,双精 ...

  10. select * 为什么不好? limit 1 为什么好? --mysql SQL语句优化

    问题一: Select * from  student;  这种语句不好 我的理解:根据Innode存储引擎以及网上的各种资料所说的innodb的B+树索引结构可以分析出,当在非聚集索引列上搜索若用s ...