系统:MAC OS
虚拟机:VMware Fusion
镜像:CentOS
二、下载镜像CentOS
https://www.centos.org/download/ 选最简版 Minimal ISO

三、安装运行CentOS
拖动ISO文件到这儿⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️ 然后一路继续

选择Install CentOS 7 回车

选择最下面的“中文” 并继续

注意 ⚠️ 下面的黄色提示

解决黄色提示之后 开始安装

后面的也要处理一下
root密码不要忘了

然后静静的等待进度条完成吧 。。。。。。。。。。。。点击重启!

好了 成功进入系统 我们要登陆啦 输入用户名 没配置用户名的可以输入root

输入密码 注意 这里的密码是不会显示的 尽管输就好了 然后回车!!!

由于CentOS默认网卡是未激活的 所以现在没有连网 我们输入 ip addr 回车

我的显示下面这些,有的童鞋可能不一样,不过不用慌,记住带有数字的那一串串
在我这里就是ens33
然后输入 cd /etc/sysconfig/network-scripts 回车
输入 ls -a 回车

然后我们要从这堆东西里面找到
以ifcfg开头 加上你刚才记住的那一串数字 别告诉我你忘了 =_=
我这里找到的就是 ifcfg-ens33 没错吧!
然后 vi ifcfg-ens33
把里面的ONBOOT=no 改为 ONBOOT=yes
不会改的别瞎改啊 先自己去百度吧
改完之后就是酱婶儿的
记住我们只改这一个地方哈 其他地方不要动

改好之后 我们需要重启网卡 service network restart 回车
怎么测试呢 ping www.baidu.com 回车
可以看到他自己在一行一行的打印
说明已经可以访问百度啦
然后 command + c

然后呢 输入 yum update 回车!!
我们来更新一波工具包吧 这里输入 y 回车
开始下载

现在可以爬起来喝口水啦 呼~ 没办法 公司的网就是这么卡!慢!
。
。
。
。
。
。
5分钟过去了,Complete!
现在,我们可以利用yum安装一些常用的package啦
由于每次下载安装之前都会询问你一下 直接选 y 就好
yum install vim
yum install wget
yum install zip
yum install unzip
yum install man
yum install gcc
yum install make
yum install setuptool
yum install system-config-network-tui
yum install system-config-firewall-tui
yum install net-tools
。
。
。
。
。
。
又过了5分钟
最后我们可以输入ifconfig 查看自己的ip
其中192.168.189.134 就是我自己的ip
这个ip会在外部访问虚拟机的时候用到

ps:如果中途遇到不能解决的麻烦 让你想删除这个虚拟机🙅
你可以双指单击桌面的Vmware图标 ,在虚拟机资源库里进行删除

网友评论