⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 551.html

📁 著名的linux英雄站点的文档打包
💻 HTML
📖 第 1 页 / 共 3 页
字号:
                        </font></div>
                    </td>
                  </tr>
                  <tr> 
                    <td noWrap> 
                      <div align="center"> 
                        <input maxlength=100 size=30 name=keyword2>
                      </div>
                    </td>
                  </tr></tbody> 
                </table>
              </form>
            </TD>
            <TD rowSpan=2><IMG src="images/header_r1_c7.gif" tppabs="http://www.linuxhero.com/docs/images/header_r1_c7.gif" width=26 border=0 name=header_r1_c7></TD>
          <TD><IMG height=83 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1 border=0></TD></TR>
        <TR>
          <TD background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif"><IMG height=22 
            src="images/header_r2_c1.gif" tppabs="http://www.linuxhero.com/docs/images/header_r2_c1.gif" width=296 border=0 
            name=header_r2_c1></TD>
          <TD background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colSpan=5>
              <DIV align=right><FONT class=normalfont>当前位置: 
              <A href="index.html" tppabs="http://www.linuxhero.com/docs/index.html">本站首页</A>
              <font color="#FF6699">&gt;&gt;</font>
<A href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</A>                 | <A href="copyright.html" tppabs="http://www.linuxhero.com/docs/copyright.html">版权说明</A></font></DIV>
            </TD>
          <TD><IMG height=22 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1 
        border=0></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=10 cellPadding=0 width="100%" bgColor=#ffffff 
        border=0>
         <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
              
              <TR>
                <TD vAlign=top align=middle width="60%">
                  <TABLE cellSpacing=0 cellPadding=0 width="100%" 
                  background="images/back.gif" tppabs="http://www.linuxhero.com/docs/images/back.gif" border=0>
                    <TBODY>
                    <TR>
                        <TD vAlign=top width="80%"> 
                          <DIV align=center>
                        <FORM action="search.html" tppabs="http://www.linuxhero.com/docs/search.html" method=get>
                            </FORM>
                        <TABLE cellSpacing=0 cellPadding=0 width="95%" 
                          border=0><TBODY>
                          <TR>
                            <TD background="images/bgi.gif" tppabs="http://www.linuxhero.com/docs/images/bgi.gif" 
                          height=30></TD></TR></TBODY></TABLE>
                        <TABLE cellSpacing=0 cellPadding=3 width="95%" 
                        align=center border=0>
                          <TBODY>
                          <TR>
                            <TD>
                              <TABLE cellSpacing=0 cellPadding=3 width="100%" 
                              border=0>
                                <TBODY>
                                <TR>
                                      <TD vAlign=top> 
<p><FONT class=normalfont><B><font color=blue>远程安装linux</font></B></FONT><BR><FONT class=smallfont color=#ff9900>2004-04-23 15:18 pm</FONT><BR><FONT class=normalfont>作者:汤凯<br>来自:Linux知识宝库<br>联系方式:无名<br><br>一般情况下,我们都是利用软驱或光驱引导linux后,再通过本地的光驱安装Linux。但是,这种安装方法在以下的几种情况下就不能适用:
<br>
<br>
· 无软驱和光驱:很多公司为了节省成本,计算机一般都不带光驱或软驱,这样就无法通过本地安装linux;
<br>
<br>
· 非标准的软驱和光驱:虽然笔记本都会配置光驱,但是并不一定都是标准的IDE设备,有些是通过USB接口,有些是通过1394接口(例如Samsung的Q10)。在linux安装时所引导的Linux内核一般都不会带这些接口的驱动,所以也无法通过本地安装Linux;
<br>
<br>
另外,在一些场合,如机房中,有大量的计算机需要同时安装linux,如果通过光驱的方式一个个安装,不仅效率低,也不利于维护。
<br>
<br>
笔者在工作过程中,就遇到过第二种情况。一台Samsung的Q10笔记本需要安装Redhat linux 8.0,但是通过光驱引导后发现,安装程序无法访问光盘。针对这个问题,笔者经过查阅资料和摸索,找到了在Q10上安装Linux的方法。在下面的讨论中,如不做特别声明,都将以Q10为例,介绍如何通过PXE Bootrom来远程安装Linux。
<br>
<br>
<br>
基本原理
<br>
<br>
<br>
什么是PXE
<br>
<br>
PXE(Pre-boot Execution Environment)是由Intel设计的协议,它可以使计算机通过网络启动。协议分为client和server两端,PXE client在网卡的ROM中,当计算机引导时,BIOS把PXE client调入内存执行,并显示出命令菜单,经用户选择后,PXE client将放置在远端的操作系统通过网络下载到本地运行。
<br>
<br>
PXE协议的成功运行需要解决以下两个问题:
<br>
<br>
既然是通过网络传输,那么计算机在启动时,它的IP地址由谁来配置;
<br>
<br>
通过什么协议下载linux内核和根文件系统
<br>
<br>
对于第一个问题,可以通过DHCP Server解决,由DHCP server来给PXE client分配一个IP地址,DHCP Server是用来给DHCP Client动态分配IP地址的协议,不过由于这里是给PXE Client分配IP地址,所以在配置DHCP Server时,需要增加相应的PXE特有配置。
<br>
<br>
至于第二个问题,在PXE client所在的ROM中,已经存在了TFTP Client。PXE Client使用TFTP Client,通过TFTP协议到TFTP Server上下载所需的文件。
<br>
<br>
这样,PXE协议运行的条件就具备了,下面我们就来看看PXE协议的工作过程。
<br>
<br>
工作过程
<br>
<br>
在上图中,PXE client是需要安装linux的计算机,TFTP Server和DHCP Server运行在另外一台Linux Server上。Bootstrap文件、配置文件、Linux内核以及Linux根文件系统都放置在Linux Server上TFTP服务器的根目录下。
<br>
<br>
PXE client在工作过程中,需要三个二进制文件:bootstrap、linux 内核和Linux根文件系统。Bootstrap文件是可执行程序,它向用户提供简单的控制界面,并根据用户的选择,下载合适的Linux内核以及Linux根文件系统。
<br>
<br>
<br>
步骤
<br>
<br>
<br>
有了前面的背景知识,接下来就可以正式操作了,下面按照顺序给出了操作步骤:
<br>
<br>
配置DHCP Server
<br>
<br>
选用ISC dhcp-3.0,DHCP Server的配置文件是/etc/dhcpd.conf,配置文件的内容如下:
<br>
<br>
option space PXE;
<br>
option PXE.mtftp-ip code 1 = ip-address;
<br>
option PXE.mtftp-cport code 2 = unsigned integer 16;
<br>
option PXE.mtftp-sport code 3 = unsigned integer 16;
<br>
option PXE.mtftp-tmout code 4 = unsigned integer 8;
<br>
option PXE.mtftp-delay code 5 = unsigned integer 8;
<br>
option PXE.discovery-control code 6 = unsigned integer 8;
<br>
option PXE.discovery-mcast-addr code 7 = ip-address;
<br>
class "pxeclients" {
<br>
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
<br>
option vendor-class-identifier "PXEClient";
<br>
vendor-option-space PXE;
<br>
# At least one of the vendor-specific PXE options must be set in
<br>
# order for the client boot ROMs to realize that we are a PXE-compliant
<br>
# server. We set the MCAST IP address to 0.0.0.0 to tell the boot ROM
<br>
# that we can't provide multicast TFTP (address 0.0.0.0 means no
<br>
# address).
<br>
option PXE.mtftp-ip 0.0.0.0;
<br>
# This is the name of the file the boot ROMs should download.
<br>
filename "pxelinux.0";
<br>
# This is the name of the server they should get it from.
<br>
next-server 192.168.0.1;
<br>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -