Work notes for configuring PXE server in Linux

Source: Internet
Author: User
Tags mkdir centos file transfer protocol

And the operating system can be started through the network. During the startup process, the terminal requires the server to assign an IP address, and then use TFTP (trivial file transfer protocol) or MTFTP (multicast trivial file transfer protocol) download a startup software package to the local memory for execution. This startup software package completes the terminal (Customer ?) Basic software settings to guide the terminal operating system PXE that is pre-installed on the server to guide a variety of operating systems, such as Windows 95/98/2000/windows2003/windows2008/winXP/win7/win8, and linux.

[Root @ PXE ~] # Yum install syslinux xinetd tftp-server dhcp-y
Dependencies Resolved

========================================================== ========================================================== ========================================================== ==================
Package Arch Version Repository Size
========================================================== ========================================================== ========================================================== ==================
Installing:
Syslinux x86_64 4.04-3. el6 base 346 k
Tftp-server x86_64 0.49-7. el6 base 39 k
Xinetd x86_64. 3.14-39. el6_4 base 121 k
Installing for dependencies:
Mtools x86_64 4.0.12-1. el6 base 194 k
Syslinux-nonlinux noarch 4.04-3. el6 base 584 k

Transaction Summary
========================================================== ========================================================== ========================================================== ==================
Install 5 Package (s)

Total download size: 1.3 M
Installed size: 2.8 M
############ DHCP ############
[Root @ PXE ~] # Yum install dhcp
[Root @ PXE ~] # Cat/etc/sysconfig/dhcpd
# Command line options here
DHCPDARGS = eth0
########### Install apache ############
[Root @ PXE ~] # Yum install httpd
[Root @ PXE ~] # Rpm-qa | grep httpd
Httpd-tools-2.2.15-47.el6.centos.1.x86_64
Httpd-2.2.15-47.el6.centos.1.x86_64
[Root @ PXE ~] #/Etc/init. d/httpd start
########### Copy an image to the apache root directory ############
[Root @ PXE ~] # Mkdir/mnt/cdrom
[Root @ PXE ~] # Mount/dev/cdrom/mnt/cdrom/
Mount: block device/dev/sr0 is write-protected, mounting read-only
[Root @ PXE ~] # Cp-r/mnt/cdrom // var/www/html/# default path of yum apache is/var/www/html
########### Network Daemon service programs ############
[Root @ PXE ~] # Cp/etc/xinetd. d/tftp/etc/xinetd. d/tftp. bk $ (date + % F)
Disable = yes
Change to disable = no
[Root @ PXE ~] #/Etc/init. d/xinetd restart
########### Necessary images ############
[Root @ PXE ~] # Cp/var/www/html/cdrom/images/pxeboot/{initrd. img, vmlinuz}/var/lib/tftpboot/
[Root @ PXE ~] # Cp/var/www/html/cdrom/isolinux/*. msg/var/lib/tftpboot/
[Root @ PXE ~] # Cp/usr/share/syslinux/menu. c32/var/lib/tftpboot/
[Root @ PXE ~] # Mkdir/var/lib/tftpboot/pxelinux. cfg
[Root @ PXE ~] # Cp/var/www/html/cdrom/isolinux. cfg/var/lib/tftpboot/pxelinux. cfg/default
[Root @ PXE ~] # Cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/
[Root @ PXE ~] # Ll/var/lib/tftpboot/pxelinux. cfg/default
-R --. 1 root 936 Jan 23 15:00/var/lib/tftpboot/pxelinux. cfg/default
[Root @ PXE ~] # Cp/var/www/html/cdrom/isolinux/vesamenu. c32/var/lib/tftpboot/
[Root @ PXE ~] # Ll/var/lib/tftpboot/
Total 38316
-R --. 1 root 84 Jan 23 :45 boot. msg
-R --. 1 root 34815427 Jan 23 initrd. img # This is an initialization file, the smallest system Image
-Rw-r --. 1 root 61796 Jan 23 :48 menu. c32
-Rw-r --. 1 root 26759 Jan 23 pxelinux.0 # This file is started for legcay. It is the startup image of legcay.
Drwxr-xr-x. 2 root 4096 Jan 23 pxelinux. cfg
-R --. 1 root 163728 Jan 23 vesamenu. c32 # legacy BIOS boot menu tool, which can be found on a CD or/usr/share/syslinux/
-R-xr-x. 1 root 4152336 Jan 23 :45 vmlinuz # kernel file

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.