Files
master/chapter06/introduction.html
2015-05-23 18:50:06 +08:00

114 lines
5.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content=
"application/xhtml+xml; charset=utf-8" />
<title>
6.1. 简介
</title>
<link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
<link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css"
media="print" />
</head>
<body class="lfs" id="lfs-7.7-systemd">
<div class="navheader">
<h4>
Linux From Scratch - Version 7.7-systemd
</h4>
<h3>
第六章 安装基本的系统软件
</h3>
<ul>
<li class="prev">
<a accesskey="p" href="chapter06.html" title=
"安装基本的系统软件">上一页</a>
<p>
安装基本的系统软件
</p>
</li>
<li class="next">
<a accesskey="n" href="kernfs.html" title=
"准备虚拟内核文件系统">下一页</a>
<p>
准备虚拟内核文件系统
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter06.html" title=
"第六章 安装基本的系统软件">返回</a>
</li>
<li class="home">
<a accesskey="h" href="../index.html" title=
"Linux From Scratch - Version 7.7-systemd">首页</a>
</li>
</ul>
</div>
<div class="sect1" lang="en" xml:lang="en">
<h1 class="sect1">
<a id="ch-system-introduction" name="ch-system-introduction"></a>6.1.
简介
</h1>
<p>
在本章里我们会进入构建环境然后开始认真地构建LFS系统了。就是说我们会chroot进入之前准备好的临时迷你Linux系统做一些最后的准备工作然后就开始安装软件包。
</p>
<p>
安装软件非常直观。尽管很多时候安装指令能更短而且更具一般性我们还是选择为每个软件包都提供了完整的指令以减小引起错误的可能性。了解Linux系统如何工作的关键就是知道每个软件包的作用以及为什么你或系统需要它。
</p>
<p>
我们不建议在编译时使用优化。这虽然可以让程序运行得快那么一点点,但是却也有可能增加编译难度以及在运行时出问题。如果在打开优化后编译失败,请试一下关闭优化编译看看行不行。就算打开优化通过了编译,考虑到源代码和编译工具之间的复杂交互,仍然存在编译不正确的风险。而且请注意<code class="option">-march</code><code class="option">-mtune</code>选项里使用的本书没有指定的值都是没有经过测试的。这有可能引起工具链软件包Binutils、GCC和Glibc相关的问题。所以说使用编译器优化选项带来的这一点点潜在好处通常不值得所带来的风险。对于第一次构建LFS系统的新人建议在构建时不要自己增加优化选项。这样构建出来的系统一样会运行得很快而且同时会很稳定。
</p>
<p>
本章里安装软件包的顺序需要严格遵守,这是为了保证不会有程序意外地依赖和<code class="filename">/tools</code>有关的目录。同样的理由,不要同时编译不同的软件包。并行编译也许能节省一点时间(特别是在多核电脑上),但是它可能会导致程序里存在包含<code class="filename">/tools</code>的目录,这样的话在这个目录移除后程序就不能正常工作了。
</p>
<p>
在安装指令之前,每个页面都提供了关于软件包的信息,包括它所包含的内容的精确描述,大概需要多长时间,以及在构建过程中需要多少磁盘空间。在安装指令之后,有这个软件包将安装的程序和库文件列表(以及它们的简短描述)。
</p>
<div class="admon note">
<img alt="[Note]" src="../images/note.png" />
<h3>
注意
</h3>
<p>
第六章里软件包的SBU数值和所需磁盘空间包含了可能存在的测试套件数据。
</p>
</div>
</div>
<div class="navfooter">
<div class="book">
<div class="titlepage">
<div class="author">
<span class="firstname">翻译团队:<a href="http://lctt.github.io/" target="_blank">LCTT</a></span>
<span class="surname">译者/校对:<a href="http://github.com/zpl1025" target="_blank">zpl1025</a>/</span>
</div>
</div>
</div>
<ul>
<li class="prev">
<a accesskey="p" href="chapter06.html" title=
"安装基本的系统软件">上一页</a>
<p>
安装基本的系统软件
</p>
</li>
<li class="next">
<a accesskey="n" href="kernfs.html" title=
"准备虚拟内核文件系统">下一页</a>
<p>
准备虚拟内核文件系统
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter06.html" title=
"第六章 安装基本的系统软件">返回</a>
</li>
<li class="home">
<a accesskey="h" href="../index.html" title=
"Linux From Scratch - Version 7.7-systemd">首页</a>
</li>
</ul>
</div>
</body>
</html>