一、介绍

  Subversion 简称就是svn服务器,用来托管代码的,类似的还有git

  1)Centos6.6

  2)Subversion

二、安装

yum -y install subversion

三、配置

$ vi /etc/init.d/svnserve
#!/bin/bash
#
# svnserve Startup script for the Subversion svnserve daemon
#
# chkconfig: -
# description: The svnserve daemon allows access to Subversion repositories \
# using the svn network protocol.
# processname: svnserve
# config: /etc/sysconfig/svnserve
# pidfile: /var/run/svnserve.pid
#
### BEGIN INIT INFO
# Provides: svnserve
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Short-Description: start and stop the svnserve daemon
# Description: The svnserve daemon allows access to Subversion
# repositories using the svn network protocol.
### END INIT INFO # Source function library.
. /etc/rc.d/init.d/functions if [ -f /etc/sysconfig/svnserve ]; then
. /etc/sysconfig/svnserve
fi exec=/usr/bin/svnserve
prog=svnserve
pidfile=${PIDFILE-/var/run/svnserve.pid}
lockfile=${LOCKFILE-/var/lock/subsys/svnserve}
directory=${DIRECTORY-/var/subversion}
args="--daemon --pid-file=${pidfile} --root=${directory} $OPTIONS"
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog lockfile=/var/lock/subsys/$prog start() {
[ -x $exec ] || exit
[ -f $config ] || exit
echo -n $"Starting $prog: "
daemon --pidfile=${pidfile} $exec $args
retval=$?
echo
if [ $retval -eq ]; then
touch $lockfile || retval=
fi
return $retval
} stop() {
echo -n $"Stopping $prog: "
killproc -p ${pidfile} $prog
retval=$?
echo
[ $retval -eq ] && rm -f $lockfile
return $retval
} restart() {
stop
start
} reload() {
restart
} force_reload() {
restart
} rh_status() {
# run checks to determine if the service is running or use generic status
status -p ${pidfile} $prog
} rh_status_q() {
rh_status >/dev/null >&
} case "$1" in
start)
rh_status_q && exit
$
;;
stop)
rh_status_q || exit
$
;;
restart)
$
;;
reload)
rh_status_q || exit
$
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit
esac
exit $? $ mkdir -p /var/subversion
$ cd /var/subversion/

$ svnadmin create repos
$ cd repos
$ vi conf/svnserve.conf
[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
#realm = /var/subversion/repos [sasl] $ vi conf/passwd
[users]
kaiwen01 = kaiwen01
kaiwen02 = kaiwen02
kaiwen03 = kaiwen03 $ vi conf/authz
[groups]
develop = kaiwen01,kaiwen02
java = kaiwen03 [repos:/]
@develop=rw [repos:/permit]
@java = rw
* = r

四、运行

 

$ chkconfig svnverve on
$ /etc/init.d/svnverve start

五、检查

$ ps aux|grep svnserve
$ netstat -ntlp|grep svnserve

#默认端口3690

六、客户端运行测试

#检出

#提交

七、其他(另外附上一个自动创建项目的脚本,但是必须放到创建项目的当前文件夹)

$ vi /var/subversion/svncreate.sh
#!/bin/bash
# read -p "Project Name: " names
svnadmin create $names cat >$names/conf/svnserve.conf<<EOF
[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz [sasl]
EOF cat >$names/conf/passwd <<EOF
[users]
${names} = ${names}-pass
${names} = ${names}-pass
EOF cat >$names/conf/authz <<EOF
[groups]
develop = ${names},${names} [$names:/]
@develop=rw
EOF

Centos6.6 安装Subversion服务的更多相关文章

  1. CentOS6.X安装vsftpd服务

    #-----------------CentOS6.X安装VSFTPD服务 #! /bin/sh #1.关闭selinux setenforce 0 sed -i 's/enforcing/disab ...

  2. centos6.5安装vsftp服务并配置虚拟账户ftp

      当我们的用户量越来越大时,继续创建更多的系统用户是不明智的,这时就需要为vsftpd创建虚拟账户,但vsftpd虚拟账户的数据库要保存在Berkeley DB格式的数据文件中,所以需要安装db4- ...

  3. Centos6.6 安装rsync服务端

    一.介绍 在工作中经常遇到代码分发,或者是资料备份,都会用到rsync,配置不算复杂,仅做下记录,安装环境如下: 1) Centos6.6 2) rsync-3.0.6-12.el6.x86_64 3 ...

  4. 170428、centos6.5安装Subversion + Apache +Jsvnadmin

    服务器地址:192.168.0.112 root用户操作 建议 安装前 更 新操作系统 # yum update 更新完成后重启 # reboot 安装 装 apache # yum install ...

  5. centos6.6安装redis服务安装redis服务,对于discuz来说可以作为缓存使用,减轻服务器压力

    获取redis源码包 #wget http://download.redis.io/releases/redis-stable.tar.gz 解压缩 #tar xf  redis-stable.tar ...

  6. 在基于阿里云serverCentOS6.5下安装Subversion 1.6.5服务

    近期阿里云搞了个1元免费提供云server的活动,偶心痒痒就申请了一个. 正好能够作为团队的SVNserver了,以下就来部署SVN服务吧. 一.安装基础环境 apr-1.5.0.tar.gz apr ...

  7. CentOS6.5 下Haproxy服务的安装与配置

    参考网站: http://wenku.baidu.com/link?url=57AsCAL8TIv8NC3Vdnpd0hQ4fGNls8RFikjRWna3OaZb6qGHYTdV-4_wQPuzv8 ...

  8. CentOS-6.3安装配置SVN

    安装说明 系统环境:CentOS-6.3 安装方式:yum install (源码安装容易产生版本兼容的问题) 安装软件:系统自动下载SVN软件 检查已安装版本 #检查是否安装了低版本的SVN [ro ...

  9. [转载]CentOS 6.3安装Subversion服务器

    转载自http://www.cnblogs.com/zhoulf/archive/2013/02/02/2889949.html 安装说明 系统环境:CentOS-6.3 安装方式:yum insta ...

随机推荐

  1. Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method fail

    SpringBoot 单元测试报错 @RunWith(SpringRunner.class) @SpringBootTest public class ProductCategoryRepositor ...

  2. 车展(vijos P1459)

    描述 遥控车是在是太漂亮了,韵韵的好朋友都想来参观,所以游乐园决定举办m次车展.车库里共有n辆车,从左到右依次编号为1,2,…,n,每辆车都有一个展台.刚开始每个展台都有一个唯一的高度h[i].主管已 ...

  3. Androd自己定义控件(三)飞翔的小火箭

    在前面的自己定义控件概述中已经跟大家分享了Android开发其中自己定义控件的种类. 今天跟大家分享一个非主流的组合控件. 我们在开发其中,难免须要在不同的场合中反复使用一些控件的组合.而Java的最 ...

  4. codeforces 391E2 (【Codeforces Rockethon 2014】E2)

    题目:http://codeforces.com/problemset/problem/391/E2    题意:有三棵树.每棵树有ni个结点,加入两条边把这三棵树连接起来,合并成一棵树.使得合并的树 ...

  5. Struts2 自己定义下拉框标签Tag

    自己定义标签主要包含三个步骤: 1.编写java类,继承TagSupport类. 2.创建tld文件,影射标签名和标签的java类. 3.jsp页面引入tld. 样例:自己定义下拉框标签 假设页面上有 ...

  6. ExtJs 日期相加,Grid表格列可编辑

    1.日期相加: Ext.Date.add(new Date(), Ext.Date.DAY, 15) 2.Grid表格列可编辑: {    header : "实际已交货量",   ...

  7. ACM Amman Collegiate Programming Contest(7.22随机组队娱乐赛)

    题目链接 https://vjudge.net/contest/240074#overview 只写一下自己做的几个题吧 /* D n^2的暴力dp怎么搞都可以的 这里先预处理 i到j的串时候合法 转 ...

  8. hdu 2846(字典树)

    Repository Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total ...

  9. 【BZOJ 2288】 生日礼物

    [题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=2288 [算法] 先将这个序列的正负数合并起来,变成一个正负交替的序列 如果新序列的正 ...

  10. Java 8 实战 P3 Effective Java 8 programming

    目录 Chapter 8. Refactoring, testing, and debugging Chapter 9. Default methods Chapter 10. Using Optio ...