按照官方文档 http://subversion.apache.org/packages.html

使用apt-get安装方式:

1.安装Subversion:

sudo apt-get install subversion

2.安装libapavhe2-svn

sudo apt-get install libapache2-svn

提示: 
No apache MPM package installed

需要安装一个apache的mpm模块: 
sudo apt-get install apache2-mpm-* 
可供安装的模块有四种:

apache2-mpm-event 事件驱动的MPM
apache2-mpm-perchild    依赖worker,过渡
apache2-mpm-prefork 传统MPM(不使用线程)
apache2-mpm-worker  支持多线程和多进行混合模型的高速MPM

只需安装mpm-worker:

sudo apt-get install apache2-mpm-worker 

3.创建配置库根目录(该目录下存放多个配置库)和建库
mkdir /usr/svn_root
chmod -R 770 /usr/svn_rootsvnadmin create /usr/svn_root/repo1

4.创建apache账户并赋值
sudo adduser apache
sudo chown -R apache:apache /usr/svn_root

5.配置dav_svn.conf:
sudo vi /etc/apache2/mods-available/dav_svn.conf

# dav_svn.conf - Example Subversion/Apache configuration
#
# For details and further options see the Apache user manual and
# the Subversion book.
#
# NOTE: for a setup with multiple vhosts, you will want to do this
# configuration in /etc/apache2/sites-available/*, not here.# <Location URL> ... </Location>
# URL controls how the repository appears to the outside world.
# In this example clients access the repository as http://hostname/svn/
# Note, a literal /svn should NOT exist in your document root.
<Location /svn># Uncomment this to enable the repositoryDAV svn# Set this to the path to your repository#SVNPath /var/lib/svn# Alternatively, use SVNParentPath if you have multiple repositories under# under a single directory (/var/lib/svn/repo1, /var/lib/svn/repo2, ...).# You need either SVNPath and SVNParentPath, but not both.SVNParentPath /usr/svn_root# Access control is done at 3 levels: (1) Apache authentication, via# any of several methods.  A "Basic Auth" section is commented out# below.  (2) Apache <Limit> and <LimitExcept>, also commented out# below.  (3) mod_authz_svn is a svn-specific authorization module# which offers fine-grained read/write access control for paths# within a repository.  (The first two layers are coarse-grained; you
  # can only enable/disable access to an entire repository.)  Note that# mod_authz_svn is noticeably slower than the other two layers, so if# you don't need the fine-grained control, don't configure it.# Basic Authentication is repository-wide.  It is not secure unless# you are using https.  See the 'htpasswd' command to create and# manage the password file - and the documentation for the# 'auth_basic' and 'authn_file' modules, which you will need for this# (enable them with 'a2enmod').AuthType BasicAuthName "Subversion Repository"AuthUserFile /etc/apache2/dav_svn.passwd# To enable authorization via mod_authz_svn (enable that module separately):<IfModule mod_authz_svn.c>AuthzSVNAccessFile /etc/apache2/dav_svn.authz</IfModule># The following three lines allow anonymous read, but make# committers authenticate themselves.  It requires the 'authz_user'# module (enable it with 'a2enmod').#<LimitExcept GET PROPFIND OPTIONS REPORT>Require valid-user#</LimitExcept> </Location>

6.增加svn用户,第一次增加需要加-c参数(创建新的dav_svn.passwd文件):

sudo htpasswd -c /etc/apache2/dav_svn.passwd wwl
New password:
Re-type new password:
Adding password for user wwl
sudo htpasswd /etc/apache2/dav_svn.passwd apache
sudo htpasswd /etc/apache2/dav_svn.passwd test1
sudo htpasswd /etc/apache2/dav_svn.passwd test2

7.设置svn库权限:

sudo vi /etc/apache2/dav_svn.authz

[groups]
admin = wwl
CM = apache
test = test1,test2[/]
* =
@admin = rw
@CM = r[repo1:/]
* =
@CM = rw
@test = r[repo1:/branches]
@test = rw
[repo1:/trunk]
test2 = rw

[groups]代表组定义:“组名 = 用户1,用户2...”;[repo1:/]代表repo1配置库,repo1是配置库名称;[repo1:/trunk]代表repo1配置库下/trunk目录;@ 符号,则表示这是个群组权限设置;@ admin = rw代表admin 这个组的所有用户有读写权限test2 = rw代表test2这个用户对trunk有读写权限PS:注意svn的权限继承关系

8.修改apache启动用户为apache:
sudo vi /etc/apache2/envvars

export APACHE_RUN_USER=apache
export APACHE_RUN_GROUP=apache

9.授权svn.authz要加载mod_authz_svn.so 在目录 /etc/apache2/mods-enabled 下创建软链接到 ../mods-available/authz_svn.load:

cd /etc/apache2/mods-enabledsudo ln -s ../mods-available/authz_svn.load

10.启动Apache:
sudo /etc/init.d/apache2 start

 * Usage: /etc/init.d/apache2 {start|stop|graceful-stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean|status}

11.上传文件后显示:
题外话:
采用这种方式安装后,svn支持 svn:// file:// 访问方式
配置好apache后支持http:// https://  方式访问
系统环境:Ubuntu13_64
目前apt-get方式安装的版本是:
svn --version
svn, version 1.7.5 (r1336830)apache2 -v
Server version: Apache/2.2.22 (Ubuntu)

转载于:https://www.cnblogs.com/wwl1991/p/3741371.html

Ubuntu apt-get方式安装Subversion相关推荐

  1. Ubuntu 源码方式安装Subversion

    使用到的安装包: apr-1.5.1.tar.gz apr-util-1.5.3.tar.gz pcre-8.35.tar.gz httpd-2.4.9.tar.bz2 subversion-1.8. ...

  2. linux用wubi安装ubuntu,硬盘Wubi方式安装Ubuntu Linux体验

    其实接触linux是很久前了,刚刚接触计算机的时候就接触过linux,不过当时是在虚拟机里面看了看界面而已,具体的操作.功能都没有得以体现. 最近因为想学习使用php,在Windows中因为环境所致, ...

  3. Unbuntu18.04通过apt源方式安装mysql5.7.22

    Ubuntu18.04在今年4月底发布了,喜欢尝鲜的小伙伴肯定是第一时间就更新了系统版本,那么在Ubuntu18.04中怎么安装msyql5.7(mysql8.0因为新出,再观望一段时间)呢? * 带 ...

  4. 在Ubuntu下rtorrent编译安装笔记

    为什么80%的码农都做不了架构师?>>>    rtorrent是一个Bittorrent软件,基于终端的BT客户端,高性能.低资源,另外有不少人给rtorrent开发了Web GU ...

  5. android rtorrent 编译,在Ubuntu下rtorrent编译安装笔记

    rtorrent是一个Bittorrent软件,基于终端的BT客户端,高性能.低资源,另外有不少人给rtorrent开发了Web GUI来更好的让用户控制管理rtorrent,总而言之在Linux平台 ...

  6. Ubuntu 18.04 run方式安装Cuda9.0 惠普Z6工作站

    追加:[已解决,有一张显卡硬件不稳定] 参考我的最终记录: https://blog.csdn.net/u012911347/article/details/82854018 我已经写了几篇Cuda崩 ...

  7. ubuntu下使用apt安装mysql_Ubuntu下通过apt包管理安装mysql

    949 首页 > 资讯 > Ubuntu下通过apt包管理安装mysql Ubuntu下通过apt包管理安装mysql 消息来源:http://forum.ubuntu.org.cn/vi ...

  8. Ubuntu系统---以virtualenv方式安装Tensorflow-CPU

    Ubuntu系统---以virtualenv方式安装Tensorflow-CPU 一.安装环境 环境:Ubuntu18.04+CPU+python2.7 本文介绍:如何在ubuntu上以virtual ...

  9. 深度学习时出现的一些安装问题+ubuntu apt的一些问题+github release文件加速

    一.python用于深度学习时出现的一些安装问题 问题:raise ImportError, str(msg) + ', please install the python-tk package 解决 ...

最新文章

  1. ffmpeg architecture(中)
  2. java陷阱之自动拆箱
  3. C#精髓【月儿原创】第二讲 WMI完美秀出CPU编号厂商主频百分比等全部信息
  4. source ubuntu 退出_Ubuntu如何使用source命令执行文件
  5. redis中的crc16算法
  6. 如何构造充填图元_每日一练36:关于如何在Revit中使用自适应族创建矩形无缝曲面幕墙嵌板的方法...
  7. android配置activity
  8. 比较简单的在线图像编辑软件:觉得还行
  9. Songs Compression
  10. CodeForces - 869A The Artful Expedient
  11. 互联网晚报 | 12月2日 星期四 | 荣耀60系列正式发布;高通发布全新一代骁龙8移动平台;新东方在线布局教育智能硬件...
  12. cuda驱动更新方法之一:
  13. 文件扫描生成PDF文件或图片,扫描效果碾压WPS及全能扫描王
  14. 【逗老师带你学IT】Yeastar PSTN网关对接FreePBX网关的各种坑-国内VOIP发展感叹
  15. 好玩的黑客游戏(过把黑客的瘾)
  16. 06-jQuery属性操作
  17. Vue实现轮播的方法
  18. vscode代码格式化时属性不换行
  19. 计算机控制点火系统检修,《发动机电控技术》教学教案:计算机控制点火系统的组成及工作原理...
  20. C++ string大小写转换

热门文章

  1. 易华录发布蓝光存储新品
  2. angular2 学习笔记 ( unit test 单元测试 )
  3. OSChina 周六乱弹 ——世上无难事,只要肯放弃!
  4. [转]Hspice 语法手册
  5. [置顶]理解Linux系统负荷
  6. Hadoop文件系统介绍
  7. 【Cloud Foundry 应用开发大赛】“八卦街”图片采集应用
  8. BlueHost Gzip优化JS和CSS传输
  9. php width,canvas定义width、height的正确用法
  10. Dockter:研究人员的容器图像生成器