Centos6 + dnsmasq + Apache + kickstart network installation centos7

Source: Internet
Author: User

After downloading the ISO image of centos 7, the optical drive of the notebook is broken, and the USB flash drive is not easy to use, it is easier to install it over the network.

Previously, DHCPD was used to configure DNS, and xinetd was used to enable the TFTP service, but it was too troublesome. This time, dnsmasq was used to replace the above two software.

In the environment, Apache and dnsmasq are both provided by the system. The IP address of the server to be installed is 192.168.0.254.

The procedure is as follows:

  1. Mounting an ISO Image

    Mkdir/var/www/html/centos7

    CentOS-7.0-1406-x86_64-DVD.iso/var/www/html/centos7

  2. Get the pxelinux.0 file through the RPM package

    CD/var/www/html/centos7/packages/

    Rpm-IVH syslinux-4.05-8.el7.x86_64.rpm

    After testing, centos6 can install the syslinux package on centos7.

    At this time, the pxelinux.0 file will be installed in the/usr/share/syslinux directory.

  3. Copy other files required by TFTP

    Mkdir-P/tftpboot/pxelinux. cfg/

    CP-r/var/www/html/centos7/isolinux/*/tftpboot/

    CP/usr/share/syslinux/pxelinux.0/tftpboot/

    CP/tftpboot/isolinux. cfg/tftpboot/pxelinux. cfg/Default

  4. Modify the installation Interface Configuration File

    Vim/tftpboot/pxelinux. cfg/Default

    Find the following line:


    Label Linux

    Menu label ^ install centos 7

    Kernel vmlinuz

    Append initrd = initrd. IMG Inst. stage2 = HD: Label = centos \ x207 \ x20x86_64 quiet

    Change Inst. stage2 = HD: Label = centos \ x207 \ x20x86_64

    Inst. stage2 = http: // 192.168.0.254/centos7 Inst. Repo = http: // 192.168.0.254/centos7

    This parameter specifies the files and installation sources required for the second step of installation on the HTTP server.

    To use kickstart for installation, add Inst. Ks = http: // 192.168.0.254/KS/Xiaosu. cfg.

  5. This part specifies the network path of the KS file. Of course, you need to generate the KS file in advance and put it in the/var/www/html/KS directory and rename it Xiaosu. cfg. The Kickstart file can be generated by tools, but after the manual installation of centos7 is completed, the file initial-setup-ks.cfg will be automatically generated under the/root/directory, You can manually install a file through the network, that is, inst is not required. KS parameter, only Inst. stage2 = http: // 192.168.0.254/centos7 Inst. repo =
Http: // 192.168.0.254/centos7 parameters, after the installation is complete, according to your needs to modify/root/initial-setup-ks.cfg on the line. Modify the configuration file of dnsmasq to modify dnsmasq in only four rows, which is much simpler than the previous DHCPD. DHCP-range = 192.168.0.50, 192.168.0.150, 12hdhcp-boot = pxelinux.0 enable-tftptftp-root =/tftpboot startup Service dnsmasq restartservice httpd start

At this time, choose PXE In the BIOS to start the system and you will be able to see the installation interface. However, do not select test this Media & Install centos 7, select install centos 7.

Then you can install it!

Centos6 + dnsmasq + Apache + kickstart network installation centos7

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.