win10安装CentOS7虚拟机并配置静态IP开启ssh

1.下载CentOS7镜像文件
链接:http://mirrors.163.com/centos/7.8.2003/isos/x86_64/
点击创建新的虚拟机

win10安装CentOS7虚拟机并配置静态IP开启ssh_第1张图片
选择典型就行,然后下一步
win10安装CentOS7虚拟机并配置静态IP开启ssh_第2张图片
win10安装CentOS7虚拟机并配置静态IP开启ssh_第3张图片
win10安装CentOS7虚拟机并配置静态IP开启ssh_第4张图片
win10安装CentOS7虚拟机并配置静态IP开启ssh_第5张图片
win10安装CentOS7虚拟机并配置静态IP开启ssh_第6张图片
win10安装CentOS7虚拟机并配置静态IP开启ssh_第7张图片
win10安装CentOS7虚拟机并配置静态IP开启ssh_第8张图片
然后按照提示敲回车,可以选择简体中文
win10安装CentOS7虚拟机并配置静态IP开启ssh_第9张图片
win10安装CentOS7虚拟机并配置静态IP开启ssh_第10张图片
可以设置root用户的密码
win10安装CentOS7虚拟机并配置静态IP开启ssh_第11张图片

win10安装CentOS7虚拟机并配置静态IP开启ssh_第12张图片
点击重启虚拟机
2.配置静态IP并开启ssh
使用刚刚配置的root账户密码登录虚拟机,配置网络
vi /etc/sysconfig/network-scripts/ifcfg-ens33
win10安装CentOS7虚拟机并配置静态IP开启ssh_第13张图片
IPADDR是配置的ip地址,配置为有效ip即可(有效IP:如下图区间之间的ip地址都可以)
虚拟机导航栏 编辑–>虚拟网络编辑–>VMnet8–>DHCP设置
win10安装CentOS7虚拟机并配置静态IP开启ssh_第14张图片

GATEWAY是网关地址,如下图寻找
虚拟机导航栏–编辑–>虚拟网络编辑–>VMnet8–>NAT设置
win10安装CentOS7虚拟机并配置静态IP开启ssh_第15张图片
设置完成后重启网卡服务:systemctl restart network
查看状态:systemctl status network
win10安装CentOS7虚拟机并配置静态IP开启ssh_第16张图片
查看刚设置的ip:ip addr
win10安装CentOS7虚拟机并配置静态IP开启ssh_第17张图片
然后开启ssh:systemctl start sshd
查看状态:systemctl status sshd
在这里插入图片描述
win10安装CentOS7虚拟机并配置静态IP开启ssh_第18张图片
静态ip设置成功,ssh开启。
配置域名解析器地址:https://blog.csdn.net/weixin_43648994/article/details/108401474

你可能感兴趣的:(学习ing)