Centos6.5 -- environment required for PXE Nic system installation

Source: Internet
Author: User

Environment: two hosts or one Vm, host a, acts as the server, and host B acts as the client. The two hosts must be in the same network segment, such as VMware's virtual vmnet4.

Host a requires the installation of DHCP, TFTP, and TFTP-server programs, and syslinux programs (the/usr/share/syslinux/pxelinux.0 syslinux program is required) to provide web services.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/43/3F/wKiom1PZiLLQG4MqAACzVrUW6XE115.jpg "Title =" pxelinux.png "alt =" wkiom1pzillqg4mqaaczvruw6xe115.jpg "/>

Host B can be used as a new machine.

Host a needs to start the DHCP program, and the service DHCPD start is enabled successfully. In this case, you need to modify the configuration file information under/etc/DHCP/DHCPD. conf, which can ignore the # Drop information and mainly modify

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/43/40/wKiom1PZiWrA460cAAG5P9ENKXA320.jpg "Title =" 1.png" alt = "wkiom1pziwra460caag5p9enkxa320.jpg"/>


The numbers in them are examples. Remember to separate the numbers in each segment. Do not forget to set next-server. It specifies the IP address of the TFTP server. Here we enable DHCP and TFTP services for host a at the same time.

A data file similar to bootloader named pxelinux.0. it is located in the/usr/share/syslinux/directory generated by syslinux in advance.

Run the chkconfig DHCPD on command to enable the DHCPD when DHCP is enabled. In this case, check whether the DHCPD service is enabled by using chkconfig-list DHCPD.

In this way, the DHCP service of host a is monitored.

Host a also needs to start the TFTP program. There are two methods to start TFTP: chkconfig TFTP on and/etc/xinetd. in D/TFTP, Change Disabled = yes to No.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/43/40/wKioL1PZijqAnJOdAAHph3_yDaQ877.jpg "Title =" Install tftp.png "alt =" wkiol1pzijqanjodaahph3_ydaq877.jpg "/>

However, Because TFTP requires xinetd to be enabled more than the daemon process (dependencies have been resolved when TFTP is installed in YUM ). Service xinetd restart. The programs uploaded and downloaded on your TFTP server are located in the/var/lib/tftpboot directory. You can use the GET command to download files from the host C connected to the same CIDR block by using the tftp172.16.249.148 (for example. Make sure that port 80, and of host a are listening.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/43/40/wKiom1PZicSDFVUEAADZqgBzHoM932.jpg "Title =" listening status .png "alt =" wkiom1pzicsdfvueaadzqgbzhom932.jpg "/>

In fact, pxelinux.0 is a bit similar to bootloader. It reads vmlinuz and initrd. IMG from the original pxeboot and loads them into the memory. In this case, the function is completed. While vmlinuz reads the anaconda program in packages, and Anaconda starts a program installed in the system.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/43/41/wKioL1PZixmxvHetAAF5-tgexpk310.jpg "Title =" work .jpg "alt =" wKioL1PZixmxvHetAAF5-tgexpk310.jpg "/>

 

 

Next let's use the copy command

1. Under the CP/usr/share/syslinux/pxelinux.0/var/lib/tftpboot directory

2. Create a directory named pxelinux. cfg under the/var/lib/tftpboot directory.

3. Simulate the creation of a file required by the PXE environment. At this time, we have a CD on the VM.

Make sure the mounting is successful.

4 cp/Media/CDROM/images/pxeboot/{vmlinuz kernel, initrd. IMG ramdisk}/var/lib/tftpboot

5 CP/Media/CDROM/isolinux/{vesamenu.c32,splash.jpg}/var/lib/tftpboot/

Vesamenu. c32 provides a graphical installation interface, which is provided by isolinux. cfg.

Splash.jpg is only an image for installation.

6 CP/Media/CDROM/isolinux. cfg/var/lib/tftpboot/pxelinux. cfg/Default

Copy and rename it to default

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/43/41/wKiom1PZijzzTuIxAAJZZsv9ZKA228.jpg "Title =" ult.png "alt =" wkiom1pzijzztuixaajzzsv9zka228.jpg "/>

At this point, it is initially completed.

Since the PXE Nic is installed, it is best to use the Kickstart file. Go back to host a to ensure that the yum source is complete. Download a program called system-config-Kickstart. In addition, it is best to install the xmanager tool on your physical machine. Yum installsystem-config-Kickstart ....... Installation is complete.

Run the system-config-kickstart command. The pink X mark is displayed. You can read the Kickstart file of anaconda. cfg in the root user's home directory and modify it. In addition, it is saved in another directory that you remember. Finally, we start the service called httpd, TCP-based port 80 service, service httpd restart or start. After the service is enabled, SS-Tulp ensures that port 80 is in the listening status.

If you want to create a reliable packages source on the local web service, do not forget to use the resources in your hands.

Last

First, create a directory under/var/www/html. Now we name it C6

# Pwd

#/Var/www/html/C6

Unmount the existing system CD first. Remount to/var/www/html/C6. Copy the previous kickstart file to this directory and name it ct6.cfg.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/43/41/wKiom1PZiqrATY-eAAGZeRqr8nI421.jpg "Title =" mounted c6.png "alt =" wKiom1PZiqrATY-eAAGZeRqr8nI421.jpg "/>

Now, we can restart the Network option to connect another fresh host to the same CIDR Block and wait for it to go to DHCP for reading.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/43/41/wKioL1PZi_rAIzHQAALPnniqcBA883.jpg "Title =" XP-2014-07-30-20-35-45.png "alt =" wkiol1pzi_raizhqaalpnniqcba883.jpg "/>

Finally, the installation interface is displayed.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/43/41/wKiom1PZivzAyZtaAAEdGWy-qAE544.jpg "Title =" installation.png "alt =" wKiom1PZivzAyZtaAAEdGWy-qAE544.jpg "/>

 

 


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.