centos7.5+PXE批量装机

一、dhcp

yum install dhcp -y

vim /etc/dhcp/dhcpd.conf

option domain-name "bw.edu";

option domain-name-servers 192.168.100.10;

default-lease-time 3600;

max-lease-time 7200;

log-facility local7;

subnet 192.168.100.0 netmask 255.255.255.0 {

range 192.168.100.110 192.168.100.120;

option routers 192.168.100.1;

option broadcast-address 192.168.100.255;

next-server 192.168.100.10;

filename "pxelinux.0";

}

systemctl start dhcpd

systemctl enable dhcpd

二、tftp

yum install xinetd tftp-server -y

vim /etc/xinetd.d/tftp

disable = no

systemctl start xinetd

systemctl enable xinetd

三、http

yum install httpd -y

cd /var/www/html/

mkdir c75

vim /etc/fstab

/dev/cdrom /var/www/html/c75 iso9660 defaults 0 0

mount -a

systemctl start httpd

systemctl enable httpd

四、pxe

yum install syslinux -y

cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/

cp /var/www/html/c75/isolinux/* /var/lib/tftpboot/

cd /var/lib/tftpboot

mkdir pxelinux.cfg

vim default

default auto

prompt 0

label auto

kernel vmlinuz

append initrd=initrd.img repo=http://192.168.100.10/c75 net.ifnames=0 biosdevname=0

systemctl restart xinetd

五、kickstar

vim /var/www/html/ks.cfg

#platform=x86, AMD64, Intel EM64T

#version=DEVEL

#Install OS instead of upgrade

install

#Keyboard layouts

keyboard 'us'

#Root password

rootpw --iscrypted $1$BLvzFvW5$o9hcmRp6Q1b8.OCLTKeZo/

#System timezone

timezone Asia/Shanghai

#Use network installation

url --url="http://192.168.100.10/c75"

#System language

lang en_US.UTF-8

#Firewall configuration

firewall --disabled

#System authorization information

auth --passalgo=sha512

#Use graphical install

text

firstboot --disable

#SELinux configuration

selinux --disabled

#Reboot after installation

reboot

#System bootloader configuration

bootloader --location=mbr

#Clear the Master Boot Record

zerombr

#Partition clearing information

clearpart --all --initlabel

#Disk partitioning information

part /boot --fstype="xfs" --size=256

part swap --fstype="swap" --size=512

part / --fstype="xfs" --ondisk=sda --size=1 --grow

%packagesbr/>@base

@compat-libraries

br/>@core

@development

-postfix

%end

vim /var/lib/tftpboot/pxelinux.cfg/default

default auto

prompt 0

label auto

kernel vmlinuz

append initrd=initrd.img ks=

http://192.168.100.10/ks.cfg repo=http://192.168.100.10/c75 net.ifnames=0 biosdevname=0

systemctl restart xinetd

systemctl restart httpd

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 在正式学习音频开发之前,我们要认识下关于音频的一些基础。这些知识会有助于我们后面学习iOS的音频框架。 基础知识 ...
    hoping_sir再次归来阅读 2,150评论 1 3
  • 街上的雪花窸窸窣窣的飘着,白色的瘆人的温度透过眼睛折射进人们心里,心瑟瑟发抖,来往的人们摇拽的身体无处可逃,...
    寂寞空间阅读 311评论 0 6
  • 五花肉の日记的第十六篇日记,坚持第十六天。 2018.4.8 晴 补昨天日记。 1、头天计划早起送公婆去火车站后去...
    你的五花肉阅读 174评论 0 0
  • 前两天看到同学晒的红包了。因为异地,而且男朋友中秋也有事不能过去找她,所以发红包让她去买月饼吃。底下一片的羡慕、感...
    小九9阅读 251评论 0 1
  • 4月20日,新宁崀山培英十一位年轻骨干教师长郡学习归来,个人总结、集体备课、交流经验,上次创新课,提炼、实践、沉淀...
    亦农阅读 430评论 0 3