• <ul id="mayc0"></ul>
    <ul id="mayc0"><center id="mayc0"></center></ul>
    <strike id="mayc0"><input id="mayc0"></input></strike>
    <ul id="mayc0"></ul>
  • 始創于2000年 股票代碼:831685
    咨詢熱線:0371-60135900 注冊有禮 登錄
    • 掛牌上市企業
    • 60秒人工響應
    • 99.99%連通率
    • 7*24h人工
    • 故障100倍補償
    您的位置: 網站首頁 > 幫助中心>文章內容

    PXE && Kictstart網絡自動安裝OS(rhel 6.2)

    發布時間:  2012/9/15 18:09:49
    PXE && Kictstart網絡自動安裝OSrhel 6.2
     
    // 實現過程
    客戶端通過網卡PXE啟動-->連接到DHCP服務器-->獲得IP地址-->客戶端從TFTP服務器下載pxelinux.0,根據配置文件(default)下載指定的vmlinuz,initrd-->啟動系統內核,加載初始化鏡像文件(加載參數是否有ks)-->安裝初始化完成-->到指定的位置(NFSFTPHTTP服務器上)下載軟件包進行安裝
     
    // 組建功能簡介
    DHCP用于向客戶端分配IP
    tftp用于傳輸bootloader文件pxelinux.0
    ks.cfg用于初始化安裝
    ftp負責傳輸安裝鏡像文件install.img
     
    // 安裝所需軟件包【本試驗在192.168.0.254主機中配置所有服務】
    [root@localhost~]# yum install dhcp tftp vsftp syslinux kickstart –y
     
    // DHCP 部分
    [root@localhost~]# vi /etc/dhcp/dhcpd.conf
    ddns-update-style interim;
    ignore client-updates;
    next-server 192.168.0.254;  #tftp服務器IP 
    subnet 192.168.0.0 netmask 255.255.255.0 {
            range 192.168.0.10 192.168.0.20;  #地址池
    }       
    filename="pxelinux.0";
    [root@localhost~]# service dhcpd start
     
    // TFTP部分
    [root@localhost~]# service xinetd start
    [root@localhost~]# cp /cdrom/images/pxeboot/initrd.img /var/lib/tftpboot
    [root@localhost~]# cp /cdrom/images/pxeboot/vmlinuz /var/lib/tftpboot
    [root@localhost~]# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
    [root@localhost~]# mkdir /var/lib/tftpboot/pxelinux.cfg
    [root@localhost~]# vi /var/lib/tftpboot/pxelinux.cfg/default
    default linux
    label linux
      menu label ^Install rhel 62 with PXE
      menu default
      kernel vmlinuz
      append initrd=initrd.img ks=ftp://192.168.0.254/pub/ks.cfg
    完成后,目錄樹如下:
    [root@localhost ~]# tree /var/lib/tftpboot
    /var/lib/tftpboot
    ├── initrd.img
    ├── pxelinux.0
    ├── pxelinux.cfg
       └── default
    └── vmlinuz
     
    1 directory, 4 files
     
    // Kickstart 部分
    [root@localhost~]# system-config-kickstart
    Save : /var/ftp/pub/ks.cfg
    ks.cfg樣例見文末
     
    // FTP 部分
    [root@localhost~]# service vsftpd start
    [root@localhost~]# mkdir /cdrom
    [root@localhost~]# mount /dev/cdrom /cdrom
    [root@localhost~]# cp -Rf /cdrom/* /var/ftp/pub/
    [root@localhost~]# chown -R ftp:ftp /var/ftp/pub
     
     
    ks.cfg樣例
    #platform=x86, AMD64, or Intel EM64T
    #version=DEVEL
    # Firewall configuration
    firewall --disabled
    # Install OS instead of upgrade
    install
    # Use network installation
    url --url="ftp://192.168.0.254/pub"
    # Root password
    rootpw --iscrypted $1$3xdVJxOa$3gsZHWJn403WYmNhlMYOl.
    # System authorization information
    auth  --useshadow  --passalgo=sha512
    # Use graphical install
    graphical
    firstboot --disable
    # System keyboard
    keyboard us
    # System language
    lang en_US
    # SELinux configuration
    selinux --disabled
    # Installation logging level
    logging --level=info
     
    # System timezone
    timezone  Africa/Abidjan
    # System bootloader configuration
    bootloader --location=mbr
    # Clear the Master Boot Record
    zerombr
    # Partition clearing information
    clearpart --all --initlabel
    # Disk partitioning information
    part /boot --fstype="ext4" --size=200
    part swap --fstype="swap" --size=1024
    part / --fstype="ext4" --grow --size=1
     
    %packages
    @base
    @basic-desktop
    @chinese-support
    @compat-libraries
    @console-internet
    @development
    @fonts
    @input-methods
    @internet-browser
    @remote-desktop-clients
    @system-admin-tools
    @system-management
    @x11
     
    %end

    本文出自:億恩科技【www.vbseamall.com】

    服務器租用/服務器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質保障!--億恩科技[ENKJ.COM]

  • 您可能在找
  • 億恩北京公司:
  • 經營性ICP/ISP證:京B2-20150015
  • 億恩鄭州公司:
  • 經營性ICP/ISP/IDC證:豫B1.B2-20060070
  • 億恩南昌公司:
  • 經營性ICP/ISP證:贛B2-20080012
  • 服務器/云主機 24小時售后服務電話:0371-60135900
  • 虛擬主機/智能建站 24小時售后服務電話:0371-60135900
  • 專注服務器托管17年
    掃掃關注-微信公眾號
    0371-60135900
    Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權所有  地址:鄭州市高新區翠竹街1號總部企業基地億恩大廈  法律顧問:河南亞太人律師事務所郝建鋒、杜慧月律師   京公網安備41019702002023號
      0
     
     
     
     

    0371-60135900
    7*24小時客服服務熱線