Kickstart + DHCP + tftp + HTTP fully automated Installation System Based on PXE

Source: Internet
Author: User
Tags file transfer protocol

PXE

PXE works in the client/server network mode. It allows workstation to download images from remote servers over the network and starts the operating system over the network. During the startup process, the terminal requires the server to assign IP addresses, use TFTP or mtftp (Multicast Trivial File Transfer Protocol) Protocol to download a startup package to the local memory for execution. The startup package completes the basic software settings of the terminal (customer, in this way, the operating system of the terminal that is pre-installed on the server is guided. PXE can guide a variety of operating systems, such as Windows95/98/2000/Windows2003/windows2008/WINXP/win7/Win8, and Linux.

 

Tutorial Description: This time I used kickstart + DHCP + tftp + http mode to simulate fully automated system (Linux) installation.

Environment preparation:

1. One server serves as the startup server and the installation Server

2. A client needs to be able to start from the NIC

3. The two machines must be in the unified LAN

4. The server must have the environment package required for installation.

In this experiment, I use the network segment 192.168.0.0/24. My server IP address is 192.168.0.2/24.

 

Experiment: Configure Servier

1. The server must specify a static IP address.

Server IP

650) This. width = 650; "Title =" lw.ra5xw.fqwlnea0p5u%0y29.jpg "src =" http://s3.51cto.com/wyfs02/M01/43/AF/wKioL1PbwGfCh0hfAAETLHH-wBM774.jpg "alt =" wKioL1PbwGfCh0hfAAETLHH-wBM774.jpg "/>

2. After configuration, restart the network service and view the NIC information.

650) This. width = 650; "Title =" a0rwr(y5mj69cvj1_fsk5537.jpg "src =" http://s3.51cto.com/wyfs02/M01/43/AF/wKiom1Pbv4vjKvj1AADEUKlhODA760.jpg "alt =" wkiom1pbv4vjkvj1aadeuklhoda760.jpg "/>

650) This. width = 650; "Title =" kp3 ~ 0g2j 'W) '85hdnk ~ R't9.jpg "src =" http://s3.51cto.com/wyfs02/M00/43/AF/wKioL1PbwOHhLKtAAADxVQz1InM396.jpg "alt =" wkiol1pbwohhlktaaadxvqz1inm396.jpg "/>

 

Configure DHCP:

1. after the static IP address is specified, you can start to install the DHCP service. First, mount the CD and configure the yum source. Here, we will experiment on the virtual machine and have images, specify the yum source to the image.

Attach image CDROM

650) This. width = 650; "Title =" 8ry7ahoc02f0000000000006o0000t00004z00003j.jpg "src =" http://s3.51cto.com/wyfs02/M01/43/AF/wKiom1PbwGqzHFZVAAErPeSmHHY579.jpg "alt =" wkiom1pbwgqzhfzvaaerpesmhpeshy579.jpg "/>

 

Specify the yum source and edit Vim/etc/yum. Repos. d/KY. repo.

650) This. width = 650; "Title =" 9 $7 zxouhdak) @ _ javasmc1 ~ Yzw.jpg "src =" http://s3.51cto.com/wyfs02/M02/43/AF/wKiom1PbwKuhNYDEAABGKRhoVeU684.jpg "alt =" wkiom1pbwkuhnydeaabgkrhoveu684.jpg "/>

 

Install DHCP, # Yum install DHCP. Check the installation result after installation.

650) This. width = 650; "Title =" 597k(o7x425241dn_w_iqkoa4.jpg "src =" http://s3.51cto.com/wyfs02/M02/43/AF/wKiom1PbwSKQfUWaAAAt1Lfcg2g294.jpg "alt =" wkiom1pbwskqfuwaaaat1lfcg2g294.jpg "/>

2. Configure the DHCP server and edit the DHCPD. conf file.

650) This. width = 650; "Title =" ktbth1_sv_52r7x31_k6dr5lo.jpg "src =" http://s3.51cto.com/wyfs02/M00/43/B0/wKioL1Pbw-2iI1QhAABG74Eujqs834.jpg "alt =" wKioL1Pbw-2iI1QhAABG74Eujqs834.jpg "/>

650) This. width = 650; "Title =" 3wij5}((%v5u6@kfcrh0u8e.jpg "src =" http://s3.51cto.com/wyfs02/M00/43/AF/wKiom1PbwwywJ_geAAEZ8CoI3qY863.jpg "alt =" wkiom1pbwwywj_geaaez8coi3qy863.jpg "/>

650) This. width = 650; "Title =" plbe?o=_o=3}rs'glvf=ol6.jpg "src =" http://s3.51cto.com/wyfs02/M00/43/B0/wKioL1PbxDXzuA4AAAB1-E63ZMs763.jpg "alt =" wKioL1PbxDXzuA4AAAB1-E63ZMs763.jpg "/>

Start Dhcp Service

650) This. width = 650; "Title =" KD %] ~ 2017100002'av3@(npx'dk_8.jpg "src =" http://s3.51cto.com/wyfs02/M00/43/AF/wKiom1Pbw13SRmerAABZ-iBuhNs737.jpg "alt =" wKiom1Pbw13SRmerAABZ-iBuhNs737.jpg "/>

 

Configure TFTP:

1. Install the TFTP service

650) This. width = 650; "Title =" s45h27p @ 956s44 ~ Unzip w{5ct1_jpg "src =" http://s3.51cto.com/wyfs02/M00/43/B0/wKioL1PbxXWB30HGAADk2K8RmpA085.jpg "alt =" wkiol1pbxxwb30hgaadk2k8rmpa085.jpg "/>

 

2. Start the TFTP service. Because the TFTP-Server is a transient (transient) daemon, it starts xinetd at startup by using the super daemon DAEMON service.

There are two TFTP startup methods:

(1) run the command # chkconfig TFTP on

(2) edit the configuration file and modify/etc/xinetd. d/TFTP

650) This. width = 650; "Title =" 25nt $ jkvwq _ $ E0 [8nnl4 ~ Ac.jpg "src =" http://s3.51cto.com/wyfs02/M01/43/B0/wKioL1PbxxegjR92AACrTD8eU_Q794.jpg "alt =" wkiol1pbxxegjr92aacrtd8eu_q794.jpg "/>

View Startup Mode # chkconfig -- list

650) This. width = 650; "Title =" f}(%0%3@m'a53zzim%bd@on.jpg "src =" http://s3.51cto.com/wyfs02/M01/43/B0/wKioL1Pbx3iipGUMAADHW08zPD8933.jpg "alt =" wkiol1pbx3iipgumaadhw08zpd8933.jpg "/>

Restart the TFTP service

650) This. width = 650; "Title =" y9cuuy32ykqw%z(oh4gmr%t.jpg "src =" http://s3.51cto.com/wyfs02/M01/43/B0/wKiom1PbxonyBtcWAABADI0CUWI097.jpg "alt =" wkiom1pbxonybtcwaabadi0cuwi097.jpg "/>

 

Configure the PXE boot environment:

1. Install syslinux, # Yum install sysysylinux

650) This. width = 650; "Title =" %((l7f9xqrg5%gg%%9%e9el.jpg "src =" http://s3.51cto.com/wyfs02/M01/43/B0/wKiom1PbySGTefruAAAsLyXp1oE597.jpg "alt =" wkiom1pbysgtefruaaaslyxp1oe597.jpg "/>

 

2. Copy the boot file to the tftboot directory and download the boot file when the client obtains the address.

650) This. width = 650; "Title =" 764h%3cg(na%qp2qif0o9h9.jpg "src =" http://s3.51cto.com/wyfs02/M02/43/B0/wKiom1PbyTGAjBfsAAA3H4_7C-Y945.jpg "alt =" wKiom1PbyTGAjBfsAAA3H4_7C-Y945.jpg "/>

 

3. Configure the DHCP server to specify the download path for the client.

650) This. width = 650; "Title =" qz(dp@1120.0000_8f0xv%7%s1(q.jpg "src =" http://s3.51cto.com/wyfs02/M01/43/B1/wKioL1PbyybiLcJhAACUmrs0xJQ639.jpg "alt =" wkiol1pbyybilcjhaacumrs0xjq639.jpg "/>

 

4. Provides boot kernel and other files

# Cp/Media/CDROM/images/pxeboot/{vmlinuz, initrd. IMG}/var/lib/tftpboot/

# Cp/Media/CDROM/isolinux/{splash.jpg, vesamenu. c32, Boot. MSG}/var/lib/tftpboot

# Mkdir/var/lib/tftpboot/pxelinux. cfg/

# Cp/Media/CDROM/isolinux. cfg/var/lib/tftpboot/pxelinux. cfg/Default

Vmlinuz: Kernel File

Initrd. IMG: root file system

Splash.jpg: The image displayed during boot

Isolinux. cfg: menu displayed at startup

 

5. Provides installation sources and Ks files, which are implemented based on HTTP Services.

# Yum-y install httpd

# Mkdir-PV/var/www/html/centos

# Mount/Media/CDROM/var/www/html/centos

650) This. width = 650; "Title =" 8c0q [n3n0ir31 {~ 3ond6f00.jpg "src =" http://s3.51cto.com/wyfs02/M00/43/B1/wKioL1Pbz6-geUqnAAFR-yj2EXQ149.jpg "alt =" wKioL1Pbz6-geUqnAAFR-yj2EXQ149.jpg "/>

 

I copied the KS. cfg file to/var/www/html/centos. cfg and renamed it centos. cfg.

650) This. width = 650; "Title =" {8 {] R3 $7vsm68% BG ~ Kae ~ Oh.jpg "src =" http://s3.51cto.com/wyfs02/M01/43/B1/wKiom1PbzzvQ031AAAAzhLk9Pl4947.jpg "alt =" wkiom1pbzzvq031aaaazhlk9pl4947.jpg "/>

 

6. Configure the client and start the network card first.

 

Note:

1. Note that the repo and URL addresses must be specified in some parts of the KS file. If not, the yum source cannot be found during installation.

650) This. width = 650; "Title =" 6420.20. I %e8rnd(xe%pfz%yjbt.jpg "src =" http://s3.51cto.com/wyfs02/M00/43/B1/wKiom1Pb0lbgnZYVAAIfVeMYOIM965.jpg "alt =" wkiom1pb0lbgnzyvaaifvemyoim965.jpg "/>

 

2. during installation, whether to format the disk may contain your data. You must agree to format the disk to install the disk. In this way, you cannot automatically install the disk. In this case, add a line of statement to the KS file.

650) This. width = 650; "Title =" c5gbglicc_kf(gb1_tf1i9o.jpg "src =" http://s3.51cto.com/wyfs02/M01/43/B2/wKioL1Pb09-Dg6AfAAHadJkvcJU477.jpg "alt =" wKioL1Pb09-Dg6AfAAHadJkvcJU477.jpg "/>

This article from the fish blog, please be sure to keep this source http://kyfish.blog.51cto.com/1570421/1534028

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.