Linux 下面httpd支持的SVN 服务器端安装


一,Subversion有两种运行方式

一种是基于Apache Http Server,另外一种是Subversion Standalone Server。

以下是基于httpd的svn的安装

二,安装svn

yum install  subversion mod_dav_svn

1),确定已经安装了svn模块:mod_dav_svn

[root@svn zhangying]# cd /etc/httpd/modules/
[root@svn modules]# ls |grep svn
mod_authz_svn.so
mod_dav_svn.so
[root@svn modules]#

2),看一下svn是否已安装成功

[root@svn modules]# svn --version
svn, version 1.4.2 (r22196)
compiled Aug 10 2009, 18:00:04

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see
This product includes software developed by CollabNet ().

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
- handles 'http' scheme
- handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme

三,创建仓库,修改svn配置文件

1),加载模块

[root@svn conf.d]#cd /etc/httpd/conf.d

[root@svn conf.d]# vi subversion.conf

添加以下二行

LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

2),创建仓库,以及仓库目录的设置

# mkdir -p /var/www/svn

# cd /var/www/svn

# svnadmin create test

# chown -R apache.apache test

# vi /etc/httpd/conf.d/subversion.conf

<Location /svn>
DAV svn
#注意,下面的路径,子文件夹名不能和父文件名重复,不然就会出问题

SVNParentPath /var/www/svn
#
#   # Limit write permission to list of valid users.
#   <LimitExcept GET PROPFIND OPTIONS REPORT>
#      # Require SSL connection for password protection.
#      # SSLRequireSSL
#
AuthType Basic
AuthName "Subversion repository"
AuthzSVNAccessFile /var/www/svn/repository/authz.conf
AuthUserFile /var/www/svn/repository/authfile
Require valid-user
#   </LimitExcept>
</Location>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wywzsz.html