Build a PXE environment -- automatically install centos6.5 on the network

Source: Internet
Author: User


1. Build a PXE Environment Experiment

1. Current System Version

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/43/6B/wKiom1PaXLmTU7_XAADeA7ni9eo680.jpg "Title =" image 1.png "alt =" wkiom1paxlmtu7_xaadea7ni9eo680.jpg "/>

2. view the network environment and Yum Source

The current system IP address is 192.168.1.60, The subnet mask is 255.255.255.0, and the default gateway is 192.168.1.1.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/43/6B/wKiom1PaZUXye4bbAAKGINRg1xg535.jpg "Title =" image 6.png "alt =" wkiom1pazuxye4bbaakginrg1xg535.jpg "/>

The yum source used in this experiment is a local CD. The construction process is as follows:

(1) attach a Local CD (made into a yum repository) to 650 in the/Media/centos6.5 _ dvd1 directory. This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/43/6B/wKiom1PaX8_jtYrBAAC-gHI_jgg839.jpg "Title =" image 4.png "alt =" wKiom1PaX8_jtYrBAAC-gHI_jgg839.jpg "/>

(2) Create the local. Repo configuration file of yum in the/etc/yum. Repos. d/directory, edit the configuration file, and specify the yum source on the local disk.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/43/6B/wKioL1PaYqfh3asvAABFe4QOfIk114.jpg "Title =" image 5.png "alt =" wkiol1pay1_h3asvaabfe4qofik114.jpg "/>

3. Install and start the DHCP service

(1) Use the yum command to install DHCP

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/43/6B/wKioL1PaZuWCvX6DAABTy7YBwhg808.jpg "Title =" image 7.png "alt =" wkiol1pazuwcvx6daabty7ybwhg808.jpg "/>

(2) configure the DHCP service

/Usr/share/doc/dhcp-4.1.1/DHCPD. conf. the sample file is the template of DHCP service configuration provided by DHCP itself. This experiment is based on this template and sets the DHCP service configuration as needed.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/43/6B/wKioL1PaaU_Akx4cAADwrgBaEdQ222.jpg "Title =" image 8.png "alt =" wkiol1paau_akx4caadwrgbaedq222.jpg "/>

Edit the configuration file/etc/DHCP/DHCPD. conf.

# DHCPD. conf # sample configuration file for isc dhcpd # option Definitions common to all supported networks... option domain-name "hjq.com"; Option domain-name-servers 192.168.1.60; # DNS server address default-lease-time 43200; # default lease time Max-lease-time 66400; # longest lease time log-facility local7; # The log format is local7 subnet 192.168.1.0 netmask 255.255.255.0 {range 192.168.1.150 192.168.1.200; # address pool, define to allocate option routers 192.168.1.1 to external addresses within the range of 192.168.1.150 to 192.168.1.200; # specify the gateway next-server 192.168.1.60; # specify the TFTP server address FILENAME "pxelinux.0" When PXE is used "; # specify the files downloaded from the TFTP server address}

Note: The allocated IP address must be in the same network segment as the IP address of the current host (DHCP server). Otherwise, an error will be reported when the DHCP service is started.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/43/6B/wKiom1PacWezN-HfAADdyswynjc769.jpg "Title =" image 11.png "alt =" wKiom1PacWezN-HfAADdyswynjc769.jpg "/>

(3) Start The Dhcp Service

[[Email protected] ~] # Service DHCPD configtest # After editing the DHCPD service configuration file, check for syntax errors. If not, start the DHCPD service. Syntax: OK # No syntax error prompt

Start the DHCP service:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/43/6B/wKiom1PabkaR4xKqAABzBb6pEew758.jpg "Title =" image 10.png "alt =" wkiom1pabkar4xkqaabzbb6peew758.jpg "/>

4. install and configure the TFTP Server

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/43/6B/wKiom1PacimgBAfIAAB3IN1Xlwc086.jpg "Title =" image 12.png "alt =" wkiom1pacimgbafiaab3in1xlwc086.jpg "/>

    [[email protected] ~]# chkconfig tftp on

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/43/6C/wKioL1PadDGhoeZYAALt6qg6XJM463.jpg "Title =" image 14.png "alt =" wkiol1paddghoezyaalt6qg6xjm463.jpg "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/43/6C/wKioL1Pac2fjGXmOAAD8HGiKTUA950.jpg "Title =" 13.13.png "alt =" wkiol1pac2fjgxmoaad8hgiktua950.jpg "/>





This article from the "hengzeng" blog, please be sure to keep this source http://hjqjk.blog.51cto.com/5970897/1533457

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.