部署Linux虚拟机(VMware)

部署Linux虚拟机(VMware)

1. 下载VMware :https://www.vmware.com/products/workstation-pro/workstation-pro-evaluation.html (当然如果已经安装了VMware就跳过)

image-20220709112250551

然后就是安装了,不过没啥需要注意的,就一直 "next" 默认安装就好了

2. 下载 Linux 系统镜像: https://developer.aliyun.com/mirror

image-20220709114409646

image-20220709114430278

3. 在 VMware 创建一个Linux虚拟机

image-20220709114735346

image-20220709114749552

image-20220709114812987

image-20220709114825204

image-20220709114837340

image-20220709114852477

image-20220709114904402

image-20220709114915305

image-20220709114930482

image-20220709114940788

image-20220709114952775

image-20220709115005068

image-20220709115017218

image-20220709115030451

image-20220709115045170

image-20220709115057390

image-20220709115109115

image-20220709115128293

image-20220709115141905

image-20220709115153017

image-20220709115204595

image-20220709115216744

image-20220709115228022

image-20220709115240814

/boot : boot引导区(大小1 GB)
/swap : 交换分区(一般是内存的2倍)
/ :表示剩下的空间都分给linux根目录

image-20220709115255145

image-20220709115307060

image-20220709115319426

image-20220709115330062

image-20220709115353952

image-20220709115405895

image-20220709115417397

image-20220709115430622

image-20220709115442267

4. 咱们成功登录Linux后,来配置一下Linux

(1)获取Linux的IP地址(在Linux命令行输入)

ip a
# 回车后会显示以下界面

image-20220709115648076

(2)咱们获得 Linux 的 IP 后就能远程连接 Linux 了(来先最小化虚拟机)

(注意:Ctrl + Alt 可以将鼠标从虚拟机调出来,然后最小化虚拟机)

win + R  # 也就是风车键+R键
输入 powershell 然后回车

# 在调出的界面里输入命令,远程连接咱的Linux
ssh root@Linux的IP  # 例如:ssh root@192.168.1.108
# 然后输入Linux密码,登录

(3)来配置一下Linux的 yum源(也就是安装源),配置成国内的源

# 去配置文件的目录
cd /etc/yum.repos.d
# 备份配置文件
cp CentOS-Base.repo CentOS-Base.repo.bak
# 删掉原来的配置文件
rm -rf CentOS-Base.repo
# 下载云镜像源并修改配置文件
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
# -o 意思是将下载的内容写到文件CentOS-Base.repo里
# 验证文件的正确性,确保文件中包含了阿里云的下载地址
cat CentOS-Base.repo
# 验证是否可以安装:下载 wget
yum -y install wget

image-20220709140455023

Linux 就此布置成功

有什么疏漏请您多担待,欢迎您的斧正和批评。

posted @ 2022-07-09 15:39  南亭*.*  阅读(173)  评论(0编辑  收藏  举报