用于管理远程专用服务器上的站点的版本控制建议
你好 我们是一家小型 Web 开发公司,拥有 3 个 Lunarpages 专用 Plesk/Apache/MySQL/CentOS 服务器,每个服务器托管大约 70 个网站。我们通过 ftp 连接,每台服务器将我们的站点存放在文件夹中,即 /var/www/vhosts/[domain]/httpdocs
我们的一位程序员已经移居海外,目前我们的“版本控制”只是让他下载最新版本在开始工作之前,他可以从 ftp 上查看他正在处理的所有文件。这并不理想,并且不允许我们在一个站点上同时工作,而且我们已经遇到了他覆盖我的更改等问题。
我一直在寻找一种将版本控制集成到我们正在做的事情中的方法。
我查看过 beanstalkapp、codesion 等在线服务,但它们要么限制一个帐户上的存储库数量(我们有很多站点),要么限制您可以连接的 ftp 服务器数量。
所以我目前的想法是在专用服务器上安装 git (我相当精通 UNIX)并使用前端客户端(mac 和 pc)来检查管理更改。
有没有人对在我们的情况下实施版本控制的最佳方法有经验或建议?
预先非常感谢
卢卡斯
Hi
We're a small web development company with 3 Lunarpages dedicated Plesk/Apache/MySQL/CentOS servers hosting around 70 websites each. We connect via ftp and each server houses our sites in folders i.e. /var/www/vhosts/[domain]/httpdocs
One of our programmers has moved overseas, and for now our "version control" is to just have him download the latest versions of any files he's working on from the ftp before he starts work. Not ideal, and doesnt allow us to work concurrently on one site, and we've already had problems with him overwriting my changes and so on.
I've been looking for a way to integrate version control into what we're doing.
I've looked at online services like beanstalkapp, codesion etc but they either restrict the number of repositories on an account (we have a lot of sites) or they limit how many ftp servers you can connect to.
So my current thinking is to install git (I'm fairly UNIX-savvy) on the dedicated servers and use a front end client (mac and pc) to check out manage changes.
Does anyone have experience or recommendations on the best way to implement version control in our situation?
Many thanks in advance
Lucas
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
首先,我会切换到 ssh/scp 而不是 ftp。 ssh 更安全。
一旦 ssh 就位,在这些机器上安装 git 就非常简单了。您可以使用 cron 作业进行结帐来更新站点(我想您不希望 httpdocs 中存在 .git 目录)。
git(或 Mercurial)的优点是你的同事不必每次提交都在线,这将使更改历史记录更加简洁。
First of all, I'd switch to ssh/scp instead of ftp. ssh is much more secure.
Once ssh is in place, it's pretty simple to install git on those machines. You can do the checkouts using a cron job to update the sites (I suppose you don't want a .git directory in yout httpdocs).
Advantage of git (or mercurial for that matter) is that your colleague does not have to be on line for every commit he makes, which will make the change history much more concise.
Git 本身不需要“专用服务器”。您只需要拥有一台所有用户都可以访问的计算机即可。
其次,git 中并不存在“服务器端”和“客户端”的概念。这是分布式版本控制所独有的,也是与 SVN 的主要区别。
我首先会阅读git 概念简介。
Git doesn't need a "dedicated server" per se. You just need to have a machine that is accessible by all your users.
Secondly, there aren't really the concepts of 'server-side' and 'client-side' in git. This is unique to distributed version control, and is a main distinction from SVN.
I would start by reading an introduction to git concepts.
在我看来,你的想法是正确的。我托管自己的 Git 存储库,即使是我自己处理的东西也是如此。如果您需要托管,可以从 Github 购买封闭存储库托管。但如果您不希望这样,则托管 Git 所需的只是 sshd。
Your thoughts are spot-on, in my opinion. I host my own Git repositories, even for stuff that I work on by myself. If you need hosting, you can purchase closed repository hosting from Github. But if you don't want that, all you need to host Git is sshd.