【无标题】

配置仅主机,配置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]# 
 

相关文章

显卡天梯图2024最新版,显卡是电脑进行图形处理的重要设备,...
初始化电脑时出现问题怎么办,可以使用win系统的安装介质,连...
todesk远程开机怎么设置,两台电脑要在同一局域网内,然后需...
油猴谷歌插件怎么安装,可以通过谷歌应用商店进行安装,需要...
虚拟内存这个名词想必很多人都听说过,我们在使用电脑的时候...