1999 年底翻譯的 FreeBSD 文件。
December 1999
1999年12月
--------------------------------------------------------------------------------
By 1999 Juha Saarinen
--------------------------------------------------------------------------------
一個免費的作業系統如何才能成為一些技術本位的大型公司的青睞?讓我們注意幾個最被重視的條件,例如傑出的系統保全、強健的網路服務,以及數量不斷成長的應用程式。Juha Saarinen的投稿讓我們一窺FreeBSD 3.3版的特性。
How does a free Operating System (OS) become the darling of some large and tech savvy companies? By paying attention to the things that count most, like phenomenal security, robust network services, and a growing array of applications. Contributing editor Juha Saarinen gives us a look at version 3.3.
FreeBSD 3.3是一套強固的作業系統,適合用來擔任Internet/Intranet主機職務。
FreeBSD 3.3,耐心地搞定她,你會如有神助。
在Unix系統管理工作上受夠了像Linux,Windows NT這類「小兒科」作業系統的晦氣之後,我想是該介紹BSD血統的系統來銷弭這些抱怨聲音了。
FreeBSD 3.3. Robust OS well suited for Internet/Intranet Deployment.
FreeBSD 3.3: patience, and power will be yours
After enduring plenty of taunts from UNIX admins over my use of "toy" operating systems like Linux and Windows NT, I thought it was time to check out one of the BSD variants to see what the noise is all about.
首先,我應該要說明這篇評論???
First, I should warn you that this review is written by a Linux weenie that arrived at that particular brand of UNIX via NetWare and Windows NT. No sandals, beads and tie-dye content ahead, in other words, so flames for the lack thereof won't be entertained.
對於那些像我一樣至今仍是Unix世界門外漢的人們而言,BSD是Berkeley Software Design的意思,在加州的一所大學誕生???。本篇評論並不打算更深入地探究Unix歷史,但我們可以說,BSD已經充分發展並已成熟。
For those like me who've existed on the outskirts of the UNIX universe until now, BSD means Berkeley Software Design, and originated at that university in California and harks back to the beginning of time (in computing terms), i.e. the 1970s. Delving further into UNIX history is outside the scope of this review, but suffice to say, BSD has had plenty of time to develop and mature.
目前有四種BSD系統,各有其擅長之處:
Currently, there are four flavors of BSD, each with its own niche:
OpenBSD,是最強調安全的系統(www.openbsd.org)。
OpenBSD, which emphasizes security above all (www.openbsd.org);
NetBSD,主要的目標是能在各種平台上執行(www.netbsd.org)。
NetBSD, which has machine independence as the main goal (www.netbsd.org);
BSDI,商業版本(www.bsdi.com);以及
BSDI, the commercial version (www.bsdi.com); and
FreeBSD,我所嘗試過的一套針對Intel x86平台作最佳化的系統(www.freebsd.org)。就像她的名字,這是一套以BSD 4.4為基礎且可以完全免費下載來使用的系統。別以為她能繼續發展下去全是因為她是免費的:FreeBSD擔任了目前網路上一些廣受歡迎網站的主機,例如Walnut Creek(www.cdrom.com),Hotmail,MP3.com,Yahoo以及US West。同時還有使用FreeBSD的雙CPU機器叢集在處理Warner Bros' The陣列的特殊效果。
FreeBSD, the Intel x86 optimized distribution that I tried (www.freebsd.org).
As the name implies, the BSD 4.4-based FreeBSD costs nothing to download and use. Don't think that because it's free, it it's not up to snuff: FreeBSD powers the sites of some real 'Net heavy-hitters such as Walnut Creek (www.cdrom.com), Hotmail, MP3.com, Yahoo and US West. A 32-machine dual-CPU FreeBSD cluster was also used to render special effects for Warner Bros' The Matrix.
最最小需求狀況下,FreeBSD可以在只有5MB記憶體的386SX機器上執行,並且可以相當順利地在???。我沒有辦法知道FreeBSD到底支援幾顆CPU,但看起來至少是四顆,也許八顆也是可以。同也FreeBSD也有在Compaq/Digital Alpha晶片上執行的版本。
At a pinch, FreeBSD can run on an aging 386SX with 5MB RAM, but it scales pretty well, and can do SMP on Intel MPS spec motherboards. I wasn't able to find out how many CPUs FreeBSD supports, but it looks like it's at least four, and perhaps as many as eight. There is also a version of FreeBSD that runs on the Compaq/Digital Alpha CPU.
FreeBSD最多可以處理高達4GB的記憶體以及檔案大小為1TeraByte的檔案。比較看看,Linux只能吃下1GB的記憶體(也許2GB),且只能處理最大為2GB的檔案。不幸地,FreeBSD的FFS檔案系統沒有內建journaling capability,在系統當機或不正常關機的情況下,檢查檔案系統時會花掉較多時間。
The most RAM FreeBSD can handle is 4GB and the practical maximum file size is 1 terabyte. In comparison, Linux stops at 1GB RAM (2GB possible) and a max file size of 2GB. Unfortunately, there's no journaling capability built into the FreeBSD FFS file system. In the event of a system crash or improper shutdown, you're looking at long file system check times.
雖然FreeBSD的硬體相容列表似乎比Linux來得差一點,但她支援其他同樣血統系統所沒有的技術,例如USB。一般來說,知名品牌的PC裝備都有支援,除非你的機器裡頭有非常奇怪的裝備,否則FreeBSD都可以正確執行。但多媒體裝備就麻煩了,FreeBSD可以支援音效卡,但支援的3D加速卡就非常有限,目前尚不支援DVD。換句話說,FreeBSD適合用來當伺服器的作業系統,所以並不對多媒體多所著墨。
Even though the hardware compatibility list looks a bit lean compared to Linux, FreeBSD supports technologies its Open Source cousin doesn't, such as USB. Big brand name PC devices are generally supported, so unless you have some very exotic gear in your box, FreeBSD should work with it. The exception is multimedia devices. FreeBSD's support for sound cards, and 3D accelerators is quite limited; DVD isn't supported at all. On the other hand, FreeBSD is mostly a server OS, so multimedia isn't that high on the target market's wish list.
輕鬆的安裝…
FreeBSD本來就是以網路為設計理念,所以最受歡迎的安裝方式就是過ftp,雖然透過CD-ROM安裝也有相同的安裝介面,但前者有可以取得最新的FreeBSD版本。當然,足夠的網路頻寬是首要之務:以我在5Mbps的ADSL網路上安裝為例,幾乎花掉一天中的精華時段。你可能會想要下載並安裝STABLE版本來取代RELEASE版本,那你需要找到提供STABLE版本的ftp站台,如果可能的話。
Installation's a breeze...
True to it's 'Net-centric nature, the preferred way to install FreeBSD is via ftp. 'Net installs present you with an identical interface to CD ROM installs, but have the added bonus of being more up-to-date than the latter method. Of course, a fat Internet pipe is a prerequisite: even with my 5Mbps ADSL line, the installation took the best part of the day. You should aim to download and install the STABLE version instead of the RELEASE one, if possible; check the ftp mirror you're connecting for the appropriate files.
開始安裝之前,你需要下載兩個磁碟影像檔,利用這兩個檔案製作開機片。開機後可以透過選單式工具程式規劃你的核心程式。如果對自己的硬體相當熟悉的話,這個步驟是很簡單易懂的。完成後你可以透過另一個選單式工具程式選擇『新手、快速或自訂』模式來安裝FreeBSD。
To get started, simply download two disk image files and create two floppies, boot up the system and configure the kernel with a menu-driven utility. This is all pretty straightforward as long as you're familiar with the hardware in your machine. After kernel configuration is done, you are presented with another menu driven interface, offering Novice, Express and Custom alternatives for the installation process.
我沒有試過快速模式,但是自訂模式比新手模式少了幾個選項,並且似乎提供所有FreeBSD需要的檔案。
I didn't try "Express", but the "Custom" alternative didn't finish whereas the "Novice" option did and seemed to offer everything necessary to get FreeBSD going.
硬碟分割同樣也不困難。我決定把FreeBSD放在我的Compaq P2-400伺服器的第二顆硬碟上大小為4GB的分割區上。但我認為系統自動分配大部分的空間給 /usr後,剩下來分給 /(root),/var,/home分割區就太小了。根據我先前使用Linux時分配磁碟空間的經驗,我決定配置500MB給 /var,300MB給 /,以及260MB的swap分割區,其餘的空間再分給 /home和 /usr。
Disk partitioning isn't that difficult either. I decided to put FreeBSD on a 4GB partition on the second hard disk on my Compaq P2-400 server, but thought the suggested partition layout offered too little space for the / (root), /var and /home partitions, whilst assigning most of the space to /usr. Based on my previous experience on how Linux uses disk space, I decided on 500MB for /var, 300MB for /, a 260MB swap partition, and the rest split between /home and /usr.
以下是我第一次安裝FreeBSD的失敗經驗:FreeBSD相當倚重 /usr,所以安裝了80%後中斷了,並且得把一些目錄symlink到其他分割區去。
This was my first installation "gotcha": FreeBSD makes heavy use of the /usr, so I ended up with it being 80% full right from the start and later had to symlink a number of directories to other partitions to free up space.
我避免產生第二次失敗紀錄的方法是部要選”All”,也就是不要安裝所有的FreeBSD套件。從一大堆選單裡挑出你要的套件是件相當冗長乏味的事,但這是必經之路,除非你有無限空間的硬碟可用。FreeBSD編有數量龐大的軟體列表,尤其是發展系統用的工具,而且也都是免費的。
I avoided a second installation gotcha by not selecting "All", i.e. installing everything in the FreeBSD distribution. Picking what you need from a very extensive list of options is tedious, but necessary, unless you have masses of disk space to burn. FreeBSD has a huge catalogue of software available for it, especially development tools; it's all free too.
接下來需規劃妳的網路組態,這就和安裝Xfree86 3.3.5一樣簡單。安裝完成後,我重新開機並且有了一個可以正常執行的FreeBSD。
The installer also configures your networking for you, as well as XFree86 3.3.5 without hiccoughs. After chugging away for most of the day and busting my monthly data volume allocation, the installer finished, I rebooted, and had a working FreeBSD installation.
但是,面臨痛苦的系統環境設定…
接下來是難以搞定的東西。如果你是Linux使用者,首先會注意到logon後所見到的不再是你熟悉的東西。我習慣性地到 /etc裡頭找系統設定;但FreeBSD不但有 /etc,還有個 /usr/local/etc,大部分和系統相關的設定都放在後者。
...but configuration agonizing
Now came the tricky stuff. If you come from Linux, the first thing you notice after logging on is that things aren't where you're used to. I'm accustomed to look for configuration files in /etc; FreeBSD does have an /etc directory, but also a /usr/local/etc in which many important system config files are stored.
來看看系統管理工具,嗯,如果你希望有像Linuxconf或是Caldera's COAS admin的工具軟體,那恐怕得讓你失望了。所謂管理FreeBSD,意思就是需要大量的編輯各種設定檔。幸運的是,安裝時系統會幫你設定合理的預設值,且大部分的設定檔都有完整的文件可以參考,但這樣的情況對一個Unix新手無疑地是個絆腳石。
In terms of system management tools, well, if you were hoping for something along the lines of the Linuxconf or Caldera's COAS admin utilities, forget about it. Managing FreeBSD means hand editing configuration files a-plenty. Luckily, the installation leaves you with sensible defaults and the config files themselves are in most cases well documented, but this is definitively a stumbling block for UNIX newbies.
要正確地設定系統,你需要好好研讀HTML版本的FreeBSD手冊,但即使是這樣精采絕倫的文件,還是存在沒有涵蓋到的主題。舉例來說,/boot目錄存有許多和載入核心相關的設定檔,但手冊裡頭卻甚少提到。
The HTML FreeBSD Handbook is necessary reading for a successful system configuration, but even with the help of this excellent document, there are areas that are not covered. For instance, the /boot directory contains a number of config files for the loading the kernel; the documentation on these is pretty sparse.
也許你應該做的第一件設定工作就是更新你的系統,我發現有個CVSup工具程式可以很簡單地幫你作更新系統的工作。找個離你最近的CVSup伺服器,編輯一下 /usr/share/examples/cvsup,然後就可以利用CVSup下載並更新你的系統原始程式,以及針對FreeBSD移植的大量軟體。如果你跑X Window,CVSup提供一個漂亮的使用者介面,讓你觀看下載進度,當然你也可以在文字模式下作這件事。
Probably the first configuration task you should undertake is to update your system. I found the included CVSup utility the easiest way to accomplish this with. Locate a CVSup server near you, edit the CVSup config file in /usr/share/examples/cvsup and use CVSUP to download and update your system code source files, and the third-party software in the big FreeBSD ports collection. If you've got X running, CVSup presents you with a neat graphical user interface which shows what's going on, but you can run CVSup from a terminal as well.
更新原始程式後,你必須重新編譯這些程式。這個步驟是很簡單的:進入 /usr/src路徑後,敲入「make&」以及「make install」就可以建立你的新系統。對於這種方式,我有兩種心情,其一是它提供了彈性及控制權,但我需煩惱該如何修改設定以增加效能,以及該重新編譯哪一個部分;其二是這真是件耗時的工作,在裝有128MB記憶體的P2-400機器上,它花了我2個鐘頭。讓我根本不想在配備更少量記憶體的486或是Pentium機器重複這件工作。同時你得知道你正在作什麼,因為若發生錯誤,你得到結果可能是個死掉的系統。
After the system sources have been updated, you need to rebuild them. This is relatively simple: enter /usr/src and type make && make install and new system binaries are built for you. I'm in two minds about this approach: on the one hand, it offers flexibility and control. I was able to tweak compiler settings for added performance and pick which parts of the system I wanted to rebuild. On the other hand, it's a time-consuming process. On my P2-400 with 128MB RAM, it took about two hours. I wouldn't want to repeat the experience on a 486 or even a Pentium PC with less memory. You also need to know what you're doing, because if things go wrong, you could end up with a dead system.
更新你的系統程式碼後,你可能因為要增減對硬體的支援而重新編譯核心程式,同時也可以針對你的CPU而改善執行效率。在FreeBSD編譯核心可比Linux來得快多了,但你仍得慶幸自己有部快速的機器來作這件事。當我花了近一天時間在更新KDE GUI時,我真渴望能有像Red Hat的RPM這樣的管理工具,可以讓我在我五分鐘內完成這種工作。
Having updated the system sources, you'll probably want to recompile the FreeBSD kernel to add and subtract support for hardware you have and don't have, as well as to optimize it for the CPU in your system. Configuring and compiling the FreeBSD kernel is much faster than the same operation under Linux, but you're still glad to have a fast PC at the end of the day. By the time I had spent about a day updating the KDE GUI, I was longing for a package management system along the lines of Red Hat's RPM that would have done the job in five minutes.
相關的資源,質佳卻量少:
Linux最棒的一件事,就是她豐富的資源。你可以透過NewsGroup、MailList及數量龐大的網站取得其他使用者及發展人員的豐富經驗及知識。
Support resources good but scarce
One of the best things about Linux is how well supported it is. You can draw up on the experience and knowledge of other users and developers in Internet newsgroups, mailing lists and a myriad of Web sites.
FreeBSD也有相類似的資源,但數量不及Linux。其中最主要的網站,www.freebsd.org,是FreeBSD世界中的指南針???
FreeBSD support works much the same, except it isn't as plentiful as for Linux. The main site, www.freebsd.org, is the cynosure of all things FreeBSD; there are a few more useful ones, but not anywhere near as many as for the various Linux distributions.
商業性軟體支援的程度較難估計;我確信在某處一定有相關資訊,但總不像VALinux那樣有個組織來得方便。
Commercial support is harder to gauge; I'm sure it's out there, somewhere, but there doesn't appear to be any firms such as VALinux that specialize in FreeBSD systems.
如果你虛心地在網路論壇上發問,無論你的問題是如何的菜,總能得到回答。然而,在FreeBSD世界裡你得篤信『天助自助者』這句話,除了自己嘗試,你大概找不到更好的辦法來累積經驗。如果你是像FreeBSD這類型的Unix新手,你得準備相當多的時間來搞懂這個免費的作業系統,肯定讓你有得研究的。
If you ask politely for help in Internet forums, you tend to get reply, no matter how newbie your questions are. However, FreeBSD helps those who help themselves, and there's no substitute for trying things out to build experience. If you're new to UNIX, FreeBSD style, set aside a good amount of time for studying how things are done with this free OS. It'll pay off in the long run.
相反地,???。這很可能是個讓人感到沮喪的經驗。
Conversely, it doesn't really pay to jump head first into FreeBSD without any UNIX background. This is likely to be a frustrating experience.
結論
沒有人會懷疑FreeBSD是一套堅固耐用且快速的作業系統。她已經證實是一套媲美商業產品的作業系統,足以擔任網路伺服器所需要的安全性要求。但要完全發揮她的能力前,你得先花時間了解FreeBSD,尤其是她那盤根錯節的系統設定程序。
Conclusion
There's no doubt that FreeBSD is rock-solid and fast. It has proven itself as a commercial-grade Internet server that's secure and exceedingly affordable. To make the most of it however, you'll need plenty of time to explore FreeBSD and come to grips with the convoluted system configuration process.
FreeBSD, Inc.
http://www.freebsd.org/
沒有留言:
張貼留言