1. #安装服务

apt-get install subversion
apt-get install libapache2-svn
apt-get install apache2
apt-get install apache2-utils

2.添加svn管理用户及subversion组
$ sudo adduser test
$ sudo addgroup subversion
$ sudo addgroup test subversion
$ sudo addgroup root subversion

2. #创建项目目录
$ sudo mkdir /home/svn
$ sudo cd /home/svn
$ sudo mkdir project
/** create group if the subversion is not existing**/
$ sudo chown -R root:subversion project
$ sudo chmod -R g+rws project

3. #创建SVN文件库
svnadmin create /home/svn/project

4. #设置访问权限

修改/home/svn/project目录下:
svnserver.conf文件,(行最前端不允许有空格)

编辑svnserver.conf 文件, 把下面两行的注释取消
password-db = passwd #用户保存文件的名称
authz-db = authz #权限管理文件
//passwd and authz 为/home/svn/project/config的文件passwd 和 authz

//说明
#[general]
anon-access=none
auth-access=write
password-db=passwd
其中anon-access 和auth-access分别为匿名和有权限用户的权限,默认给匿名用户只读的权限,但如果拒绝匿名用户的访问,只需要把read 改成none 就可以

5、创建访问用户
最后一步就是创建访问用户,建议将用户名密码文件存放在当前版本仓库下的conf文件夹下,这样版本仓库多的时候就不至于太乱。
因为conf文件夹下已经存在passwd文件了,所以直接添加用户就可以:
htpasswd -c /home/svn/project/conf/passwd test #test就是用户名
会提示输入两次密码后,这个用户就创建完成了。

用户信息保存在以下文件中
/home/svn/project/conf/passwd
test:evnmR/fZEDGZY #test:后面加的是加密后的密码

也可以手动添加用户到文件中,如:
[users]
test = your_password(明文)

6. 权限设置
a) 将用户test 添加到 subversion group
[groups]
subversion = test
如果有多个用户可以用逗号隔开,如下
subversion = test,test2

b) 授权test用户 访问库
[/]
test = rw

c) 授权test用户 访问project
[project:/]
@test = rw

或者按group 授权
[/]
@subversion = rw
[project:/]
@subversion = rw

7. 启动SVN服务
svnserve -d -r /home/svn
说明:-d 表示svnserver 以“守护”进程模式运行
-r 指定文件系统的根位置(版本库的根目录),这样客户端不用输入全路径,就可以评头访问版本库
确定服务已经启动:
$ netstat -ntlp|grep 3690
tcp 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN 2026/svnserve

8. import project
cd c:/test/svn/testProject
svn import -m 'init import' svn://xxx.xxx.xxx/project/

9. checkout from another client

cd c:/test2/testproject
svn checkout svn://xxx.xxx.xxx/project/ --username test --password your_password

reference documents

http://cnubuntu.com/forum.php?mod=viewthread&tid=8898
http://www.cnblogs.com/shitouer/archive/2012/07/20/2601231.html
http://www.cnblogs.com/wuhenke/archive/2011/09/21/2184127.html

install svn server in Ubuntu的更多相关文章

  1. install dns server on ubuntu

    参考 CSDN/Ubuntu环境下安装和配置DNS服务器 在 Ubuntu 上安裝 DNS server Install BIND 9 on Ubuntu and Configure It for U ...

  2. How to install Samba server on Ubuntu 12.04

    Part 1: Configuring anonymous share with samba server To install the samba package,enter the followi ...

  3. Linux install svn server

    ref: http://blog.csdn.net/pingnanlee/article/details/8812520 1. yum -y install subversion 2. svnadmi ...

  4. Official online document, install svn server in centOS

    http://www.krizna.com/centos/install-svn-server-on-centos-6/

  5. Install SVN (Subversion) Server on Fedora 20/19, CentOS/Red Hat (RHEL) 6.5/5.10

    Install SVN (Subversion) Server on Fedora 20/19, CentOS/Red Hat (RHEL) 6.5/5.10 Updated by JR on Mar ...

  6. 【转】在ubuntu环境下搭建svn server遇到的一些问题

    原文网址:http://www.cnblogs.com/pcchinadreamfly/archive/2012/11/24/2786046.html 前段时间在ubuntu 12.04lts上倒腾了 ...

  7. How to Install and Configure Bind 9 (DNS Server) on Ubuntu / Debian System

    by Pradeep Kumar · Published November 19, 2017 · Updated November 19, 2017 DNS or Domain Name System ...

  8. Install and Enable Telnet server in Ubuntu Linux

    转:http://ubuntuguide.net/install-and-enable-telnet-server-in-ubuntu-linux 参考:http://auxnet.org/index ...

  9. Install the high performance Nginx web server on Ubuntu

    Look out Apache, there's a web server – Nginx (pronounced Engine X) – that means to dismantle you as ...

随机推荐

  1. 使用Flask部署机器学习模型

    Introduction A lot of Machine Learning (ML) projects, amateur and professional, start with an aplomb ...

  2. 字段值为 null 时,序列化或反序列化成其他值

    using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using System; using System.Collections.G ...

  3. css基础参考文档

    block inline-block inline区别 absolute定位详解:https://www.jianshu.com/p/a3da5e27d22b css浮动详解 float浮动 div变 ...

  4. CSS--交互效果

    动画过渡效果 //vue <div class="search-list" v-show="searches.length"> <transi ...

  5. WordPress 本地建站

    1.搭建环境 appserv下载链接:http://www.onlinedown.net/soft/35753.htm 安装 1.直接运行 2.选择安装路径 3.选择所需环境,若已经有,则可不勾选 4 ...

  6. three.js 创建点 线 面

    <html> <head> <title>My first three.js app</title> <style> body { marg ...

  7. WordCount基本功能

    WordCount基本功能 码云地址:https://gitee.com/Joker_zou/WordCount.git 一.项目需求 WordCount的需求可以概括为:对程序设计语言源文件统计字符 ...

  8. 553. Optimal Division

    题目: Given a list of positive integers, the adjacent integers will perform the float division. For ex ...

  9. [LeetCode]题1:two sum

      Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0 ...

  10. tcp滑动窗口详解(2)

    http://blog.csdn.net/yujun00/article/details/636495 ARQ与滑动窗口概念  滑动窗口协议,是TCP使用的一种流量控制方法.该协议允许发送方在停止并等 ...