pxe安裝centos(1)

來源:互聯網
上載者:User

標籤:centos6 pxe

本文沒有加入kickstart,是手動安裝重網路安裝,這樣能讓自己更理解pxe安裝的原理。

本文的服務端環境是centos6.4,用戶端可以是centos5和6的任意一個版本,要注意的是安裝32位的就要拷貝32位的isolinux,不要用64位的。安裝centos5的就用centos5的isolinux,不能用centos6,個人認為應該是每個大版本,安裝的目錄結構都有些變化。


一、簡單原理介紹

無光碟機伺服器通過PXE網卡啟動,從dhcp伺服器擷取IP 通過tftp 下載pxelinux.0檔案找到pxelinux.cfg裡的設定檔,按設定檔找著vmlinuz和intrd.img引導centos進入安裝介面,之後選擇NFS方式安裝系統。

二、搭建環境

非虛擬機器,直接就是實體環境server:centos6.4 ip:10.50.1.7

三、安裝配置

安裝軟體yum –y install dhcp* nfs* tftp* 

  1. tfpt的配置

    vim /etc/xinetd.d/tftp

service tftp

{


        disable                 = no  #預設沒有這一行的,預設就是disable=yes

        socket_type             = dgram

        protocol                = udp

        wait                    = yes

        user                    = root

        server                  = /usr/sbin/in.tftpd

        server_args             = -u nobody -s /tftpboot #這裡修改一下加個-u nobody

        disable                 = yes                 #/tftpboot也是自己定義的,記得建立它

        per_source              = 11

        cps                     = 100 2

        flags                   = IPv4

}

重啟xinetd服務 service xinetd restart

加入開開啟啟動 chkconfig  tftp on

2.配置NFS

先掛載系統鏡像mount -o loop /system_iso/CentOS-6.4-x86_64-bin-DVD1.iso /systemabc

echo "/tftpboot" > /etc/exports

echo "/systemabc" >> /etc/exports

exportfs -a

service nfs restart

showmount -e 127.0.0.1


3.hdpc的配置

ddns-update-style interim;

ignore client-updates;

allow booting;

allow bootp;

subnet 10.50.0.0 netmask 255.255.248.0 {

option routers 10.50.0.1;

option subnet-mask 255.255.248.0;

option domain-name-servers 10.50.1.7;

option time-offset -18000;

range dynamic-bootp 10.50.0.21 10.50.0.50;

default-lease-time 21600;

max-lease-time 43200;

next-server 10.50.1.7;

filename "/pxelinux.0";

}


4.pxe的配置

mkdir /tftpboot/pxelinux.cfg

cp -a /systemabc/isolinux/* /tftpboot

mv /tftpboot/isolinux.cfg /tftpboot/pxelinux.cfg/default


四.按F11(F12)選擇從網路啟動

進入開啟選單,選擇1,

選擇通過NFS安裝

10.50.1.7

/systemabc

就開始手動設定安裝系統了



本文出自 “IT木偶” 部落格,請務必保留此出處http://zjqin.blog.51cto.com/4559261/1546595

pxe安裝centos(1)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.