简体   繁体   English

SVN + Apache:存储存储库的位置

[英]SVN+Apache: Where to store repositories

I have been keeping all my Subversion repositories on my local computer for a while, but now I decided to move them to my web hosting server. 我一直在我的本地计算机上保留所有Subversion存储库一段时间,但现在我决定将它们移动到我的网络托管服务器上。 It's an apache server and the hosting company has set up svn. 这是一个apache服务器,托管公司已经建立了svn。 My question is, where should I store my svn repositories. 我的问题是,我应该在哪里存储我的svn存储库。 I originally stored them in the public_html/ directory, but (I'm certainly no security expert) I think only publicly available web content should be stored there. 我最初将它们存储在public_html/目录中,但是(我当然不是安全专家)我认为只有公共可用的Web内容才能存储在那里。 On the other hand, if I try storing the repositories in ~/var/svn/ then my subversion client (Eclipse) says "no element found". 另一方面,如果我尝试将存储库存储在~/var/svn/那么我的subversion客户端(Eclipse)会说“找不到元素”。 How do other people store their repositories with regards to Apache? 其他人如何存储关于Apache的存储库? Thank you. 谢谢。

You can select any physical location for your repositories collection, because logical path is defined inside Apache (Location container + SVNPath|SVNParentPath) later. 您可以为存储库集合选择任何 物理位置,因为稍后在Apache(位置容器+ SVNPath | SVNParentPath)中定义逻辑路径。 You have only 你只有

  • select big partition (repository may require a lot of space) 选择大分区(存储库可能需要大量空间)
  • don't forget chown|chmod repo dirs, in order to give Apache process the ability to handle files of repository 不要忘记chown | chmod repo dirs,以便为Apache进程提供处理存储库文件的能力

/var (/var/repos/) is good candidate for repo-root / var(/ var / repos /)是repo-root的良好候选者

Typically, you would store data in an appropriate subdirectory of /var (not ~/var ), that is if you have access to it. 通常,您将数据存储在/var (不是~/var )的相应子目录中,即如果您有权访问它。 Eg /var/svn 例如/var/svn

We haven't adopted SVN for our web source yet, but have been using CVS. 我们还没有为我们的网络源采用SVN,但一直在使用CVS。 Our solution was to simply prevent Apache from serving the CVS store using IndexIgnore 我们的解决方案是简单地阻止Apache使用IndexIgnore为CVS商店提供服务

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

You may be able to do something similar, using something based upon .svn . 您可以使用基于.svn东西做类似的事情。

It will be difficult if you are using a shared web hosting, because you need to have an access to root, to create svn-group and creating the structure of the repository. 如果您使用共享Web托管将很困难,因为您需要访问root,创建​​svn-group并创建存储库的结构。 You also need to install some module on Apache like dav_svn. 您还需要在Apache上安装一些模块,如dav_svn。 You will need to create a VirtualHost (sites-available) in order to serve your repos over a specific DNS. 您需要创建VirtualHost(站点可用)才能通过特定DNS提供回购。

There is a lot of tutorial on the inter-webs -> http://www.debuntu.org/how-to-subversion-svn-with-apache2-and-dav/ (for ubuntu) 互联网上有很多教程 - > http://www.debuntu.org/how-to-subversion-svn-with-apache2-and-dav/ (对于ubuntu)

Me, I rent a Virtual Private Server to host my SVN. 我,我租用一个虚拟专用服务器来托管我的SVN。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM