微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

【无标题】

配置仅主机,配置172
打开终端vim /etc/sysconfig/network-scripts/ifcfg-ens33

systemctl restart network
连接虚拟机,要去本机配置

XSHELL可以连接 

 

 10.51

 

 

 

 去server2

打开终端vim /etc/sysconfig/network-scripts/ifcfg-ens33

改为dhcp

 [root@localhost ~]# systemctl restart network

去win

更改适配器选项,属性,4,自动,,结束

26.36

[root@localhost dhcp]# yum install -y tftp-server xinetd

[root@localhost dhcp]# vim /etc/xinetd.d/tftp

 [root@localhost dhcp]# systemctl start tftp xinetd

[root@localhost dhcp]# systemctl enable tftp xinetd

[root@localhost dhcp]# systemctl restart dhcpd
 [root@localhost dhcp]# cd /mnt
[root@localhost mnt]# ls

[root@localhost mnt]# cd images/
[root@localhost images]# ls
[root@localhost images]# cd pxeboot/
[root@localhost pxeboot]# ls

[root@localhost pxeboot]# cp vmlinuz initrd.img /var/lib/tftpboot/
[root@localhost pxeboot]# yum install -y syslinux
[root@localhost pxeboot]# cd /usr/share/syslinux/
[root@localhost syslinux]# ls

[root@localhost syslinux]# cp pxelinux.0 /var/lib/tftpboot/
[root@localhost syslinux]# yum install -y vsftpd
[root@localhost syslinux]# cd /var/ftp
[root@localhost ftp]# ls
pub
[root@localhost ftp]# mkdir centos7
[root@localhost ftp]# mount /dev/sr0 centos7/
mount: /dev/sr0 写保护,将以只读方式挂载
[root@localhost ftp]# systemctl start vsftpd
[root@localhost ftp]# systemctl enable vsftpd
[root@localhost ftp]# cd /var/lib/tftpboot/
[root@localhost tftpboot]# ls
initrd.img  pxelinux.0  vmlinuz
[root@localhost tftpboot]# mkdir pxelinux.cfg
[root@localhost tftpboot]# cd pxelinux.cfg/
[root@localhost pxelinux.cfg]# vim default
 

default auto
prompt 0

label auto
kernel vmlinuz
append initrd=initrd.img method=ftp://172.16.100.100/centos7
 

[root@localhost pxelinux.cfg]# ls
default
[root@localhost pxelinux.cfg]# cd ..
[root@localhost tftpboot]# ls
initrd.img  pxelinux.0  pxelinux.cfg  vmlinuz
[root@localhost tftpboot]# 
 

原文地址:https://www.jb51.cc/wenti/3282296.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐