前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >基于CentOS中PXE网络环境构建实例

基于CentOS中PXE网络环境构建实例

作者头像
BGBiao
发布2018-02-26 10:50:28
6590
发布2018-02-26 10:50:28
举报
文章被收录于专栏:容器云生态

NO.1########################### prepare software:  system-config-kickstart  syslinux  dhcp   tftp-server  httpd/vsftpd you can use "yum install software" to install packages.

NO.2######################### configure the DHCP-SERVICE: # vim  /etc/dhcp/dhcpd.conf option domain-name "example.org";                      #domain-name option domain-name-servers 172.25.254.186;      #dns-host

default-lease-time 600;                                            #lease-time max-lease-time 7200;                                             #max-lease-time log-facility local7;                                                     #log-type authoritative;                                                           #auth

subnet 192.168.2.0 netmask 255.255.255.0 {          #subnet   range 192.168.2.2 192.168.2.20;                           #IP-pool   option routers 192.268.2.234;                               #default-router   filename "pxelinux.0";                                            #find the pxelinux   next-server 192.268.2.234;                                    #tftp-server } #systemctl restart dhcpd #systemctl enable dhcpd

NO.3#################################### configure the http:(for sharing the system operation) #mount rhel7-x86_64.iso /mnt #cp -r /mnt/* /var/www/html/rhel7 #systemctl enable httpd #systemctl restart httpd

Test the sharing:    Browser http://192.268.2.234/centos OR  configure the vsftpd: #cp -r /mnt/* /var/ftp/pub/rhel7 #chgrp ftp /var/ftp/pub -R #systemctl restart vsftpd #systemctl enable vsftpd

Test the sharing:    Browser ftp://192.268.2.234/centos

NO.4##################################### Use the create kictstart! Generating a ks.cfg.

NO.5#################################### configure a tftp-server:

# vim /etc/xinetd.d/tftp disable                = no    #modify # systemctl restart xinetd.service

NO.6#################################### make some files and pxework-directory! 1) #cd /var/lib/tftpboot/ #mkdir pxelinux.cfg 2) #mount the iso of the rhel7 #cp isolinux/* /var/lib/tftpboot 3) #cp /var/lib/tftpboot/isolinux.cfg   /var/lib/tftpboot/pxelinux.cfg/default #cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ 4) make a userfully install source and kickstart,my of this is in the ftp's(http) pub http://192.268.2.234/centos

ftp://192.268.2.234/ks.cfg 5) config the file of /var/lib/tftpboot/pxelinux.cfg/default like this: default vesamenu.c32 #prompt 1 timeout 600 display boot.msg menu background splash.jpg menu title Welcome to Red Hat Enterprise Linux 6.0! menu color border 0 #ffffffff #00000000 menu color sel 7 #ffffffff #ff000000 menu color title 0 #ffffffff #00000000 menu color tabmsg 0 #ffffffff #00000000 menu color unsel 0 #ffffffff #00000000 menu color hotsel 0 #ff000000 #ffffffff menu color hotkey 7 #ffffffff #ff000000 menu color scrollbar 0 #ffffffff #00000000

label linux   menu label ^Install or upgrade an existing system   menu default   kernel vmlinuz   append initrd=initrd.img label rescue   menu label ^Rescue installed system   kernel vmlinuz   append initrd=initrd.img rescue label small-install   menu label rhel6-small-install   kernel vmlinuz   append initrd=initrd.img repo=http://192.268.2.234/centos ks=ftp://192.268.2.234/pub/ks.cfg noipv6

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档