CentOS 安装、配置 Subversion 官方文档勘误

CentOS 官方 Wiki 上有一篇关于 Subversion 安装的说明。

按照这个按照说明,你不能访问你的 SVN。

原文链接:http://wiki.centos.org/HowTos/Subversion

如果你完全按照这个教程来做,你可能会得到下面的显示内容:

在完成第1、2步后,指南上说:
Go test out whether or not you can access your repository from a web browser: http://yourmachine/repos.

You should get a popup box asking for a username and password.

If so, type in your credentials and you should be displayed with a Revision 0:/ page.

但是事实是你得到的只能是Forbidden, don’t have permission的错误:[code]Forbidden

You don’t have permission to access /repos on this server.
Apache/2.2.3 (CentOS) Server at cn.hawebs.net Port 80[/code]这里正确的步骤是:

  • 在/etc/conf.d/subversion.conf里配置的SVNPath /var/www/svn/repos是根目录

  • 在/var/www/svn/repos/下用svnadmin create workdir 来创建一个库

  • [root@cn repos]# chown -R apache.apache oss 给予apache的权限

  • service httpd restart来重启apache

  • 访问 http://localhost/repos/workdir

这样才是正确访问的做法,指南上的其他部分都没有问题。