博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PXE全自动安装操作系统--centos7.3学习笔记
阅读量:6982 次
发布时间:2019-06-27

本文共 2863 字,大约阅读时间需要 9 分钟。

PXE服务器:192.168.110.110

环境准备

安装软件

# yum -y install dhcp tftp-server tftp vsftpd lftp

DHCP配置

# cd /var/dhcp# cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf# vim /etc/dhcp/dhcpd.confsubnet 192.168.110.0 netmask 255.255.255.0 {range 192.168.110.3 192.168.110.88;next-server 192.168.110.110;filename "pxelinux.0";default-lease-time 600;max-lease-time 7200;}

TFTP配置

# yum -y install xinetd    # vim /etc/xinetd.d/tftpdisable =no    # systemctl restart xinetd    # systemctl stop firewalld    # setenforce 0    # chmod 777 /var/lib/tftpboot -R

拷贝引导文件:

# yum provides */pexlinux.0syslinux-4.05-13.el7.x86_64    # yum install syslinux -y    # cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot

准备default文件:

# mkdir /var/lib/tftpboot/pxelinux.cfg    # mount /dev/cdrom /mnt    # cp /mnt/isolinux/* /var/lib/tftpboot/    # cp /mnt/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default    # vim /var/lib/tftpboot/pxelinux.cfg/default    label linux    menu lable ^install CentOS Linux 7    append initrd=initrd.img    inst.stage2=ftp://192.168.110.110/centos7u3 inset.repo=ftp://192.168.110.110/centos7u3 ks=ftp://192.168.110.110/ks.cfg

vsftpd配置

# cd /var/ftp/    # mkdir centos7u3    # mount /dev/cdrom centos7u3    # systemctl start vsftpd

ks.cfg

# platform=x86, AMD64, 或 Intel EM64T    # version=DEVEL    # Install OS instead of upgrade        install    # Keyboard layouts    keyboard 'us'    # Root password    rootpw --iscrypted $1$mxXMfdmL$Sqdg6BBzPf76kWD4WpaU.1user --name=martin --password=$6$qxZqHFOqqG.q3S1E$BDsWv00mnyllWVsDvfscFDDVLOXdoR/qplm5MISsUczVFZTc.HVGCEdKPmWJox5ZYfzIFafuSDq51nE8URJAA1 --iscrypted --gecos="martin"    # System timezone    timezone Asia/Shanghai --isUtc    # Use network installation        url --url="ftp://192.168.87.101/centos7"    # System language        lang en_US    # Firewall configuration    firewall --enabled    # System authorization information        auth  --useshadow  --passalgo=sha512    # Use graphical install        graphical        firstboot --disable    # SELinux configuration            selinux --disable    # Network information            network  --bootproto=dhcp --device=eth0    # 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=200    part swap --fstype="swap" --size=2048    part / --fstype="xfs" --grow --size=1    %packages    @core    @base    bash-completion    vim-enhanced    %end%postmkdir /etc/yum.repos.d/defaultmv /etc/yum.repos.d/C* /etc/yum.repos.d/defaultcat << eof > /etc/yum.repos.d/centos.repo[centos]name=centosbaseurl=ftp://172.16.8.100enabled=1gpgcheck=0eof%end

转载于:https://blog.51cto.com/13523939/2069192

你可能感兴趣的文章
第八章 单件模式 singleton
查看>>
冒泡排序
查看>>
管道的概念和一些用法 初步认识三剑客
查看>>
【第一组】第十四次冲刺例会纪要
查看>>
pyhon简单比较文本相似度的方法
查看>>
.NET设计模式(16):模版方法(Template Method)(转)
查看>>
CentOS 7 host-only 设置上网
查看>>
POI读取Word与Excel
查看>>
设计模式-策略模式
查看>>
L3-007. 天梯地图
查看>>
实验吧 围在栅栏中的爱
查看>>
常用git操作
查看>>
[LeetCode]题解(python):142-Linked List Cycle II
查看>>
gcc 与 g++的区别
查看>>
【Jmeter】分布式并发测试
查看>>
php7.2连接Sqlserver2008 r2
查看>>
设计模式(6)--命令模式
查看>>
L1-029.是不是太胖了
查看>>
TCP协议学习
查看>>
python基础2
查看>>