CentOS 6.1上部署SVN时遇到的问题及解决方法

详细步骤网上有,这里只是列出了我遇到的一些问题

 Location配置中有两个方式SVNParentPath和SVNPath,网上说他们的区别是

SVNParentPath:支持多个具备相同父目录的Subversion版本库。 SVNPath:只支持一个父目录的Subversion版本库

 

 

我的目录是/home/svn/repos 其中repos是版本库 

我尝试多少次后发现正确SVNParentPath配置的是 

<Location /svn> 
DAV svn 
SVNParentPath /home/svn/
AuthType Basic 
AuthName "Documentation Team Repository" 
AuthUserFile /home/svn/password 
Require valid-user 

</Location>  

这样启动apache后,localhost/svn是不可以访问的  需要访问localhost/svn/repos才可以

 

SVNPath的配置是:

<Location /repos> 
DAV svn 
SVNPath /home/svn/repos 
AuthType Basic 
AuthName "Documentation Team Repository" 
AuthUserFile /home/svn/password 
Require valid-user 

</Location>  

 直接访问localhost/repos就可以了

 

至于其他高级一些的配置,我暂时还没去尝试。。 

 

 另外还需要说明的是,可能是SELinux的原因,会报权限错误: 

[Fri Dec 23 09:44:21 2011] [error] [client 192.168.1.102] (13)Permission denied: Could not open password file: /home/svn/repos/password
[Fri Dec 23 09:44:21 2011] [error] [client 192.168.1.102] access to /repos failed, reason: verification of user id 'test' not configured

需要修改SVN目录的权限配置  chcon -R -h -t httpd_sys_content_t /home/svn

posted on 2011-12-22 23:34  return null;  阅读(1663)  评论(1编辑  收藏  举报