DistroWatch.com News——From FreeBSD to Debian GNU/Linux
http://distrowatch.com/weekly.php?issue=20070924#sitenews
After last week's DDoS attack on DistroWatch.com and the subsequent server operating system switch from FreeBSD to Debian GNU/Linux, many readers have asked about the reasons for this move. Did I lose my trust in FreeBSD? Or were there other reasons that prompted the move? With such questions being asked both in the DistroWatch forums and in emails filling my inbox during the week, I thought it would be best to answer them here, rather than replying individually to each person who wanted an explanation.
在上周经历了对DistroWatch.com的DDos攻击之后,服务器操作系统从FreeBSD切换到 Debian GNU/Linux,很多读者询问这次迁移的原因。难道我失去了对FreeBSD的信任?或者是其他原因促使的?整整一周,不论在DistroWatch 论坛里,还是在充满收件箱的E-Mail中,这些问题一直被问到。我想在这里回答是最好的选择,而不是单独回答每一个寻求解答的人。
First thing first: no, I have no problem with FreeBSD as an operating system. Ever since I started running DistroWatch on a dedicated server, I always used Debian - until November 2004, that is, when I switched to FreeBSD. The reason? I needed some features in PHP 5 which was not yet officially supported in the then stable version of Debian. With Debian GNU/Linux 3.1 "sarge" in perpetual delay, I decided to switch to what many consider to be one of the best server operating systems on the market - FreeBSD.
首先,不,我对FreeBSD作为一个操作系统没有任何疑问。从我开始在一个专用服务器上运行 DistroWatch开始,我一直使用Debian,一直到2004年11月我才迁移到FreeBSD。原因是什么?我需要使用到PHP5的一些特性, 而这个尚未被Debian的Stable版本所正式支持。由于Debian GNU/Linux 3.1 "sarge"长期拖延,我决定迁移到FreeBSD,它被很多人认为是商业领域最好的服务器操作系统。
Then last week came the devastating DDoS attack. When the technician responsible for the server finally disconnected the server from all outside traffic, he found that no services were responding on the server. His solution was to bring in a new hard disk, install a fresh copy of FreeBSD and mount the existing hard disks to investigate the problem. That's exactly what he did, so finally I was able to connect to the server and start getting the web site back online.
上个星期遭受了破坏性的DDoS攻击,当服务器的技术响应者最后切断所 有到服务器的外部连接,他发现服务器上没有任何服务响应。他的解决方法是拿来一个新的硬盘,安装一个全新的FreeBSD,然后挂在旧的硬盘来查找问题。 他做的非常正确,我最终能够连接服务器,并让网站重新在线。
And there I was - looking at a very basic FreeBSD installation. With my first priority being the need to get DistroWatch up and running as soon as possible, I was about to start configuring the system, installing the necessary ports, and restoring the essential services. Normally, I'd consider this a fairly enjoyable task, were it not for the fact that it was getting late and I was feeling increasingly tired. "Ah, if only it were Debian and not FreeBSD," I told myself, "everything would be up and running in a snap!" Then, rather than spending a better part of the night setting up a fresh FreeBSD installation, I decided to ask the technician to install Debian instead.
接下来我看着这套仅完成非常基本安装的FreeBSD。我需要做的第一件事是尽快的让 DistrWatch启动并运行,我将要开始配置这个系统,安装必须的ports软件,恢复必须的服务。通常我认为这是一个还算有意思的任务,但事实上现 在已经晚了,我感到越来越疲惫。"哦,如果这不是FreeBSD而是Debian",我最自己说:“所有上线和运行要做的事情将会是小菜一碟。”
And that's the simple explanation for the switch: setting up a Debian system is just so much faster than setting up a FreeBSD system. Even if one would choose to run a binary FreeBSD (as opposed to taking advantage of FreeBSD's famous ports), it would still take longer than with Debian. An example: let's install the NTP server on both operating systems. In Debian, issuing "apt-get install ntp" not only downloads and installs the application, it also starts the NTP daemon, synchronises the system clock with one of the servers from the pre-configured configuration file, sets up logging, and sets up NTP to start at boot. Contrast that with FreeBSD where, after compiling NTP, you would have to do all these tasks manually - not a difficult job, but still considerably more time consuming than the same on Debian. This is just one example - there are many others.
这就是对迁移事件所做的简单解释:安 装配置一个Debian系统确实要比安装配置FreeBSD系统要快得多。就算你选择运行一个二进制的FreeBSD(尽管享受不到FreeBSD著名的 ports带来的优点),仍然会花费比Debian更长的时间。例如:让我们在两套操作系统上建立NTP服务器。在Debian上执行命令"apt- get install ntp"的结果是,不仅下载并安装了程序,也启动了NTP守护进程,从预配置文件中找到某个服务器同步了本机的时钟,设置好了日志,设置了NTP系统启动 时自动运行。对比FreeBSD上的操作,在编译完NTP之后,你需要手工完成所有这些工作,虽然不是太难的事情,但是很明显比起Debian来说耗费了 更多事件。这只是一个例子,还有很多。
At the end of the day, the decision between running a Debian server and a FreeBSD server is fairly simple: if you want to run the latest software and have the time to baby-sit your server (remember that on FreeBSD, most security updates require compiling the kernel or the userland or both), then choose FreeBSD. But if you want to set up your server and then pretty much forget about it, then Debian is a better choice. With not having any special reason for wanting to run the latest and greatest, Debian seemed to me like an ideal solution.
到了最后,决定到底运行Debian服务器还是FreeBSD服务器,就非常简单了:如果你想运行最新的软 件,也有很多时间照看你的服务器(记住,在FreeBSD上,很多安全补丁需要编译内核或用户层,或者两者都有),那么请选择FreeBSD。如果你想安 装配置好你的服务器,然后几乎不再管它,那么Debian就是更好的选择。由于没有任何特殊的理由想去运行最新最好的软件,对我来说Debian看来是最 好的方案了。
One final observation that might interest some readers: the daily Page Hit Ranking updates is generated from log files by a bash scrīpt, which is launched by cron every day just after midnight GMT (it counts the clicks for the previous day, then performs all the necessary additions and divisions on the data before generating the HTML tables). On FreeBSD 6.2, the scrīpt normally completed its run in about 40 minutes. On Debian 4.0, the same now takes about 130 minutes. You draw your own conclusions!
最后有个发现,可能会有一些读者感兴趣:每天的页面点击统计的更新,由一个bash脚本产生于日 志文件,这个每天格林威治时间午夜之后由cron运行(它统计前一天的点击,然后在生成HTML表格之前执行必要的数据加减)。在FreeBSD 6.2上,这个脚本一般需要大约40分钟完成运行,在Debian 4.0上,同样的工作现在花费130分钟。请您作出自己的选择。