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:
Mounting an ISO Image
Mkdir/var/www/html/centos7
CentOS-7.0-1406-x86_64-DVD.iso/var/www/html/centos7
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.
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
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.
- 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