远程虚拟主机上的 SVN 服务器/存储库?

发布于 2024-12-10 02:32:03 字数 414 浏览 0 评论 0原文

我的愿望很简单,但显然又很复杂。

作为一名编程学生,我接触到了 SVN,确切地说是 TortoiseSVN。 我们获得了存储库的 url,如下所示: www.schoolderp.com/svn/project1

这非常棒,但现在我们想要启动一些私人项目。 因此,我们使用 TortoiseSVN 创建了一个存储库,将其上传到网络主机并尝试通过存储库浏览器查看它..当然不可能那么简单..呸!

因此,在过去的几天里,我一直在网上搜索答案,但我陷入困境。

我读过很多需要 Apache 的地方,但是当我读到 Apache 时,似乎它是我需要在我的机器上运行的一项服务,或者我只是愚蠢?

所以 atm 我几乎要疯了,并且希望有一个非常简单的解释来说明如何做,在我的网络主机上启动并运行 svn 服务器:/

提前非常感谢..

My wish is pretty simple, yet so complex, aparrently.

As a programming-student, I was introduced to SVN, TortoiseSVN to be exact.
We were given a url to the repository, which looked something like:
www.schoolderp.com/svn/project1

That is great and all, but now we want to get some private projects going.
So with TortoiseSVN we created a repository, uploaded it to a webhost and tried to view it through the repo-browser.. Ofcourse it couldnt be that simple.. bah!

So for the last couple of days, i've searched the web for answers, but im stuck.

I've read alot of places that Apache is needed, but when I read about Apache, it seems that it is a service i need to run on my machine, or am I just stupid?

So atm i pretty much going insane, and would LOVE a really simple explanation on what to do, to get a svn server up and running on my webhost :/

Thanks alot in advance..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

心在旅行 2024-12-17 02:32:03

你需要一个服务器(虚拟的或真实的)来运行 svn。简单的 Web 主机不提供 svn 服务器所需的功能。
作为替代方案,您可以在多个 svn 服务器上拥有自己的私有存储库。

SVN 主机

You need a server (virtual or real) to run svn. A simple webhost does not provide the features needed for an svn server.
As an alternative there are several svn servers where you can have your own private repositories.

SVN Hoster

我最亲爱的 2024-12-17 02:32:03

如果你想设置 svn 服务器,你将需要 root 权限。但是,您可以使用其他一些免费的 svn 托管服务,并且可以像存储库浏览器一样在网络上查看源文件。

http://unfuddle.com/

You will need a root privilege if you want to setup svn server. However, you can use some other free svn hosting services and can see the source files on the web just like a repo-browser.

http://unfuddle.com/

甩你一脸翔 2024-12-17 02:32:03

如果您正在运行一些私人服务器,并且无法访问 VPS 或专用服务器(并且您的教育机构无法帮助您在其部门 IP 地址之一上进行设置),那么也许一种解决方案是使用 VisualSVN for Windows(假设您使用的是 Windows)。有了这个,您可以在您正在使用的 PC(或笔记本电脑)上设置存储库,然后使用 dyndns(或其他动态名称/IP 映射服务)之类的东西将您的 PC/笔记本电脑的 IP 映射到 webdomain,如 oursvn.yourwebsite .com。通过一些配置,您可以通过映射到“当前”IP 地址的 url 访问您的 SVN 服务器(即使在便携式笔记本电脑上)。

这可能不是一条简单的路线,但却是一条低成本的 DIY 路线。

VisualSVN ( http://www.visualsvn.com/ ) 相对容易设置。动态 IP/URL 映射服务可以免费或付费,如果您在 VisualSVN 中创建用户和存储库,您可以自己控制访问。 (如果这是您认为适合的解决方案,请下载右侧的服务器版本。)如果

做不到这一点,有第三方服务提供商可以为您提供一系列价格的 SVN 托管。

http://beanstalkapp.com/pricing [不是建议,只是作为示例参考]

http://dyn.com/dns/dyndns-free/ [同样也不是推荐,只是一个例子]

if you're running some private ones, and don't have access to a VPS or Dedicated server (and your educational institution can't help you set this up on one of their departmental IP addresses), then perhaps one solution may be to use VisualSVN for Windows (Assuming you're using windows). With this you can set up the Repositories on a PC that you're using (or Laptop) and then use something like dyndns (or another dynamic name/ip mapping service) to map your PC/Laptop's IP to a webdomain like oursvn.yourwebsite.com. With some configuration, you can get your SVN server to be accessible (even on a portable laptop) from a url that maps to your 'current' ip address.

This may not be a simple route to go down, but it's a low cost, DIY route.

VisualSVN ( http://www.visualsvn.com/ ) is relatively easy to set up. Dynamic IP/url mapping services can be free or paid and if you create your users and repositories in VisualSVN, you can have control over the accesses yourself. (Download the server version on the right if this is a solution you think would suit.)

Failing that, there are third party service providers who can offer you SVN hosting for a range of prices.

http://beanstalkapp.com/pricing [not a recommendation, just as an example reference]

http://dyn.com/dns/dyndns-free/ [again also not a recomandation, just an example]

云之铃。 2024-12-17 02:32:03

SVN-repo 和网站在共同点上关系较弱

  1. Dreamhost 在其普通托管包内提供 SVN
  2. 您可以使用任何(免费或非)SVN 托管
  3. 您可以创建语言环境存储库(使用 TSVN)并使用 file:// 协议进行访问(仅本地)
  4. 您可以创建本地存储库并通过 svn:// 协议(可联网)使用 svnserve 为其供电

SVN-repo and website are weakly related in common

  1. Dreamhost offer SVN inside it's ordinary hosting package
  2. You can use any (free or not) SVN-hosting
  3. You can create locale repo (with TSVN) and use file:// protocol for access (only locally)
  4. You can create local repo and power it by svn:// protocol (networkable) with svnserve
物价感观 2024-12-17 02:32:03

Apache 只是托管 Subversion 存储库的方式之一。 Subversion 使用三种协议来为其存储库提供服务:

  • http:(和 https:)
  • file:
  • svn:

最简单的是 file:。您所要做的就是在本地计算机上创建一个存储库,然后使用 file: 协议简单地指向它。下载 SlikSVN。这是一个命令行驱动的客户端,但它包含可用于创建存储库的 svnadmin 命令:

C:\repository> svnadmin create myrepos

现在,在 TortoisSVN 中,指向非 http://www.schoolderp.com/svn/project1,但是文件://C/repository/myrepos。请注意使用的不同协议!您应该能够从新创建的 myrepos 存储库中签出。 (它将是空的,因此那里不会有任何文件或目录,但您可以创建它们并重新签入它们。

file: 协议的问题是您必须处于本地系统,它并不能很好地处理多个用户,但是,如果您使用 TortoiseSVN,并且它是您自己的私人项目,那么

另一种可能性是使用 svnserve 。使用以下命令运行存储库svn: 协议实际上比 http: 更快,因为开销更少,但每个服务器实例只能有一个存储库,而使用 http 则可以有多个存储库。在单个 Apache httpd 实例上运行

C:\repository> svnadmin create myrepos
C:\repository> notepad myrepos\conf\svnserve.conf
C:\repository> notepad myrepos\conf\passwd
C:\repository> svnserve -r myrepos -d
C:\repository>

myrepos\conf\svnserve.conf 文件是存储库的配置文件,您需要更改 ###password- 行。 db = passwd 到从行的开头删除 ###

会将 密码数据库设置为 passwd 文件。有一个示例可以用作模板。您所需要做的就是在 [users] 部分下添加用户名及其密码。例如:david = Swordfish 会将用户 david 的密码设置为 swordfish

现在,您可以将 TortoiseSVN 指向 svn://localhost 并从存储库中签出。您的朋友还可以从同一存储库中签出,并将您的计算机名称替换为 localhost 。

因此,您必须创建一个 Subversion 存储库,但使用 svncreate 命令非常容易完成。您可以立即通过 file:// 协议访问它,而无需执行任何其他操作。如果您想与其他人共享此存储库,则需要使用 svnserve 命令来运行 SVN 服务器,但这也很容易做到。

我建议您阅读Subversion 在线手册。前几章将让您基本了解 Subversion 的工作原理以及如何使用 Subversion svn 命令,该命令是您下载并安装的 SlikSVN 客户端的一部分。服务器基础知识位于第 5 章以及有关使用svnserve 在第 6 章

Apache is just one of the ways of hosting a Subversion repository. Subversion uses three protocols for serving its repository:

  • http: (and https:)
  • file:
  • svn:

The simplest is file:. All you have to do is create a repository on your local machine, and simply point to it using the file: protocol. Download SlikSVN. This is a command line driven client, but it includes the svnadmin command that you can use to create repositories:

C:\repository> svnadmin create myrepos

Now, in TortoisSVN, point to not http://www.schoolderp.com/svn/project1, but file://C/repository/myrepos. Note the different protocol used! You should be able to checkout from your newly created myrepos repository. (It will be empty, so there won't be any files or directories there, but you can create them and check them back in.

The problem with the file: protocol is that you have to be on the local system and it doesn't really handle multiple users very well. But, if you're using TortoiseSVN, and its your own private project, it works pretty well.

The other possibility is to use svnserve to run the repository using the svn: protocol. This is actually faster than http: because there's less overhead, but you can only have a single repository per server instance while with http, you can have multiple repositories running on a single Apache httpd instance.

C:\repository> svnadmin create myrepos
C:\repository> notepad myrepos\conf\svnserve.conf
C:\repository> notepad myrepos\conf\passwd
C:\repository> svnserve -r myrepos -d
C:\repository>

The myrepos\conf\svnserve.conf file is the configuration file for your repository. You'll need to change the line that says ###password-db = passwd to remove the ### from the beginning of the line. This sets the password database to the passwd file.

You'll need to create the passwd file. There's a sample one you can use as a template. All you need is to add under the [users] section the name of the user and their password. For example: david = swordfish would set user david's password to swordfish.

Now, you can point TortoiseSVN to svn://localhost and check out from your repository. Your friends can also checkout from the same repository substituting your machine name for localhost.

So, you have to create a Subversion repository, but it's pretty easy to do with the svncreate command. And you can immediately access it via the file:// protocol without doing anything else. If you want to share this repository with other people, you need to use the svnserve command to run the SVN server, but that's also pretty easy to do.

I recommend that you go through the Subversion online manual. The first few chapters will give you a basic understanding of how Subversion works and how to use the Subversion svn command which is part of the SlikSVN client you downloaded and installed. The server fundamentals are in Chapter 5 and information about using svnserve is in chapter 6.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文