PXE Install CentOS6.6 system

Source: Internet
Author: User
Tags yum repolist

Environment:

DHCP server: 172.168.0.1

TFTP+PXE Server: 172.168.0.2

Configuring the DHCP server

First, configure the local Yum source

Mount/dev/cdrom/mntrm-rf/etc/yum.repos.d/*vi/etc/yum.repos.d/base.repo [Base] name=base baseurl=file:///mnt Enabled=1 gpgcheck=0 Yum Repolist

Second, install the configuration DHCP

yum -y install dhcpcp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/ dhcpd.confcat /etc/dhcp/dhcpd.conf | grep -v  "^$"  | grep -v  "^#"     option domain-name  "Parpar.com";    option  domain-name-servers 8.8.8.8;    default-lease-time 3600;     max-lease-time 7200;    log-facility local7;    subnet  172.168.0.0 netmask 255.255.0.0 {        range  172.168.0.20 172.168.0.30;        option routers  172.168.0.1;        next-server 172.168.0.2;         filename  "pxelinux.0";    }chkconfig dhcpd  Onservice dhcpd start

Configuring the TFTP+HTTP+PXE Server

First, the installation configuration tftp

Yum-y install TFTP tftp-serverchkconfig tftp onservice xinetd start

Second, configure the PXE working environment

Yum-y Install syslinuxcp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/

Third, provide boot kernel files

CP/MNT/IMAGES/PXEBOOT/{VMLINUZ,INITRD.IMG}/var/lib/tftpboot/cp/mnt/isolinux/{vesamenu.c32,boot.msg,splash.jpg} /var/lib/tftpbootmkdir/var/lib/tftpboot/pxelinux.cfgcp/mnt/isolinux/isolinux.cfg/var/lib/tftpboot/pxelinux.cfg /default

Iv. Installation and Configuration httpd service

Yum-y Install Httpdmkdir/var/www/html/centos6mount--bind/mnt/var/www/html/centos6service httpd start

V. Generate the KS file

yum -y install system-config-kickstartsystem-config-kickstartmv ks.cfg /var/www/html/ cat /var/www/html/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= "HTTP://172.168.0.2/CENTOS6"     repo --name= " CentOS " --baseurl=http://172.168.0.2/centos6 --cost=100    # Root  password    rootpw --iscrypted $1$10kajr0t$wqukt8fra24fdpnhzxrtz1     # 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    # Reboot after installation     reboot    # system timezone    timezone  asia/ shanghai    # network information    network  -- bootproto=dhcp --device=eth0 --onboot=on    # system bootloader  Configuration   &nbsP;bootloader --append= "Crashkernel=auto rhgb quiet"  --location=mbr --driveorder= "SDA"     # clear the master boot record    zerombr     # Partition clearing information    clearpart  --all --initlabel     # disk partitioning information     part /boot --fstype= "Ext4"  --size=200    part swap -- Size=4000    part / --fstype= "Ext4"  --grow --size=200     %packages     @core      %end


Vi. modification

Vim/var/lib/tftpboot/pxelinux.cfg/default label Linux menu label ^install or upgrade an existing system menu Def Ault kernel vmlinuz Append ks=http://172.168.0.2/ks.cfg initrd=initrd.img

Nine, the configuration is complete, the new boot virtual machine can automatically install the system



This article is from "Xiao Yang" blog, please be sure to keep this source http://princepar.blog.51cto.com/1448665/1662059

PXE Install CentOS6.6 system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.