一、准备工作
1、下载虚拟机(VMware)
版本:VMware Workstation Pro 16
2、下载基于Linux的CentOS
版本:CentOS-7-x86_64-DVD-2009.iso
3、国内主要可信镜像站
镜像站名称 | 网络地址 |
阿里云 | |
网易 | |
搜狐 | |
北京理工大学 | |
重庆大学(http) | |
重庆大学(https) | |
大连东软信息大学 | |
南京大学 | |
南京邮电大学(http) | |
南京邮电大学(https) | |
上海交通大学(http) | |
上海交通大学(https) | |
清华大学(http) | |
清华大学(https) | |
中国科学技术大学(http) | |
中国科学技术大学(https) | |
北京外国语大学(http) | |
北京外国语大学(https) |
二、傻瓜式安装VMware
1、开始安装VMware
这里安装的是:VMware Workstation Pro 16
![](https://img-blog.csdnimg.cn/img_convert/f16b382dc7e14869ac7fcdc9c28e5e6f.png)
2、勾选“我接受许可协议中的条款(A)”
必须勾选接受许可协议,不然无法进行接下来的安装步骤
![](https://img-blog.csdnimg.cn/img_convert/ab29116cdca64a6d8a88017090fc1438.png)
3、选择安装位置及勾选安装其他功能
安装位置是可以自定义的,建议路径中不要出现中文;其余两个功能建议全部勾选
![](https://img-blog.csdnimg.cn/img_convert/be8d0f88c8ec4383903180bfc36f00f9.png)
4、设置你的用户体验计划
这两个功能作用不大,建议取消勾选(默认是勾选的)
![](https://img-blog.csdnimg.cn/img_convert/ad618771401f41bab9832f71c2354986.png)
5、设置快捷方式
这里根据具体需求设置,一般直接默认就行
![](https://img-blog.csdnimg.cn/img_convert/197aaf05a13c454b9867b1afe6333d8b.png)
6、正式开始安装
到这一步算是安装完成了,等着就行
![](https://img-blog.csdnimg.cn/img_convert/39cb1279060b4013898f751d7c5f86d5.png)
![](https://img-blog.csdnimg.cn/img_convert/2ecc920738aa49febc17812979590592.png)
7、安装完毕
如果你不需要配置许可证,那么你只需要选择“完成(F)”就行,接下来的第八步和第九步就与你无关了(还有第十步)
![](https://img-blog.csdnimg.cn/img_convert/4a4f7ef82ac149558a280d96745b6572.png)
8、安装完成,开始配置许可证
密钥的话,可以上网去搜(不一定有效),也可以从官方那里购买
![](https://img-blog.csdnimg.cn/img_convert/1530a29981d1489f99999ae1a1aadd7d.png)
9、许可证配置完成
到这一步,安装和许可证配置都完成了
![](https://img-blog.csdnimg.cn/img_convert/cb904423ce6e469b93644c7d0d9564c0.png)
10、全部安装和设置完毕
无论你有没有配置许可证,你都需要重启你的电脑
![](https://img-blog.csdnimg.cn/img_convert/bbff2682ca8f4c9899a90035d180fa98.png)
三、虚拟机的创建和设置
1、创建新的虚拟机
打开VMware后,可以在界面看到“创建新的虚拟机”选项,选它就行
![](https://img-blog.csdnimg.cn/img_convert/1fbaf234fe9742a09b80b39db6b71ce9.png)
2、选择配置类型
有“经典”和“自定义”可选,这里选“自定义”,因为“自定义”兼容性更好
![](https://img-blog.csdnimg.cn/img_convert/7c12ff98627244fd9816d3c806128f1c.png)
3、设置兼容性(“经典”是没有这一步骤的)
这里的配置全部默认(够用就行),直接“下一步”
![](https://img-blog.csdnimg.cn/img_convert/7789736decfe416ca664c86a6bd008a7.png)
4、稍后安装客户机操作系统
这里选择“稍后安装操作系统(S)”,因为还要设置分区(主要其他的选择都没试过)
![](https://img-blog.csdnimg.cn/img_convert/f71889cb0e6440bbafb93524d3702f94.png)
5、设置客户机的系统类型
这里选择Linux(L)的CentOS 7 64 位,你可以根据具体情况选择
![](https://img-blog.csdnimg.cn/img_convert/8cf65ce312ee455c8da72bde1bb5b746.png)
6、设置虚拟机名称和存放位置
可以改动,这里没有修改,默认了
![](https://img-blog.csdnimg.cn/img_convert/5926e73fb44141748f3784116f251eeb.png)
7、设置处理器配置
根据具体情况决定,这里选择一个CPU两核
![](https://img-blog.csdnimg.cn/img_convert/b04fbe7d68af46ffb226eab7a29cc100.png)
8、配置虚拟机内存
根据具体情况决定,这里给它配了4个G的内存
![](https://img-blog.csdnimg.cn/img_convert/f85a3064cbd44c6e846ddec718d61da6.png)
9、设置网络类型
必须选择“使用网络地址转换(NAT)(E)”,否则虚拟机可能无法使用网络;桥接模式也可以,而且桥接模式下的网站可以在其他设备访问,NAT模式不行;但不建议在这一步骤使用桥接模式,可以后期设置
![](https://img-blog.csdnimg.cn/img_convert/42c44b08cc774ec59628cc1ab9b70167.png)
10、设置控制器类型
这里选择了“LSI Logic(L)”,这是默认的值(直接下一步就行)
![](https://img-blog.csdnimg.cn/img_convert/dc5d07185589482c89af7d4bf8d498e7.png)
11、设置磁盘类型
这里选择了“SCSI(S)”,这是默认的值(直接下一步就行)
![](https://img-blog.csdnimg.cn/img_convert/d0cceefb5c4d43e889edd66e6947c33b.png)
12、选择磁盘
根据具体情况决定,这里选择“创建新的虚拟磁盘(V)”
![](https://img-blog.csdnimg.cn/img_convert/d22c90762cab46889ae968c0f0ac8dbf.png)
13、设置磁盘容量
大小嘛,根据具体情况决定,这里是32G;选项只选“将虚拟磁盘拆分成多个文件(M)
![](https://img-blog.csdnimg.cn/img_convert/1ac3795977064ce298985a81b9af46c5.png)
14、指定磁盘文件
这里直接”下一步“(采用默认值);当然,你也可以选择改动
![](https://img-blog.csdnimg.cn/img_convert/a24bd74cba5643538e999095eb301d72.png)
15、添加操作系统
点击“自定义硬件(C)...” -> 点击“新 CD/DVD(IDE) 自动检测” -> 选择“使用ISO映像文件(M)” -> 浏览并选择你的映像文件 -> 点击“关闭” -> 点击“完成”
![](https://img-blog.csdnimg.cn/img_convert/33e8dc3659604924bd11b7e28ebfe5d9.png)
![](https://img-blog.csdnimg.cn/img_convert/97c2dd95ff094a6791e5a1c7eca0e5eb.png)
![](https://img-blog.csdnimg.cn/img_convert/f9a6edd2fc344734b6ace2aa3d61889f.png)
至此,虚拟机创建完毕并设置好了!
四、安装基于Linux的CentOS
1、准备工作
开启开启虚拟机并点击“我已完成安装”
![](https://img-blog.csdnimg.cn/img_convert/ccefbb0169c845b48d91f2d5bf51d72b.png)
![](https://img-blog.csdnimg.cn/img_convert/2f87c9f5c8784f788a287e9cad16ab14.png)
2、开始安装操作系统
通过上下键选择选中第一个(install CentOS 7并按回车键
![](https://img-blog.csdnimg.cn/img_convert/87ef0824f9d44d99bfdcd41988e75208.png)
3、选择系统语言
根据具体情况选择,这里是选择中文简体
![](https://img-blog.csdnimg.cn/img_convert/7116da6908714673b51787980238f0d3.png)
4、选择时区(设置日期和时间)
根据具体情况选择,这里是选择“亚洲-上海”
![](https://img-blog.csdnimg.cn/img_convert/2cfc308fb7df4b5dafcc63bd360e810f.png)
![](https://img-blog.csdnimg.cn/img_convert/a693bb9969e34e5eadf1c66e291a969e.png)
5、添加键盘布局
原本是有汉语的,但为了以后使用方便,所以这里添加了“英语(美国)”;可以不用添加的
![](https://img-blog.csdnimg.cn/img_convert/2c2e22a3193a479bb3d1913238c9242d.png)
![](https://img-blog.csdnimg.cn/img_convert/76131d5a125b4d0dbd47c336716849b7.png)
![](https://img-blog.csdnimg.cn/img_convert/7cd7a176dfdb4f5ca542739ced1daa2a.png)
![](https://img-blog.csdnimg.cn/img_convert/6ced7bf9a48a4f1ebf85718ea4b9262c.png)
6、软件最小化
这里选择“带GUI的服务器”,因为如果不选择这个,界面会一直是一个黑乎乎的窗口
![](https://img-blog.csdnimg.cn/img_convert/0a47a43dd8904b529d2e78ca2c240c53.png)
![](https://img-blog.csdnimg.cn/img_convert/acb3cb34535248109918f136da78445e.png)
7、选择系统的安装位置和虚拟磁盘分区
可以在选择安装位置时将分区配置好;这里选择的是“我要配置分区(I)”,选了这个就会进入“手动分区”界面
![](https://img-blog.csdnimg.cn/img_convert/06f42d0daac04f01afc5767bc7acdfae.png)
![](https://img-blog.csdnimg.cn/img_convert/fd2f7bf44b054165b9186e0a482fbffb.png)
![](https://img-blog.csdnimg.cn/img_convert/997e5e32af214170b840dce305f7d188.png)
![](https://img-blog.csdnimg.cn/img_convert/d22eb1b86bff4a6e9a63ec611cf29e96.png)
![](https://img-blog.csdnimg.cn/img_convert/5d06a077d403458c97918da1285ad487.png)
![](https://img-blog.csdnimg.cn/img_convert/e4323c55847b4797a93968fc33ef0149.png)
![](https://img-blog.csdnimg.cn/img_convert/de661e39b4d34a75af1d913c2f08e41c.png)
![](https://img-blog.csdnimg.cn/img_convert/f7347ad031624e8ea33ccd7bb10b0c5a.png)
![](https://img-blog.csdnimg.cn/img_convert/f8089740e4884a6a8c1cf2513d96861d.png)
![](https://img-blog.csdnimg.cn/img_convert/3c949403f9aa436abff85343353c8fd4.png)
8、设置网络和主机名
主机名是可以自定义的;记得把“以太网(ens33)”打开,否则也是不能联网的
![](https://img-blog.csdnimg.cn/img_convert/a2516510ccf04f0592eba11ad9758a5f.png)
![](https://img-blog.csdnimg.cn/img_convert/fc7f507216c1465c9e5adf313af474b5.png)
9、正式开始安装操作系统
![](https://img-blog.csdnimg.cn/img_convert/ed9ffce1784f437ca2cb94e82b845df5.png)
10、设置密码
在正式安装操作系统时设置密码
![](https://img-blog.csdnimg.cn/img_convert/3ce46db405af4e008cb76c0fd2b0c570.png)
![](https://img-blog.csdnimg.cn/img_convert/884df408b0be48a5bc84f67ab68d1158.png)
11、创建用户
在正式安装操作系统时创建用户
![](https://img-blog.csdnimg.cn/img_convert/b0b47959514f44db98cf226b20f50fba.png)
![](https://img-blog.csdnimg.cn/img_convert/9c6fe6f878124d2fb146c00380e1ab7e.png)
12、漫长的安装
![](https://img-blog.csdnimg.cn/img_convert/eea731d77079445c933e54af4b793de7.png)
13、操作系统安装完毕
![](https://img-blog.csdnimg.cn/img_convert/2a1ad89a756541efa7ca2da4fe46d338.png)
五、ping百度,测试联网
1、如图,它是成功的,它可以联网
![](https://img-blog.csdnimg.cn/img_convert/de142912015c43d098e85b5ffad44591.png)
2、如图,它是失败的,它无法联网
![](https://img-blog.csdnimg.cn/img_convert/2b512d7425764214a02a8fee32e5f1a4.png)
六、安装宝塔面板(可以不装)
1、切换到root账号
打开终端输入命令su后按下回车键,然后输入root密码(密码是不显示的)
2、输入以下命令进行安装
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
![](https://img-blog.csdnimg.cn/img_convert/ada0fc6d100741c19f9deceb2e55b986.png)
![](https://img-blog.csdnimg.cn/img_convert/4de138fbf2134425b69b5ce6f351b8bd.png)
3、宝塔面板安装完成
![](https://img-blog.csdnimg.cn/img_convert/eeb4d7001ef14cb0aef67df968638210.png)
七、解决部分联网问题
1、如果第一次可以联网,后面无法联网
记得开启网络,虚拟机“应用程序”->“系统工具”->“设置”->“网络”
![](https://img-blog.csdnimg.cn/img_convert/5e9e6894e1dc4601810b65d2b4a3eb5e.png)
![](https://img-blog.csdnimg.cn/img_convert/8dbeeb87bf6c4173ad7d4992e7ebe1e0.png)
![](https://img-blog.csdnimg.cn/img_convert/d7adc5ca276e45dd85e8660ce175c72d.png)
![](https://img-blog.csdnimg.cn/img_convert/23b1907de3e94063a51f358369334527.png)