centos7.5+PXE批量装机
一、dhcp
【centos7.5+PXE批量装机】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
推荐阅读
- Arcgis根据经纬度批量提取属性值
- 批量获取win10的聚焦锁屏图片
- 2020-08-13|2020-08-13 同花顺证书批量下载
- Metal|Metal 案例03(大批量顶点数据的图形渲染)
- 华为王成录(鸿蒙系统将超越安卓和IOS,2021年装机量将达3到4亿)
- Vue+jszip+file-saver|Vue+jszip+file-saver 实现el-table中qrcode生成的二维码图片批量打包成zip下载
- Jquery表单序列化json+批量判断是否为空
- 使用Mysql|使用Mysql 存储过程,批量插入100万条数据
- 河北省粉末灌装机厂家
- 批量insertOrUpdate或replace-into使用useGeneratedKeys报错简单分析