作为IT的同学,我们都会接触到一些中间件啊,数据库啊,像数据库这些我们本地都会安装,但是一些中间件的话可能都会放到云服务器或者我们的Linux中去集中管理比较合适,不然的话放在我们的电脑上会显得很乱且难以维护。 今天我就先带大家手把手教学,先给自己的电脑装一个Linux系统,我们的镜像基本上都是CentOS 7,这里我也就用CentOS 7 来作为示例给大家演示操作一遍。
本篇文章对小白极度友好
虚拟机软件这个我们大家可以从网上直接搜索下载使用

虚拟机软件下载好了之后我们就可以去官网中下载我们需要的镜像了The CentOS Project
这里我们去选择阿里云的镜像,因为我们一般配置镜像加速都是阿里云的,速度会比较快,所以这里我们也就选择阿里云的镜像
文件比较大,慢慢等待下载,下载完成之后我们就可以去安装镜像了 下载后我们将其存放在一个位置上,后续方便我们使用,以后镜像的位置就不要动了,以免影响我们后续的使用,如果镜像位置发生变动的话会导致虚拟机找不到镜像。
开始跟着我的步骤慢慢来吧
1.先创建虚拟机

2.选择典型,即推荐的

3.接着下一步,这里就先不安装操作系统

4.这里我们选择Linux 和 CentOS 7 64位,因为我们下载的镜像也是CentOS 7

5.这里我们要将安装位置设置到其他盘中,以免过于占用C盘资源,影响电脑使用性能。

6.这里设置大小的话一般默认即可,内存够大的可以稍微调高个10G

7.这里我们先不要着急点击完成,我们先去做一下其他设置

8.这里我们选择我们自己下载的CentOS 7 镜像

9.这里内存根据自己的电脑配置自行判断

10.这里处理器也是根据自己的电脑配置自行判断,设置完成后点击完成即可

11.开启虚拟机,鼠标点进去后按一下回车键等待其自行安装,里面有一步骤是在checking,这个过程很慢,我们可以按ESC跳过

12.拉到最下面,选择中文

13.点击安装位置
14.开始配置网络(前提是我们的本地电脑处于联网状态)

15.开启开关后点击完成

16.开始安装

17.进行个人相关设置,然后等待安装即可

18.安装完成后我们就可以使用了

19.输入用户名root和密码进行登陆(输入的密码不会显示)

20.可以使用了已经,并且网络也是可以用的

这里我们想要查看自己的ip地址的话使用命令ifconfig
,但是我们刚安装的镜像基本上都会命令无法使用,所以我们需要去下载net-tools
工具,但是前提是我们的虚拟机联网了,如果下载不成功需要我们关闭虚拟机在设置里重新配置一下网络

输入命令sudo yum install net-tools
进行安装,中间需要我们输入两次 y 代表同意安装,很快就会安装完成,然后在输入ifconfig
就可以显示了


感谢大家能看到这里,如果这篇文章能帮助大家,希望大家点个赞再走吧