diff --git a/zh_CN.GB2312/books/handbook/bibliography/chapter.sgml b/zh_CN.GB2312/books/handbook/bibliography/chapter.sgml index 4e689ac5c2..f58aebeb4f 100644 --- a/zh_CN.GB2312/books/handbook/bibliography/chapter.sgml +++ b/zh_CN.GB2312/books/handbook/bibliography/chapter.sgml @@ -1,673 +1,674 @@ 参考文献 尽管手册页能够提供对于 FreeBSD 操作系统最为权威的参考资料,它们有时却不能告诉我们如何让整个系统很好地运转起来。 因此,一本关于 &unix; 系统管理的好书,以及一份好的用户手册是不可或缺的。 关于 FreeBSD 的专业书籍与杂志 非英文的书籍和杂志: FreeBSD 入门与应用 (繁体中文), 出版商: Drmaster, 1997. ISBN 9-578-39435-7. FreeBSD 技术内幕(简体中文译本), 机械工业出版社。ISBN 7-111-10201-0。 FreeBSD 使用大全 第一版 (简体中文), 机械工业出版社。ISBN 7-111-07482-3。 FreeBSD 使用大全 第二版 (简体中文), 机械工业出版社。ISBN 7-111-10286-X。 FreeBSD Handbook (第二版简体中文译本), 人民邮电出版社。ISBN 7-115-10541-3。 FreeBSD 3.x Internet 高级服务器的架设与管理 (简体中文), 清华大学出版社。ISBN 7-900625-66-6。 FreeBSD & Windows 集成组网实务 (简体中文), 中国铁道出版社。 ISBN 7-113-03845-X。 FreeBSD 网站架设实务 (简体中文), 中国铁道出版社。ISBN 7-113-03423-3。 FreeBSD for PC 98'ers (日文, 出版商:SHUWA System Co, LTD. ISBN 4-87966-468-5 C3055 P2900E。 FreeBSD (日文, 出版商:CUTT. ISBN 4-906391-22-2 C3055 P2400E. Complete Introduction to FreeBSD (日文), 出版商:Shoeisha Co., Ltd. ISBN 4-88135-473-6 P3600E. Personal UNIX Starter Kit FreeBSD (日文), 出版商:ASCII. ISBN 4-7561-1733-3 P3000E. FreeBSD Handbook (日文译本), 出版商:ASCII. ISBN 4-7561-1580-2 P3800E. FreeBSD mit Methode (德文), 出版商:Computer und Literatur Verlag/Vertrieb Hanser, 1998. ISBN 3-932311-31-0. FreeBSD 4 - Installieren, Konfigurieren, Administrieren (德文), 出版商:Computer und Literatur Verlag, 2001. ISBN 3-932311-88-4. FreeBSD 5 - Installieren, Konfigurieren, Administrieren (德文), 出版商: Computer und Literatur Verlag, 2003. ISBN 3-936546-06-1. FreeBSD de Luxe (德文), 出版商: Verlag Modere Industrie, 2003. ISBN 3-8266-1343-0. FreeBSD Install and Utilization Manual (日文), 出版商: Mainichi Communications Inc.,1998. ISBN 4-8399-0112-0. Onno W Purbo, Dodi Maryanto, Syahrial Hubbany, Widjil Widodo Building Internet Server with FreeBSD (印尼文), 出版商: Elex Media Komputindo. Absolute BSD: The Ultimate Guide to FreeBSD (繁体中文) 出版商: GrandTech Press, 2003. ISBN 986-7944-92-5. The FreeBSD 6.0 Book (繁体中文), 出版商:Drmaster, 2006. ISBN 9-575-27878-X. 英文版的书籍和杂志: - Absolute - BSD: The Ultimate Guide to FreeBSD, 出版商: - No Starch Press, 2002. - ISBN: 1886411743 + Absolute + FreeBSD, 2nd Edition: The Complete Guide to FreeBSD, + 出版商: No Starch Press, 2007. + ISBN: 978-1-59327-151-0 The Complete FreeBSD, 出版商: O'Reilly, 2003. ISBN: 0596005164 The FreeBSD Corporate Networker's Guide, 出版商: Addison-Wesley, 2000. ISBN: 0201704811 FreeBSD: An Open-Source Operating System for Your Personal Computer, 出版商: The Bit Tree Press, 2001. ISBN: 0971204500 Teach Yourself FreeBSD in 24 Hours, 出版商: Sams, 2002. ISBN: 0672324245 FreeBSD 6 Unleashed,出版商: Sams, 2006. ISBN: 0672328755 FreeBSD: The Complete Reference, 出版商: McGrawHill, 2003. ISBN: 0072224096 BSD Magazine, 出版商: Software Press Sp. z o.o. SK. ISSN 1898-9144 用户指南 Computer Systems Research Group, UC Berkeley. 4.4BSD User's Reference Manual. O'Reilly & Associates, Inc., 1994. ISBN 1-56592-075-9 Computer Systems Research Group, UC Berkeley. 4.4BSD User's Supplementary Documents. O'Reilly & Associates, Inc., 1994. ISBN 1-56592-076-7 UNIX in a Nutshell. O'Reilly & Associates, Inc., 1990. ISBN 093717520X Mui, Linda. What You Need To Know When You Can't Find Your UNIX System Administrator. O'Reilly & Associates, Inc., 1995. ISBN 1-56592-104-6 Ohio State University 编写了一份 UNIX 介绍性课程 ,并提供在线的 HTML 和 PostScript 版本。 这份文档的意大利文 翻译 是 FreeBSD Italian Documentation Project 的一部分。 Jpman Project, Japan FreeBSD Users Group. FreeBSD User's Reference Manual (日文译本). Mainichi Communications Inc., 1998. ISBN4-8399-0088-4 P3800E. Edinburgh University has written an Online Guide for newcomers to the UNIX environment. 管理员指南 Albitz, Paul and Liu, Cricket. DNS and BIND, 4th Ed. O'Reilly & Associates, Inc., 2001. ISBN 1-59600-158-4 Computer Systems Research Group, UC Berkeley. 4.4BSD System Manager's Manual. O'Reilly & Associates, Inc., 1994. ISBN 1-56592-080-5 Costales, Brian, et al. Sendmail, 2nd Ed. O'Reilly & Associates, Inc., 1997. ISBN 1-56592-222-0 Frisch, Æleen. Essential System Administration, 2nd Ed. O'Reilly & Associates, Inc., 1995. ISBN 1-56592-127-5 Hunt, Craig. TCP/IP Network Administration, 2nd Ed. O'Reilly & Associates, Inc., 1997. ISBN 1-56592-322-7 Nemeth, Evi. UNIX System Administration Handbook. 3rd Ed. Prentice Hall, 2000. ISBN 0-13-020601-6 Stern, Hal Managing NFS and NIS O'Reilly & Associates, Inc., 1991. ISBN 0-937175-75-7 Jpman Project, Japan FreeBSD Users Group. FreeBSD System Administrator's Manual (日文译本). Mainichi Communications Inc., 1998. ISBN4-8399-0109-0 P3300E. Dreyfus, Emmanuel. Cahiers de l'Admin: BSD 2nd Ed. (in French), Eyrolles, 2004. ISBN 2-212-11463-X 开发指南 Asente, Paul, Converse, Diana, and Swick, Ralph. X Window System Toolkit. Digital Press, 1998. ISBN 1-55558-178-1 Computer Systems Research Group, UC Berkeley. 4.4BSD Programmer's Reference Manual. O'Reilly & Associates, Inc., 1994. ISBN 1-56592-078-3 Computer Systems Research Group, UC Berkeley. 4.4BSD Programmer's Supplementary Documents. O'Reilly & Associates, Inc., 1994. ISBN 1-56592-079-1 Harbison, Samuel P. and Steele, Guy L. Jr. C: A Reference Manual. 4th ed. Prentice Hall, 1995. ISBN 0-13-326224-3 Kernighan, Brian and Dennis M. Ritchie. The C Programming Language. 2nd Ed. PTR Prentice Hall, 1988. ISBN 0-13-110362-8 Lehey, Greg. Porting UNIX Software. O'Reilly & Associates, Inc., 1995. ISBN 1-56592-126-7 Plauger, P. J. The Standard C Library. Prentice Hall, 1992. ISBN 0-13-131509-9 Spinellis, Diomidis. Code Reading: The Open Source Perspective. Addison-Wesley, 2003. ISBN 0-201-79940-5 Spinellis, Diomidis. Code Quality: The Open Source Perspective. Addison-Wesley, 2006. ISBN 0-321-16607-8 Stevens, W. Richard and Stephen A. Rago. Advanced Programming in the UNIX Environment. 2nd Ed. Reading, Mass. : Addison-Wesley, 2005. ISBN 0-201-43307-9 Stevens, W. Richard. UNIX Network Programming. 2nd Ed, PTR Prentice Hall, 1998. ISBN 0-13-490012-X Wells, Bill. Writing Serial Drivers for UNIX. Dr. Dobb's Journal. 19(15), December 1994. pp68-71, 97-99. 操作系统原理 Andleigh, Prabhat K. UNIX System Architecture. Prentice-Hall, Inc., 1990. ISBN 0-13-949843-5 Jolitz, William. Porting UNIX to the 386. Dr. Dobb's Journal. 1991年1月 - 1992年6月 Leffler, Samuel J., Marshall Kirk McKusick, Michael J Karels and John Quarterman The Design and Implementation of the 4.3BSD UNIX Operating System. Reading, Mass. : Addison-Wesley, 1989. ISBN 0-201-06196-1 Leffler, Samuel J., Marshall Kirk McKusick, The Design and Implementation of the 4.3BSD UNIX Operating System: Answer Book. Reading, Mass. : Addison-Wesley, 1991. ISBN 0-201-54629-9 McKusick, Marshall Kirk, Keith Bostic, Michael J Karels, and John Quarterman. The Design and Implementation of the 4.4BSD Operating System. Reading, Mass. : Addison-Wesley, 1996. ISBN 0-201-54979-4 (这本书的第二章的 在线版本 是 FreeBSD Documentation Project 的一部分, 另外, 第九章可以在 这里 找到。) Marshall Kirk McKusick, George V. Neville-Neil The Design and Implementation of the FreeBSD Operating System. Boston, Mass. : Addison-Wesley, 2004. ISBN 0-201-70245-2 Stevens, W. Richard. TCP/IP Illustrated, Volume 1: The Protocols. Reading, Mass. : Addison-Wesley, 1996. ISBN 0-201-63346-9 Schimmel, Curt. Unix Systems for Modern Architectures. Reading, Mass. : Addison-Wesley, 1994. ISBN 0-201-63338-8 Stevens, W. Richard. TCP/IP Illustrated, Volume 3: TCP for Transactions, HTTP, NNTP and the UNIX Domain Protocols. Reading, Mass. : Addison-Wesley, 1996. ISBN 0-201-63495-3 Vahalia, Uresh. UNIX Internals -- The New Frontiers. Prentice Hall, 1996. ISBN 0-13-101908-2 Wright, Gary R. and W. Richard Stevens. TCP/IP Illustrated, Volume 2: The Implementation. Reading, Mass. : Addison-Wesley, 1995. ISBN 0-201-63354-X 信息安全方面的参考文献 Cheswick, William R. and Steven M. Bellovin. Firewalls and Internet Security: Repelling the Wily Hacker. Reading, Mass. : Addison-Wesley, 1995. ISBN 0-201-63357-4 Garfinkel, Simson and Gene Spafford. Practical UNIX & Internet Security. 2nd Ed. O'Reilly & Associates, Inc., 1996. ISBN 1-56592-148-8 Garfinkel, Simson. PGP Pretty Good Privacy O'Reilly & Associates, Inc., 1995. ISBN 1-56592-098-8 硬件参考 Anderson, Don and Tom Shanley. Pentium Processor System Architecture. 2nd Ed. Reading, Mass. : Addison-Wesley, 1995. ISBN 0-201-40992-5 Ferraro, Richard F. Programmer's Guide to the EGA, VGA, and Super VGA Cards. 3rd ed. Reading, Mass. : Addison-Wesley, 1995. ISBN 0-201-62490-7 Intel 公司在他们的 开发人员网站上, 提供了关于他们的 CPU,芯片组,以及标准的文档。多数是PDF文件. Shanley, Tom. 80486 System Architecture. 3rd ed. Reading, Mass. : Addison-Wesley, 1995. ISBN 0-201-40994-1 Shanley, Tom. ISA System Architecture. 3rd ed. Reading, Mass. : Addison-Wesley, 1995. ISBN 0-201-40996-8 Shanley, Tom. PCI System Architecture. 4th ed. Reading, Mass. : Addison-Wesley, 1999. ISBN 0-201-30974-2 Van Gilluwe, Frank. The Undocumented PC, 2nd Ed. Reading, Mass: Addison-Wesley Pub. Co., 1996. ISBN 0-201-47950-8 Messmer, Hans-Peter. The Indispensable PC Hardware Book, 4th Ed. Reading, Mass: Addison-Wesley Pub. Co., 2002. ISBN 0-201-59616-4 &unix; 历史 Lion, John Lion's Commentary on UNIX, 6th Ed. With Source Code. ITP Media Group, 1996. ISBN 1573980137 Raymond, Eric S. The New Hacker's Dictionary, 3rd edition. MIT Press, 1996. ISBN 0-262-68092-0. 它也被称作 Jargon File Salus, Peter H. A quarter century of UNIX. Addison-Wesley Publishing Company, Inc., 1994. ISBN 0-201-54777-5 Simon Garfinkel, Daniel Weise, Steven Strassmann. The UNIX-HATERS Handbook. IDG Books Worldwide, Inc., 1994. ISBN 1-56884-203-1. Out of print, but available online. Don Libes, Sandy Ressler Life with UNIX — special edition. Prentice-Hall, Inc., 1989. ISBN 0-13-536657-7 BSD 族谱. 或在 FreeBSD 机器上的 /usr/share/misc/bsd-family-tree Networked Computer Science Technical Reports Library. Old BSD releases from the Computer Systems Research group (CSRG). : The 4CD set covers all BSD versions from 1BSD to 4.4BSD and 4.4BSD-Lite2 (but not 2.11BSD, unfortunately). The last disk also holds the final sources plus the SCCS files. 各种期刊 The C/C++ Users Journal. R&D Publications Inc. ISSN 1075-2838 Sys Admin — The Journal for UNIX System Administrators Miller Freeman, Inc., ISSN 1061-2688 freeX — Das Magazin für Linux - BSD - UNIX (德文) Computer- und Literaturverlag GmbH, ISSN 1436-7033 diff --git a/zh_CN.GB2312/books/handbook/desktop/chapter.sgml b/zh_CN.GB2312/books/handbook/desktop/chapter.sgml index dc380237c6..e38888b072 100644 --- a/zh_CN.GB2312/books/handbook/desktop/chapter.sgml +++ b/zh_CN.GB2312/books/handbook/desktop/chapter.sgml @@ -1,1084 +1,1093 @@ Christophe Juniet Contributed by 桌面应用 概述 FreeBSD 可以运行种类繁多的桌面应用程序, 这包括像浏览器和字处理这样的软件。 绝大多数这样的程序都可以通过 package 来安装, 或者从 Ports Collection 自动地构建。 许多新用户希望能够在它们的系统中找到这样的应用程序。 这一章将向您展示如何轻松地使用 package 或者 Ports Collection 中安装这样的软件。 需要注意的是从 ports 安装意味着要编译源码。 根据编译的 ports 和电脑速度的不同, 这可能需要花费相当长的时间。 若是您觉得编译源码太过耗时的话, 绝大多数 ports 也有预编译的版本可供安装。 因为 FreeBSD 提供的二进制兼容 Linux 的特性, 许多原本为 Linux 开发的程序都可以直接用在您的桌面。 在安装任何的 Linux 应用程序之前, 强烈的推荐您阅读 。 当您在寻找特定的 ports 时, 可以使用 &man.whereis.1;。 一般来说, 许多利用 Linux 二进制兼容特性的 ports 都以linux-开头。 在下面的介绍中,都假设安装 Linux 应用程序前已经开启了 Linux 二进制兼容功能。 本章涵盖以下种类应用程序: 浏览器 (例如 FirefoxOperaKonqueror) 办公、图象处理 (例如 KOfficeAbiWordGIMPOpenOffice.org) 文档查看 (例如 &acrobat.reader;gvXpdfGQview) 财务 (例如 GnuCashGnumericAbacus) 阅读这章之前,您应该: 知道如何安装额外的第三方软件()。 知道如何安装 Linux 软件()。 想要获得更多的有关多媒体环境的信息,请阅读 。如果您想要建立和使用电子邮件, 请参考 浏览器 浏览器 web FreeBSD并没有预先安装特定的浏览器。然而,在 ports 的目录 www 有许多浏览器可以安装。如果您没有时间一一编译它们 (有些时候这可能需要花费相当长的时间) 大部分都有 package 可用。 KDEGNOME 已经提供 HTML 浏览器。 请参考得到更多完整的有关设定这些桌面环境的信息。 如果您要找小型的浏览器, 可以试试看 www/dillo2www/linkswww/w3m 这一节涉及如下程序: 程序名称 资源需求 安装时间 主要依赖 Firefox 中等 Gtk+ Opera 轻松 同时有可用的 FreeBSD 和 Linux 版本。 Linux 版本需要使用 Linux 二进制兼容模块和 linux-openmotif Firefox 中等 Gtk+ Konqueror 中等 需要 KDE Firefox Firefox Firefox 是一个现代, 自由, 开放源代码稳定的浏览器, 并完全移植到了 &os; 上: 它的特性包括有一个非常标准的 HTML 显示引擎, 标签式浏览, 弹出窗口阻止, 扩展插件, 改进的安全性, 等等。 Firefox 是基于 Mozilla 的代码。 您可以通过输入下面的命令来安装预编译的包: &prompt.root; pkg_add -r firefox - 这将会安装 Firefox 2.X, - 如果你希望运行 Firefox 3.X, - 则执行如下的命令: + 这将会安装 Firefox 3.6, + 如果希望运行 Firefox 3.5, + 则应使用下面的命令: - &prompt.root; pkg_add -r firefox3 + &prompt.root; pkg_add -r firefox35 如果你希望从源代码编译的话, 可以通过 Ports Collection 安装: &prompt.root; cd /usr/ports/www/firefox &prompt.root; make install clean - For Firefox 3.X, in the - previous command replace firefox with - firefox3. + 对于 Firefox 3.5, + 对应的命令中的 firefox 应改为 + firefox35 Firefox 与 &java; 插件 在这一节和下一节中, 我们均假定您已经安装了 Firefox + + 目前, &java; 插件还不能够配合 + Firefox 3.6 使用。 &os; 基金会拥有来自 Sun Microsystems 的关于发布针对 &os; 的预编译版本的 Java 运行环境 (&jre;) 和 Java 开发包 (&jdk;) 的授权。 用于 &os; 的预编译版本可以在 &os; 基金会 网站上找到。 要为 Firefox 添加 &java; 支持,您必须首先安装 java/javavmwrapper port。 接下来, 从 下载 Diablo &jre; 软件包, 并使用 &man.pkg.add.1; 来安装它。 启动浏览器, 并在地址栏中输入 about:plugins 然后按 Enter。 浏览器将给出一个页面, 其中会显示已经安装的插件, 您应在这个列表中找到 &java; 插件。 如果不是这样的话, 每个用户则需要运行如下命令: - &prompt.user; ln -s /usr/local/diablo-jre1.6.0/plugin/i386/ns7/libjavaplugin_oji.so \ + &prompt.user; ln -s /usr/local/diablo-jre1.6.0/plugin/i386/ns7/libjavaplugin_oji.so \ $HOME/.mozilla/plugins/ or, if you installed the Diablo &jdk; package: - &prompt.user; ln -s /usr/local/diablo-jdk1.6.0/jre/plugin/i386/ns7/libjavaplugin_oji.so \ + &prompt.user; ln -s /usr/local/diablo-jdk1.6.0/jre/plugin/i386/ns7/libjavaplugin_oji.so \ $HOME/.mozilla/plugins/ - 然后重新启动浏览器。 + 然后重启浏览器。 + + + 以上命令假定您使用的是 + &arch.i386; 平台, 不过, 我们也提供适用于 &arch.amd64; + 的预编译包。 + Firefox 与 ¯omedia; &flash; 插件 Flash ¯omedia; &flash; 插件并没有直接提供其 &os; 版本。 不过, 我们有一个软件层 (wrapper) 可以用来运行 Linux 版本的插件。 这个 wrapper 也支持 &adobe; &acrobat;、 RealPlayer 和很多其他插件。 根据你 &os; 版本的不同选择相应的安装步骤: &os; 7.X 安装 www/nspluginwrapper port。 这个 port 需要安装一个较大的emulators/linux_base-fc4 port。 下一步是安装 www/linux-flashplugin9 port。 这将会安装 &flash; 9.X, 此版本目前能在 &os; 7.X 上正常运行。 在比 &os; 7.1-RELEASE 更旧版本的系统上, 你必须安装 www/linux-flashplugin7 并跳过以下 &man.linprocfs.5; 的部份。 &os; 8.X 安装 www/nspluginwrapper port。 这个 port 需要安装一个较大的emulators/linux_base-f10 port。 下一步是安装 www/linux-f10-flashplugin10 port。 这将会安装 &flash; 10.X, 此版本目前能在 &os; 8.X 上正常运行。 这个版本需要创建一个符号链接: &prompt.root; ln -s /usr/local/lib/npapi/linux-f10-flashplugin/libflashplayer.so \ /usr/local/lib/browser_plugins/ Once the right &flash; port, according to the &os; version you run, is installed, the plugin must be installed by each user with nspluginwrapper: 按照 &os; 版本, 在安装了正确的 &flash; port 之后, 插件必须由每个用户运行 nspluginwrapper 安装: &prompt.user; nspluginwrapper -v -a -i 如果希望播放 &flash; 动画的话,&linux; 的进程文件系统, &man.linprocfs.5; 必须挂载于 /usr/compat/linux/proc。 可以通过以下的命令实现: &prompt.root; mount -t linprocfs linproc /usr/compat/linux/proc 这也可以在机器启动时自动挂载, 把以下这行加入 /etc/fstab linproc /usr/compat/linux/proc linprocfs rw 0 0 然后就可以打开浏览器, 并在地址栏中输入 about:plugins 然后按下 Enter。 这将显示目前可用的插件列表。 Firefox and Swfdec &flash; Plugin Swfdec 是一个用以解码和渲染 &flash; 动画的库。 Swfdec-Mozilla 是一个使用了 Swfdec 库让 Firefox 能播放 SWF 文件的插件。它目前仍处于开发状态。 如果你不能或者不想编译安装,可以通过网络安装二进制包: &prompt.root; pkg_add -r swfdec-plugin 如果二进制包还不可用,你可以通过 Ports Collection 编译安装: &prompt.root; cd /usr/ports/www/swfdec-plugin &prompt.root; make install clean 然后重启你的浏览器使得这个插件生效。 Opera Opera Opera 是一个功能齐全, 并符合标准的浏览器。 它还提供了内建的邮件和新闻阅读器、 IRC 客户端, RSS/Atom feed 阅读器以及更多功能。 除此之外, Opera 是一个比较轻量的浏览器, 其速度很快。 它提供了两种不同的版本: native FreeBSD 版本, 以及通过 Linux 模拟运行的版本。 要使用 Opera 的 FreeBSD 版本来浏览网页,安装以下的 package: &prompt.root; pkg_add -r opera 有些 FTP 站点没有所有版本的 package, 但仍然可以通过 Ports 套件来安装 Opera &prompt.root; cd /usr/ports/www/opera &prompt.root; make install clean 要安装 Linux 版本的 Opera,将上面例子中的 opera 替换为 linux-opera。Linux 版本在某些情况下非常有用,象是使用只有 Linux 版本的插件,例如 Adobe &acrobat.reader;。就其它方面来说, FreeBSD 和 Linux 版本的功能是完全一样的。 Konqueror Konqueror KonquerorKDE 的一部分,不过也可以通过安装 x11/kdebase3 在非 KDE 环境下使用。 Konqueror 不止是一个浏览器, 也是一个文件管理器和多媒体播放器。 也有种类丰富的插件能够配合 Konqueror 一起使用, 您可以通过 misc/konq-plugins 来安装它们。 Konqueror 也支持 &flash;; 关于如何获得用于 Konqueror&flash; 支持的 How To 文档 可以在 找到。 办公、图象处理 当需要进行办公或者进行图象处理时, 新用户通常都会找一些好用的办公套件或者字处理软件。 尽管目前有一些 桌面环境, 如 KDE 已经提供了办公套件, 但目前这还没有一定之规。 无论您使用那种桌面环境, FreeBSD 都能提供您需要的软件。 这节涉及如下程序: 软件名称 资源需求 安装时间 主要依赖 KOffice KDE AbiWord Gtk+GNOME The Gimp Gtk+ OpenOffice.org &jdk;Mozilla KOffice KOffice 办公套件 KOffice KDE 社区提供了一套办公套件, 它能用在桌面环境。它包含四个标准的组件,这些组件可以在其它办公套件中找到。 KWord 是字处理程序、 KSpread 是电子表格程序、 KPresenter 是演示文档制作管理程序、 Kontour是矢量绘图软件。 安装最新的 KOffice 之前,先确定您是否安装了最新版的 KDE 使用 package 来安装 KOffice,安装细节如下: &prompt.root; pkg_add -r koffice 如果没有可用的 package,您可以使用 Ports Collection 安装。 安装 KDE3KOffice 版本,如下: &prompt.root; cd /usr/ports/editors/koffice-kde3 &prompt.root; make install clean AbiWord AbiWord AbiWord 是一个免费的字处理程序,它看起来和 µsoft; Word 的感觉很相似。 它适合用来打印文件、信函、报告、备忘录等等, 它非常快且包含许多特性,并且非常容易使用。 AbiWord 可以导入或输出很多文件格式, 包括一些象 µsoft; .doc 这类专有格式的文件。 AbiWord 也有 package 的安装方式。您可以用以下方法安装: &prompt.root; pkg_add -r abiword 如果没有可用的 package,它也可以从 Ports Collection 编译。ports collection 应该是最新的。它的安装方式如下: &prompt.root; cd /usr/ports/editors/abiword &prompt.root; make install clean GIMP GIMP 对图象的编辑或者加工, GIMP 是一个非常精通图象处理的软件。 它可以被用来当作简单的绘图程序或者一个专业的照片处理套件。 它支持大量的插件和具有脚本界面的特性。 GIMP 可以读写众多的文件格式, 支持扫描仪和手写板。 您可以用下列命令安装: &prompt.root; pkg_add -r gimp 如果您在 FTP 站点没有找到这个 package,您也可以使用 Ports Collection 的方法安装。ports 的 graphics 目录也包含有 Gimp 手册。 以下是安装它们的方法: &prompt.root; cd /usr/ports/graphics/gimp &prompt.root; make install clean &prompt.root; cd /usr/ports/graphics/gimp-manual-pdf &prompt.root; make install clean Ports 中的 graphics 目录也有开发中的 GIMP 版本 graphics/gimp-devel。 HTML 版本的 Gimp 手册 可以在 graphics/gimp-manual-html 找到。 OpenOffice.org OpenOffice.org 办公套件 OpenOffice.org OpenOffice.org 包括一套完整的办公套件: 字处理程序、 电子表格程序、 演示文档管理程序和绘图程序。 它和其它的办公套件的特征非常相似,它可以导入输出不同的流行的文件格式。 它支持许多种语言 — 国际化已经渗透到了其界面、 拼写检查和字典等各个层面。 OpenOffice.org 的字处理程序使用 XML 文件格式使它增加了可移植性和灵活性。 电子表格程序支持宏语言和使用外来的数据库界面。 OpenOffice.org 已经可以平稳的运行在 &windows;、&solaris;、Linux、FreeBSD 和 &macos; X 等各种操作系统下。 更多的有关 OpenOffice.org 的信息可以在 OpenOffice.org 网页 找到。 对于特定的 FreeBSD 版本的信息,您可以在直接在 FreeBSD OpenOffice 移植团队的页面下载。 安装 OpenOffice.org 方法如下: &prompt.root; pkg_add -r openoffice.org 如果您正在使用 &os; 的 -RELEASE 版本, 一般来说这样做是没问题的。 如果不是这样, 您就可能需要看一看 &os; OpenOffice.org 移植小组的网站, 并使用 &man.pkg.add.1; 从那里下载并安装合适的软件包。 最新的发布版本和开发版本都可以在那里找到。 装好 package 之后, 您只需输入下面的命令就能运行 OpenOffice.org 了: &prompt.user; openoffice.org 在第一次运行时, 将询问您一些问题, 并在您的主目录中建立一个 .openoffice.org 目录。 如果没有可用的 OpenOffice.org package,您仍旧可以选择编译 port。然而, 您必须记住它的要求以及大量的磁盘空间和相当长的时间编译。 &prompt.root; cd /usr/ports/editors/openoffice.org-3 &prompt.root; make install clean 如果希望联编一套进行过本地化的版本, 将前述命令行改为: &prompt.root; make LOCALIZED_LANG=your_language install clean 您需要将 your_language 改为正确的 ISO-代码。 所支持的语言代码可以在 files/Makefile.localized 文件中找到, 这个文件位于 port 的目录。 一旦完成上述操作, 就可以通过下面的命令来运行 OpenOffice.org 了: &prompt.user; openoffice.org 文档查看器 &unix; 系统出现以来, 一些新的文档格式开始流行起来; 它们所需要的标准查看器可能不一定在系统内。 本节中, 我们将了解如何安装它们。 这节涵盖如下应用程序: 软件名称 资源需求 安装时间 主要依赖 &acrobat.reader; Linux二进制兼容 gv Xaw3d Xpdf FreeType GQview Gtk+GNOME &acrobat.reader; Acrobat Reader PDF 查看器 现在许多文档都用 PDF 格式, 根据轻便小巧文档格式的定义。一个被建议使用的查看器是 &acrobat.reader;,由 Adobe 所发行的 Linux 版本。因为 FreeBSD 能够运行 Linux 二进制文件, 所以它也可以用在 FreeBSD 中。 要从 Ports collection 安装 &acrobat.reader; 8, 只需: &prompt.root; cd /usr/ports/print/acroread8 &prompt.root; make install clean 由于授权的限制, 我们不提供预编译的版本。 gv gv PDF 查看器 PostScript 查看器 gv 是 &postscript; 和 PDF 文件格式查看器。它源自 ghostview 因为使用 Xaw3d 函数库让它看起来更美观。 它很快而且界面很干净。gv 有很多特性比如象纸张大小、刻度或者抗锯齿。 大部分操作都可以只用键盘或鼠标完成。 安装 gv package,如下: &prompt.root; pkg_add -r gv 如果您无法获取预编译的包, 则可以使用 Ports collection: &prompt.root; cd /usr/ports/print/gv &prompt.root; make install clean Xpdf Xpdf PDF 查看器 如果您想要一个小型的 FreeBSD PDF 查看器, Xpdf 是一个小巧并且高效的查看器。 它只需要很少的资源而且非常稳定。它使用标准的 X 字体并且不需要 &motif; 或者其它的 X 工具包。 安装 Xpdf package,使用如下命令: &prompt.root; pkg_add -r xpdf 如果 package 不可用或者您宁愿使用 Ports Collection,如下: &prompt.root; cd /usr/ports/graphics/xpdf &prompt.root; make install clean 一旦安装完成,您就可以启动 Xpdf 并且使用鼠标右键来使用菜单。 GQview GQview GQview 是一个图片管理器。 您可以单击鼠标来观看一个文件、开启一个外部编辑器、 使用预览和更多的功能。它也有幻灯片播放模式和一些基本的文件操作。 您可以管理采集的图片并且很容易找到重复的。 GQview 可以全屏幕观看并且支持国际化。 如果您想要安装 GQview package,如下: &prompt.root; pkg_add -r gqview 如果您没有可用的 package 或者您宁愿使用 Ports Collection,如下: &prompt.root; cd /usr/ports/graphics/gqview &prompt.root; make install clean 财务 假如,基于任何的理由,您想要在 FreeBSD Desktop 管理您个人的财政,有一些强大并且易于使用的软件可以被您选择安装。 它们中的一些与流行的文件格式兼容象 QuickenExcel 文件。 本节涵盖如下程序: 软件名称 资源需求 安装时间 主要依赖 GnuCash GNOME Gnumeric GNOME Abacus Tcl/Tk KMyMoney KDE GnuCash GnuCash GnuCashGNOME 的一部分,GNOME 致力于为最终用户提供用户友好且功能强大的软件。使用 GnuCash,您可以关注您的收入和开支、您的银行帐户, 或者您的股票。它的界面特性看起来非常的专业。 GnuCash 提供一个智能化的注册、帐户分级系统、 很多键盘快捷方式和自动完成方式。它能分开一个单个的处理到几个详细的部分。 GnuCash 能导入和合并 Quicken QIF 文件格式。 它也支持大部分的国际日期和流行的格式。 在您的系统中安装 GnuCash 所需的命令如下: &prompt.root; pkg_add -r gnucash 如果 package 不可用,您可以使用 Ports Collection 安装: &prompt.root; cd /usr/ports/finance/gnucash &prompt.root; make install clean Gnumeric Gnumeric 电子表格 Gnumeric Gnumeric 是一个电子表格程序, GNOME 桌面环境的一部分。 它以通过元素格式和许多片断的自动填充系统来方便的自动猜测用户输入而著称。 它能导入一些流行的文件格式,比如象 ExcelLotus 1-2-3Quattro ProGnumeric 凭借 math/guppi 支持图表。 它有大量的嵌入函数和允许所有通常比如象、数字、货币、日期、 时间等等的一些单元格式。 以 package 方式安装 Gnumeric 的方法如下: &prompt.root; pkg_add -r gnumeric 如果 package 不可用,您可以使用 Ports Collection 安装: &prompt.root; cd /usr/ports/math/gnumeric &prompt.root; make install clean Abacus Abacus spreadsheet Abacus Abacus 是一个小巧易用的电子表格程序。 它包含许多嵌入函数在一些领域如统计学、财务和数学方面很有帮助。 它能导入和输出 Excel 文件格式。 Abacus 可以产生 &postscript; 输出。 以 package 的方式安装 Abacus 的方法如下: &prompt.root; pkg_add -r abacus 如果 package 不可用,您可以使用 Ports Collection 安装: &prompt.root; cd /usr/ports/deskutils/abacus &prompt.root; make install clean KMyMoney KMyMoney spreadsheet KMyMoney KMyMoney 是一个 KDE环境下的个人财务管理软件。 KMyMoney 旨在提供并融合各种商业财务管理软件所有的重要特性。 它也同样注重易用性和特有的复式记帐功能。 KMyMoney 能从标准的 Quicken Interchange Format (QIF) 文件导入数据, 追踪投资,处理多种货币并能提供一个财务报告。 另有可用的插件支持导入 OFX 格式的数据。 以 package 的方式安装 KMyMoney 的方法如下: &prompt.root; pkg_add -r kmymoney2 如果 package 不可用,您可以使用 Ports Collection 安装: &prompt.root; cd /usr/ports/finance/kmymoney2 &prompt.root; make install clean 总结 尽管 FreeBSD 由于其高性能和可靠性而获得了许多 ISP 的信赖, 但它也完全可以用于桌面环境。 拥有数以千计的 packagesports 能够帮您迅速建立完美的桌面环境。 下面是本章涉及到的所有的软件的简要回顾: 软件名称 Package 名称 Ports 名称 Opera opera www/opera Firefox firefox www/firefox KOffice koffice-kde3 editors/koffice-kde3 AbiWord abiword editors/abiword The GIMP gimp graphics/gimp OpenOffice.org openoffice editors/openoffice.org-3 &acrobat.reader; acroread print/acroread8 gv gv print/gv Xpdf xpdf graphics/xpdf GQview gqview graphics/gqview GnuCash gnucash finance/gnucash Gnumeric gnumeric math/gnumeric Abacus abacus deskutils/abacus KMyMoney kmymoney2 finance/kmymoney2 diff --git a/zh_CN.GB2312/books/handbook/virtualization/chapter.sgml b/zh_CN.GB2312/books/handbook/virtualization/chapter.sgml index f2bfc680ce..df441808e3 100644 --- a/zh_CN.GB2312/books/handbook/virtualization/chapter.sgml +++ b/zh_CN.GB2312/books/handbook/virtualization/chapter.sgml @@ -1,1013 +1,1020 @@ Murray Stokely 原作 虚拟化 概述 虚拟化软件能够让同一台机器上同时运行多个操作系统。 在 PC 上, 这种系统通常由一个运行虚拟化软件的宿主操作系统, 以及一系列客户操作系统组成。 读完这章, 您将了解: 宿主操作系统与客户操作系统的区别。 如何在采用 &intel; 处理器的 &apple; &macintosh; 计算机上安装 &os;。 如何在包含 &xen; 的 Linux 上安装 &os;。 如何在 µsoft.windows; 以 Virtual PC 安装 &os;。 如何针对虚拟化环境对 &os; 系统进行性能调优。 在阅读这章之前, 您应: 理解 &unix; 和 &os; 的基础知识 ()。 了解如何安装 &os; ()。 了解如何配置网络连接 ()。 了解如何安装第三方软件 (). 作为客户 OS 的 &os; MacOS 上的 Parallels 为 &mac; 设计的 Parallels Desktop 是一种可用于采用 &intel; 处理器, 并运行 &macos; 10.4.6 或更高版本的 &apple; &mac; 计算机的商业软件。 它为 &os; 系统提供了完整的支持。 在 &macos; X 上安装了这个软件之后, 用户需要配置虚拟机并安装所需的客户操作系统。 在 Parallels/&macos; X 上安装 &os; 在 &macos; X/Parallels 上安装 FreeBSD 的第一步是创建一个新的虚拟机。 在系统提示选择客户 OS 类型 (Guest OS Type) 时选择 &os;, 并根据您使用 &os; 虚拟实例的需要分配磁盘和内存: 对多数在 Parallels 上使用 &os; 的情形而言, 4GB 磁盘空间和 512MB 的 RAM 就够用了: 选择使用的网络和网卡类型: 保存并完成配置: 在创建了 &os; 虚拟机之后, 还需要在其中安装 &os;。 最好的做法是使用官方的 &os; CDROM 或从官方 FTP 站点下载的 ISO 镜像来完成这个任务。 如果您的本地 &mac; 文件系统中有 ISO 映像文件, 或您的 &mac; 的 CD 驱动器中有 CDROM, 就可以在 &os; Parallels 窗口的右下角点击光盘图标。 之后, 系统将给出一个窗口, 供您完成将虚拟机中的 CDROM 驱动器连接到本地的 ISO 文件或真正的 CDROM 驱动器上。 在完成了将 CDROM 与您的安装源完成关联之后, 就可以按重启 (reboot) 图标来重启 &os; 虚拟机了。 Parallels 将配合一个特殊的 BIOS 启动, 后者能够像普通的 BIOS 一样检查系统中是否有 CDROM 驱动器。 此时, 它就能够找到 &os; 安装介质并开始 中所介绍的标准的基于 sysinstall 安装的过程。 此时您可以安装 X11, 但暂时不要对它进行配置。 在完成安装之后, 重启并进入新安装的 &os; 虚拟机。 在 &macos; X/Parallels 上配置 &os; 在您将 &os; 安装到 &macos; X 的 Parallels 上之后, 还需要进行一系列的配置, 以便为系统的虚拟化操作进行优化。 配置引导加载器变量 最重要的一步是通过调低 变量来降低 Parallels 环境中的 &os; 对 CPU 的使用。 这可以通过在 /boot/loader.conf 中增加下述配置来完成: kern.hz=100 如果不使用这个配置, 闲置的 &os; Parallels 客户 OS 会在单处理器的 &imac; 上使用大约 15% 的 CPU。 如此修改之后, 空闲时的使用量就减少到大约 5% 了。 创建新的内核配置文件 您可以删去全部 SCSI、 FireWire, 以及 USB 设备驱动程序。 Parallels 提供了一个由 &man.ed.4; 驱动的虚拟网卡, 因此, 除了 &man.ed.4; 和 &man.miibus.4; 之外的其他网络接口驱动都可以从内核中删去。 配置网络 最基本的网络配置, 是通过使用 DHCP 来将您的虚拟机与宿主 &mac; 接入同一个局域网。 这可以通过在 /etc/rc.conf 中加入 ifconfig_ed0="DHCP" 来完成。 更高级一些的网络配置方法, 请参见 中的介绍。 + + 在 Linux 上通过 &xen; 运行 &os; &xen; hypervisor 是一个开放源代码的并行虚拟化产品, 并由商业的 XenSource 公司提供支持。 在这种系统中, 客户操作系统称为 domU 域, 而宿主系统则称为 dom0。 在 Linux 上运行 &os; 虚拟机实例的第一步, 是安装用于 Linux dom0 的 &xen;。 在这个例子中, 宿主系统采用的发行版本是 Slackware Linux。 在 Linux dom0 上安装 &xen; 3 从 XenSource 下载 &xen; 3.0 下载 xen-3.0.4_1-src.tgz 解压缩源代码包 &prompt.root; cd xen-3.0.4_1-src &prompt.root; KERNELS="linux-2.6-xen0 linux-2.6-xenU" make world &prompt.root; make install 为 dom0 重新编译内核: &prompt.root; cd xen-3.0.4_1-src/linux-2.6.16.33-xen0 &prompt.root; make menuconfig &prompt.root; make &prompt.root; make install 对于较早版本的 &xen;, 可能需要指定 make ARCH=xen menuconfig 在 Grub 的 menu.lst 中增加一个对应的菜单项 编辑 /boot/grub/menu.lst 并在其中增加下列配置: title Xen-3.0.4 root (hd0,0) kernel /boot/xen-3.0.4-1.gz dom0_mem=262144 module /boot/vmlinuz-2.6.16.33-xen0 root=/dev/hda1 ro 重新启动计算机并进入 &xen; 首先, 编辑 /etc/xen/xend-config.sxp, 并在其中增加下列配置: (network-script 'network-bridge netdev=eth0') 接下来就可以运行 &xen; 了: &prompt.root; /etc/init.d/xend start &prompt.root; /etc/init.d/xendomains start 现在 dom0 已经开始运行: &prompt.root; xm list Name ID Mem VCPUs State Time(s) -Domain-0 0 256 1 r----- 54452.9 +Domain-0 0 256 1 r––––– 54452.9 &os; 7-CURRENT domU http://www.fsmware.com/ 下载用于 &xen; 3.0 的 &os; domU 内核。 kernel-current mdroot-7.0.bz2 xmexample1.bsd 将配置文件 xmexample1.bsd 放到 /etc/xen/ 并修改与内核及磁盘映像位置有关的配置项。 下面是一个示范的例子: kernel = "/opt/kernel-current" memory = 256 name = "freebsd" vif = [ '' ] disk = [ 'file:/opt/mdroot-7.0,hda1,w' ] #on_crash = 'preserve' extra = "boot_verbose" extra += ",boot_single" extra += ",kern.hz=100" extra += ",vfs.root.mountfrom=ufs:/dev/xbd769a" 其中, mdroot-7.0.bz2 应是未压缩的。 接下来, 您需要修改 kernel-current 中的 __xen_guest 小节, 并加入 &xen; 3.0.3 所需要的 VIRT_BASE: &prompt.root; objcopy kernel-current -R __xen_guest &prompt.root; perl -e 'print "LOADER=generic,GUEST_OS=freebsd,GUEST_VER=7.0,XEN_VER=xen-3.0,BSD_SYMTAB,VIRT_BASE=0xC0000000\x00"' > tmp -&prompt.root; objcopy kernel-current --add-section __xen_guest=tmp +&prompt.root; objcopy kernel-current ––add-section __xen_guest=tmp &prompt.root; objdump -j __xen_guest -s kernel-current kernel-current: file format elf32-i386 Contents of section __xen_guest: 0000 4c4f4144 45523d67 656e6572 69632c47 LOADER=generic,G 0010 55455354 5f4f533d 66726565 6273642c UEST_OS=freebsd, 0020 47554553 545f5645 523d372e 302c5845 GUEST_VER=7.0,XE 0030 4e5f5645 523d7865 6e2d332e 302c4253 N_VER=xen-3.0,BS 0040 445f5359 4d544142 2c564952 545f4241 D_SYMTAB,VIRT_BA 0050 53453d30 78433030 30303030 3000 SE=0xC0000000. 现在可以创建并运行 domU 了: &prompt.root; xm create /etc/xen/xmexample1.bsd -c Using config file "/etc/xen/xmexample1.bsd". Started domain freebsd WARNING: loader(8) metadata is missing! Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 7.0-CURRENT #113: Wed Jan 4 06:25:43 UTC 2006 kmacy@freebsd7.gateway.2wire.net:/usr/home/kmacy/p4/freebsd7_xen3/src/sys/i386-xen/compile/XENCONF WARNING: DIAGNOSTIC option enabled, expect reduced performance. Xen reported: 1796.927 MHz processor. Timecounter "ixen" frequency 1796927000 Hz quality 0 CPU: Intel(R) Pentium(R) 4 CPU 1.80GHz (1796.93-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf29 Stepping = 9 Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH, DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> Features2=0x4400<CNTX-ID,<b14>> real memory = 265244672 (252 MB) avail memory = 255963136 (244 MB) xc0: <Xen Console> on motherboard cpu0 on motherboard Timecounters tick every 10.000 msec [XEN] Initialising virtual ethernet driver. xn0: Ethernet address: 00:16:3e:6b:de:3a [XEN] Trying to mount root from ufs:/dev/xbd769a WARNING: / was not properly dismounted Loading configuration files. No suitable dump device was found. Entropy harvesting: interrupts ethernet point_to_point kickstart. Starting file system checks: /dev/xbd769a: 18859 files, 140370 used, 113473 free (10769 frags, 12838 blocks, 4.2% fragmentation) Setting hostname: demo.freebsd.org. lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff000000 Additional routing options:. Mounting NFS file systems:. Starting syslogd. /etc/rc: WARNING: Dump device does not exist. Savecore not run. ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/X11R6/lib /usr/local/lib a.out ldconfig path: /usr/lib/aout /usr/lib/compat/aout /usr/X11R6/lib/aout Starting usbd. usb: Kernel module not available: No such file or directory Starting local daemons:. Updating motd. Starting sshd. Initial i386 initialization:. Additional ABI support: linux. Starting cron. Local package initialization:. Additional TCP options:. Starting background file system checks in 60 seconds. Sun Apr 1 02:11:43 UTC 2007 FreeBSD/i386 (demo.freebsd.org) (xc0) login: 现在 domU 应该能运行 &os; 7.0-CURRENT 内核了: &prompt.root; uname -a FreeBSD demo.freebsd.org 7.0-CURRENT FreeBSD 7.0-CURRENT #113: Wed Jan 4 06:25:43 UTC 2006 kmacy@freebsd7.gateway.2wire.net:/usr/home/kmacy/p4/freebsd7_xen3/src/sys/i386-xen/compile/XENCONF i386 接下来可以在 domU 中配置网络了。 &os; domU 会使用一种称做 xn0 的专用网络接口: &prompt.root; ifconfig xn0 10.10.10.200 netmask 255.0.0.0 &prompt.root; ifconfig xn0: flags=843<UP,BROADCAST,RUNNING,SIMPLEX> mtu 1500 inet 10.10.10.200 netmask 0xff000000 broadcast 10.255.255.255 ether 00:16:3e:6b:de:3a lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff000000 在 dom0 Slackware 上 会出现一些 &xen; 专用的网络接口: &prompt.root; ifconfig eth0 Link encap:Ethernet HWaddr 00:07:E9:A0:02:C2 inet addr:10.10.10.130 Bcast:0.0.0.0 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:815 errors:0 dropped:0 overruns:0 frame:0 TX packets:1400 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:204857 (200.0 KiB) TX bytes:129915 (126.8 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:99 errors:0 dropped:0 overruns:0 frame:0 TX packets:99 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:9744 (9.5 KiB) TX bytes:9744 (9.5 KiB) peth0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:1853349 errors:0 dropped:0 overruns:0 frame:0 TX packets:952923 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2432115831 (2.2 GiB) TX bytes:86528526 (82.5 MiB) Base address:0xc000 Memory:ef020000-ef040000 vif0.1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:1400 errors:0 dropped:0 overruns:0 frame:0 TX packets:815 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:129915 (126.8 KiB) TX bytes:204857 (200.0 KiB) vif1.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:3 errors:0 dropped:0 overruns:0 frame:0 TX packets:2 errors:0 dropped:157 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:140 (140.0 b) TX bytes:158 (158.0 b) xenbr1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:112 (112.0 b) TX bytes:0 (0.0 b) &prompt.root; brctl show bridge name bridge id STP enabled interfaces xenbr1 8000.feffffffffff no vif0.1 peth0 vif1.0 - +--> &windows; 上的 Virtual PC Virtual PC 是 µsoft; 上的 &windows; 软件产品, 可以免费下载使用。 相关系统要求,请参阅 system requirements 说明。 在 µsoft.windows; 装完 Virtual PC 之后, 必须针对所安装的虚拟机器来做相应设定。 在 Virtual PC/µsoft.windows; 上安装 &os; 在 µsoft.windows;/Virtual PC 上安装 &os; 的第一步是新增虚拟器。 如下所示,在提示向导中请选择 Create a virtual machine 然后在 Operating system 处选 Other 并依据自身需求来规划硬盘容量和内存的分配。对大多数在 Virtual PC 使用 &os; 的情况而言, 大约 4GB 的硬盘空间以及 512MB 的内存就够用了。 保存并完成配置: 接下来选择新建的 &os; 虚拟机器,并单击 Settings, 以设定网络种类以及网卡: 在新建 &os; 虚拟机器以后, 就可以继续以其安装 &os;。 安装方面, 比较好的作法是使用官方的 &os; 光盘或从官方 FTP 站下载 ISO 镜像。 若您的 &windows; 系统 内已有该 ISO 镜像, 那么就可以在 &os; 虚拟机器上双击, 以开始启动。 接着在 Virtual PC 窗口内按 CD 再按 Capture ISO Image...。 接着出现一个对话框, 可以把虚拟机器内的光驱设定到该 ISO 镜像, 或者是真实的光驱。 设好光盘来源之后,就可以重新开机, 也就是先按 Action 再按 Reset 即可。 Virtual PC 会以特殊 BIOS 开机, 并与普通 BIOS 一样会先检查是否有光盘驱动器。 此时, 它会找到 &os; 安装光盘, 并开始在 内所介绍的 sysinstall 安装过程。 这时候也可以顺便安装 X11, 但不要进行相关设定。 完成安装之后, 记得把安装光盘或者 ISO 镜像退出。 最后, 把装好的 &os; 虚拟机器重新开机即可。 调整 µsoft.windows;/Virtual PC 上的 &os; 在 µsoft.windows; 上以 Virtual PC 装好 &os; 后, 还需要做一些设定步骤, 以便将虚拟机内的 &os; 最佳化。 设定 boot loader 参数 最重要的步骤乃是藉由调降 来降低 Virtual PC 环境内 &os; 的 CPU 占用率。 在 /boot/loader.conf 内加上下列设定即可: kern.hz=100 若不作这设定, 那么光是 idle 状态的 &os; Virtual PC guest OS 就会在单一处理器的电脑上大约有 40% 的 CPU 占用率。 作了上述修改之后, 占用率大约会降至 3%。 建立一个新的内核配置文件 可以放心把所有的 SCSI, FireWire 和 USB 设备驱动都移除。 Virtual PC 有提供 &man.de.4; 的虚拟网卡, 因此除了 &man.de.4; 以及 &man.miibus.4; 以外其他的网卡也都可以从内核的配置文件中移除。 设定网络 可以给虚拟机器简单得使用 DHCP 来设定与 host (µsoft.windows;) 相同的本地网络环境, 只要在 /etc/rc.conf 加上 ifconfig_de0="DHCP" 即可完成。 其他的高级网络设置, 可参阅 . 运行于 MacOS 的 VMware &mac 版本的 VMware Fusion 是一个商业软件,运行在基于 &intel 的 &apple; &mac 计算机的 &macos; 10.4.9 或更版本的操作系统上。 &os; 是一个完全被支持的客户操作系统。 在 &macos; X 上安装了 VMware Fusion 之后, 用户就可以着手配置一个虚拟机器并安装客户操作系统。 在 VMware/&macos; X 上安装 &os; 第一步是运行 VMware Fusion, 虚拟机器库将被装载。 单击 "New" 创建 VM: New Virtual Machine Assistant 将被运行来帮助你创建 VM, 单击 Continue 继续: Operatiing System 项选择 OtherVersion 项可选 &os;&os; 64-bit 选一个你想要的 VM 镜像名字和存储的目录位置。 选择 VM 虚拟硬盘的大小: 选择安装 VM 的方式, 从一个 ISO 镜像或一张 CD 安装: 一旦你点击了 Finish, VM 就会启动了: 以你通常的方式安装 &os; 或者参照 中的步骤: 安装完成之后,你就可以修改一些 VM 的设定,比如内存大小: 在 VM 运行的时候,VM 系统硬件的设置是无法修改的。 配置 VM 的 CPU 数量: CD-ROM设备的状态。通常当你不在需要 CDROM/ISO 的时候可以切断他们跟 VM 的连接。 最后一项需要修改的是 VM 与网络连接的方式。 如果你希望除了宿主以外的机器也能连接到 VM, 请选择 Connect directly to the physical network (Bridged)。选择 Share the host's internet connection (NAT) 的话, VM 可以连接上网络,但是不能从外面访问。 在你修改完设定之后,就可以从新安装的 &os; 虚拟机器启动了。 配置运行于 &macos; X/VMware 上的 &os; 在 &macos; X 上的 VMware 上安装完 &os; 之后,有些配置的步骤可用来优化虚拟系统。 设置 boot loader 变量 最重要的步骤是降低 来减少 VMware 上 &os; 的 CPU 使用率。这需要在 /boot/loader.conf 里加入以下这行设定: kern.hz=100 如果没有这项设定,VMware 上的 &os; 客户 OS 空闲时将占用 &imac; 上一个 CPU 大约 15% 的资源。在修改此项设定之后仅为 5%。 创建一个新的内核配置文件 你可以去掉所有的 FireWire, USB 设备的驱动程序。 VMware 提供了一个 &man.em.4; 支持的虚拟网络适配器,所以除了 &man.em.4; 之外的网卡驱动都可以被剔除。 设置网络 最基本的网络设定包括简单的使用 DHCP 把你的虚拟机器连接到宿主 &mac; 相同的本地网络上。 在 /etc/rc.conf 中加入: ifconfig_em0="DHCP"。 更多有关网络的设置可以参阅 作为宿主 OS 的 &os; 在过去的几年中 &os; 并没有任何可用的并被官方支持的虚拟化解决方案。 一些用户曾时使用过利用 &linux 二进制兼容层运行的 VMware 陈旧并多半已过时的版本 (比如 emulators/vmware3)。 在 &os; 7.2 发布不久, Sun 开源版本 (Open Source Edition OSE) 的 &virtualbox; 作为一个 &os; 原生的程序出现在了 Ports Collection 中。 &virtualbox; 是一个开发非常活跃, 完全虚拟化的软件, 并且可在大部份的操作系统上使用, 包括 &windows;, &macos;, &linux; 和 &os;。同样也能把 &windows; 或 &unix; 作为客户系统运行。 它有一个开源和一个私有两种版本。 从用户的角度来看, OSE 版本最主要的限制也许是缺乏 USB 的支持。 其他更多的差异可以通过链接 查看 Editions 页面。 目前, &os; 上只有 OSE 版本可用。 安装 &virtualbox; &virtualbox; 已作为一个 &os; port 提供, 位于 emulators/virtualbox-ose, 可使用如下的命令安装: &prompt.root; cd /usr/ports/emulators/virtualbox-ose &prompt.root; make install clean 在配置对话框中的一个有用的选项是 GusetAdditions 程序套件。 这些在客户操作系统中提供了一些有用的特性, 比如集成鼠标指针 (允许在宿主和客户系统间使用鼠标, 而不用事先按下某个特定的快捷键来切换) 和更快的视频渲染, 特别是在 &windows; 客户系统中。 在安装了客户操作系统之后, 客户附加软件可在 Devices 菜单中找到。 在第一次运行 &virtualbox; 之前还需要做一些配置上的修改。port 会安装一个内核模块至 /boot/modules 目录, 此模块需要事先加载: &prompt.root; kldload vboxdrv 可以在 /boot/loader.conf 中加入以下的配置使此模块在机器重启之后能自动加载: vboxdrv_load="YES" 在 3.1.2 之前版本的 &virtualbox; 需要挂接 proc 文件系统。 在新版本中不再有此要求, 因为它们使用了由 &man.sysctl.3; 库提供的功能。 当使用旧版本的 port 时, 需要使用下面的步骤来挂载 proc &prompt.root; mount -t procfs proc /proc 为了使配置能在重启后始终生效, 需要在 /etc/fstab 中加入以下这行: proc /proc procfs rw 0 0 如果在运行 &virtualbox; 的终端中发现了类似如下的错误消息: VirtualBox: supR3HardenedExecDir: couldn't read "", errno=2 cchLink=-1 此故障可能是由 proc 文件系统导致的。 请使用 mount 命令检查文件系统是否正确挂载。 在安装 &virtualbox; 时会自动创建 vboxusers 组。 所有需要使用 &virtualbox; 的用户必须被添加为此组中的成员。 可以使用 pw 命令添加新的成员: &prompt.root; pw groupmod vboxusers -m yourusername 运行 &virtualbox;, 可以通过选择你当前图形环境中的 Sun VirtualBox, 也可以在虚拟终端中键入以下的命令: &prompt.user; VirtualBox 获得更多有关配置和使用 &virtualbox; 的信息, 请访问官方网站 。 鉴于 &os; port 非常新, 并仍处于开发状态。请查看 &os; wiki 上的相关页面 以获取最新的信息和故障排查细则。 其他的虚拟化选项 &xen;在 &os; 上作为宿主运行依然处于开发之中。