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

📄 636.html

📁 著名的linux英雄站点的文档打包
💻 HTML
📖 第 1 页 / 共 2 页
字号:
            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>Kickstart+HTTP+DHCP+TFTP+PXElinux实现RedHat的网络自动安装</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>我们知道RH中的Kickstart可以实现RedHat光盘启动后的自动安装,如果把ks.cfg及 RPM安装文件考到一台HTTP或NFS服务器上,就可以实现网络自动安装,但还是需要RedHat的启动盘来启动机器,但加上DHCP、TFTP和 PXElinux及支持PXE的网卡,噢,那就可以实现远程启动了。也就是说,有了上面的条件,你只要给一台支持PXE的客户机上电,然后再打入一个设置好的命令就可以安装好一RedHat台机器了。<br>
实现上面安装的过程是这样的:PXE网卡启动------DHCP服务器------获得IP------从TFTP上下载 pxelinux.0、vmlinuz、initrd------启动系统------通过PEXlinux去HTTP下载ks.cfg文件-----跟据ks.cfg去HTTP下载RPM包及安装系统------完成安装。<br>
具体实现的过程是这样的:<br>
1、 配制一个HTTP服务器(当然也可以是NFS、FTP)及kickstart文件:<br>
1)如何配HTTP我就不说了,配好后,在HTTP的DocumentRoot目录下(一般为/var/www/html)建一个rh9目录,用于放 RedHat9的安装文件。把RedHat9第一张安装盘的RedHat目录及下面的内容全部考到这个目录下,把第二、第三张盘的RPMS目录下的rpm 包考到rh9/RedHat/RPMS目录下,完成安装文件的考贝。service httpd restart开启HTTP服务。可以在浏览器内打入:http://192.168.168.6/rh9看一下,是不是能看到RedHat目录。<br>
2) 用redhat-config-kickstart命令做一个ks.cfg文件,注意在“安装方法”选项中选HTTP,在“HTTP服务器:”中打入HTTP服务器的IP地址,在“HTTP目录:”中打入rh9,其它的我就不多说了。做好后把这个ks.cfg 文件考到HTTP服务器的DocumentRoot/rh9目录下。<br>
3)在一台机器上做一下测试(注意:因为是自动安装,这台机器的上的数据可能全部被格掉喔)。用光盘启动机器,在boot:提示符下打入:linux ks=http://192.168.168.6/rh9/ks.cfg,看一下是不是能实现自动安装,如果能,OK我们一半的工作已经做好了。<br>
2、 配制DHCP、TFTP、和PXElinux。(当然这些服务可以和HTTP放在一台服器上)<br>
1) 做一台TFTP服务器太容易了,用rpm –qa | grep tftp看一下tftp有没安装,没有的话安装一下。用chkconfig tftp on 打开xinetd代理的tftp服务。<br>
2) 做一台DHCP服务器,这是关键。下面是我的dhcp.conf文件:<br>
ddns-update-style interim;<br>
ignore client-updates;<br>
allow booting; #定义可以PXE 启动<br>
allow bootp; #定义支持boottp<br>
subnet 192.168.168.0 netmask 255.255.255.0 {<br>
<br>
option routers 192.168.168.230; #定义默认网关<br>
option subnet-mask 255.255.255.0;<br>
option domain-name-servers 192.168.168.6; #定义nameServer<br>
option time-offset -18000; # Eastern Standard Time<br>
range dynamic-bootp 192.168.168.12 192.168.168.254;<br>
default-lease-time 21600;<br>
max-lease-time 43200;<br>
# Group the PXE bootable hosts together 定义可以PEX启动的主机的组<br>
group {<br>
# PXE-specific configuration directives...<br>
next-server 192.168.168.6; #TFTPServer的IP<br>
filename "/pxelinux.0";#pxelinux loader文件位置<br>
<br>
# You need an entry like this for every host<br>
# unless you're using dynamic addresses #可PEX启动的主<br>
#机的IP与MAC地址的邦定<br>
host wy {<br>
hardware ethernet 00:00:E2:89:9B:DB;<br>
fixed-address 192.168.168.128;<br>
}<br>
}}<br>
<br>
红色的部分为在DHCP中支持TFTP及PXElinux的所要添加的部分。service dhcpd restart 开启DHCP服务。<br>
3)配制PEXlinux。要远程启动机器,就必须要有PXElinux这个由syslinux、isolinux派生出来的,支持PXE的 bootloader,它可以实现远程通过PEX启动一台机器。把/usr/lib/syslinux/pxelinux.0考到/tftpboot目录下,把RedHat9第一张安装光盘上/image/pxeboot/initr.img和vmlinux也考到/tftpboot目录下。在 /tftpboot建一个pxelinux.cfg目录,用于放syslinux的配制文件。Sysconfig的配制文件有现成的可用,在rh9第一张安装光盘isolinux/下有一个isolinux.cfg文件,把它考成/tftpboot/default,把isolinux/*.msg考到 /tftpboot下(RedHat的安装光盘的Loader就是个isolinux,呵呵)。对default(也就是isolinux.cfg)作一下修改,下面是我的default文件:<br>
default local<br>
prompt 1<br>
timeout 30<br>
display boot.msg<br>
F1 boot.msg<br>
F2 options.msg<br>
F3 general.msg<br>
F4 param.msg<br>
F5 rescue.msg<br>
F7 snake.msg<br>
label local<br>
localboot 0<br>
label linux<br>
kernel vmlinuz<br>
append initrd=initrd.img devfs=nomount ramdisk_size=9216<br>
label text<br>
kernel vmlinuz<br>
append initrd=initrd.img text devfs=nomount ramdisk_size=9216<br>
label expert<br>
kernel vmlinuz<br>
append expert initrd=initrd.img devfs=nomount ramdisk_size=9216<br>
label ks<br>
kernel vmlinuz<br>
append ks initrd=initrd.img devfs=nomount ramdisk_size=9216<br>
label nofb<br>
kernel vmlinuz<br>
append initrd=initrd.img devfs=nomount nofb ramdisk_size=9216<br>
label lowres<br>
kernel vmlinuz<br>
append initrd=initrd.img lowres devfs=nomount ramdisk_size=9216<br>
label autoinstall<br>
kernel vmlinuz<br>
append ks=http://192.168.168.6/rh9/ks.cfg initrd=initrd.img devfs=nomount ramdisk_size=9216 nofb<br>
红色的部份是我加的,用于实现本地硬盘启动或支持kickstart的PXE网络自动安装。<br>
cat一下/tftpboot/boot.msg文件:<br>
splash.lss<br>
- To Local boot 02Red Hat07 Linux , type:<br>
0f&lt;ENTER&gt;07.<br>
- To install or upgrade 02Red Hat07 Linux in graphical mode,<br>
press the 0f linux&lt;ENTER&gt;07 key.<br>
<br>
- To install or upgrade 02Red Hat07 Linux in text mode, type:<br>
0flinux text &lt;ENTER&gt;07.<br>
<br>
- To Auto Install 02Red Hat07 Linux , type:<br>
0flinux autoinstall &lt;ENTER&gt;07.<br>
- Use the function keys listed below for more information.<br>
<br>
02[F1-Main] [F2-Options] [F3-General] [F4-Kernel] [F5-Rescue]07<br>
红色行是我加入的,用于显示Local boot 和autoinstall选项。<br>
3、 OK,到现在服务器端的配制已经基本完成了,让我们来试一下。用一台支持PXE的机器加电启动,按F12,一般机器启动时会有提示(请进入BIOS看一下,确认网卡或主板的PXE功能已经打开),选择LAN启动,看到了什么? “DHCP…………………FFFFFFFFFFFFF”接着一个和光盘启动的差不多的画面,是吧?按一下F2试一下,F2的选项是不是也出来了。打入 linux rescue 试试,是不是进入了rescue模式?HOHO~~,以后客户机启不来还要用光盘来重启进rescue模式吗?当然不用了,把安装光盘扔了吧,哈哈。<br>
再重启机器,按F12,选择LAN,在PXE启动安装界面的boot:提示符下打入linux autoinstall试试?HOHO~~,一个多小时后,一台新的rh9就这么安装好了。是不是很方便呢?<br>
4、 参考文档:/usr/share/doc/syslinux-1.75/pxelinux.doc<br>
/usr/share/doc/syslinux-1.75/isolinux.doc<br>
/usr/share/doc/syslinux-1.75/syslinux.doc<br>
/usr/share/doc/dhcp-3.0pl1/README<br>
/usr/share/doc/httpd-2.0.40/README<br>
/usr/share/doc/pxe-0.1/README<br>
5、最后,感谢我的RHCE老师simon cheng,是他给了我提示和帮助,虽然有时我问他10个不同的问题,他回答我9个是同一个答案:See readme 
</FONT><br>
                                      </TD>
                                    </TR>
                                <TR>
                                <TD colSpan=2><FONT 
                                class=middlefont></FONT><BR>
                                        <FONT 
                                class=normalfont>全文结束</FONT> </TD>
                                    </TR>
                                <TR>
                                <TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2 
                                height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
                        <TD vAlign=top width="20%" 
                      background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2> 
                          <DIV align=center> 
                            <table class=tableoutline cellspacing=1 cellpadding=4 
                        width="100%" align=center border=0>
                              <tr class=firstalt> 
                                <td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
                                <font class=normalfont><b>所有分类</b></font></td>
                              </tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td>    </tr>  </table></td></tr>                            </table>
                          </DIV></TD></TR>
                    <TR vAlign=top>
                        <TD width="80%"> 
                          <DIV align=center><BR>
                          </DIV>
                        </TD></TR></TBODY></TABLE></TD></TR>
                </TABLE></TD></TR>
          </TABLE>
      <TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee 
        border=0><TBODY>
        <TR>
          <TD width="50%">
              <P><FONT class=middlefont>版权所有 &copy; 2004 <A 
            href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
                违者必究. </FONT></P>
            </TD>
          <TD width="50%">
              <DIV align=right><FONT class=middlefont>Powered by: <A 
            href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
            </TD></TR></TBODY></TABLE>
      <CENTER></CENTER></TD></TR>
    </TABLE></CENTER></BODY></HTML>

⌨️ 快捷键说明

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