svn – 夏清然的日志 https://www.qingran.net Xia Qingran Geek Blog Sun, 07 Aug 2016 09:50:33 +0000 en-US hourly 1 https://wordpress.org/?v=4.6.1 112893047 Debian/Ubuntu 安装subversion服务 https://www.qingran.net/2009/05/debianubuntu-%e5%ae%89%e8%a3%85subversion%e6%9c%8d%e5%8a%a1/ https://www.qingran.net/2009/05/debianubuntu-%e5%ae%89%e8%a3%85subversion%e6%9c%8d%e5%8a%a1/#respond Sat, 30 May 2009 08:47:01 +0000 https://www.qingran.net/?p=413 笔记一下。

升级apt源

apt-get update

安装SVN

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

创建文件夹

mkdir -p /home/subversion/

subversion初始化目录

svnadmin create /home/subversion/game/

配置Apache方便subversion通过HTTP访问

  1. 安装非SSL加密的HTTP访问
  • 修改/etc/apache2/mods-available/dav_svn.conf 文件
  • 修改权限
    chown -R www-data:www-data /home/subversion/game/
  • 设定apache2

<Location /code>
DAV svn
#SVNParentPath /home/svn
SVNPath /data/svn/code
ModMimeUsePathInfo on
AuthzSVNAccessFile /data/svn/code/conf/authz
AuthzSVNAnonymous off
AuthzSVNNoAuthWhenAnonymousAllowed off
AuthType Basic
AuthName “Subversion”
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>

  • 设定svn用户组和目录权限,位于以上设置的AuthzSVNAccessFile 路径 /data/svn/code/conf/authz文件内:

[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average

[groups]
admin = qingran,w
dev = r,a,b,c

[/]
@admin = rw
@dev = rw

 

  • 设置密码
    htpasswd -c /etc/apache2/dav_svn.passwd <username>
    htpasswd /etc/apache2/dav_svn.passwd <username>
]]>
https://www.qingran.net/2009/05/debianubuntu-%e5%ae%89%e8%a3%85subversion%e6%9c%8d%e5%8a%a1/feed/ 0 413