VMware安装CentOS6.8,vmwarecentos6.8之后的过程比较简单,
VMware安装CentOS6.8,vmwarecentos6.8之后的过程比较简单,
下载CentOS6.8
在阿里云镜像站下载CentOS6.8操作系统:https://mirrors.aliyun.com/centos/6.8/isos/x86_64/CentOS-6.8-x86_64-bin-DVD1.isohttps://mirrors.aliyun.com/centos/6.8/isos/x86_64/CentOS-6.8-x86_64-bin-DVD2.isohttps://mirrors.aliyun.com/centos/6.8/isos/x86_64/CentOS-6.8-x86_64-bin-DVD1to2.torrenthttps://mirrors.aliyun.com/centos/6.8/isos/x86_64/CentOS-6.8-x86_64-minimal.isohttps://mirrors.aliyun.com/centos/6.8/isos/x86_64/CentOS-6.8-x86_64-minimal.torrent安装虚拟机
VMware中新建虚拟机,这里第一步选择稍后安装操作系统。之后的过程比较简单,这里不再赘述。
安装CentOS操作系统,这里也是按照提示一步一步安装好就行了,一般不会有问题。
遇到的问题:
使用简易安装CentOS 最小化安装包时,在安装VMware Tools时会出错:
installing VMware Tools, Please wait...
mount: special device /dev/had does not exit
mount: block device /dev/sr0 is write-protected,mounting read-only
解决办法1:不使用简易安装,新建虚拟机时选择稍后安装操作系统。
安装过程中出错:
The CentOS disc was not found in any of your CDROM drives. Please insert the CentOS disc and press OK to retry.
解决办法:菜单栏选择虚拟机->可移动设备->CD/DVD(IDE)->连接
安装VMware-tools
先在VMware 菜单栏选择虚拟机->安装VMware Tools
挂载光驱
mount -o ro /dev/cdrom /media
拷贝光驱中的文件到/tmp目录,解压缩后进行安装
[root@CentOS /]# cd /media
[root@CentOS /]# cp ./VMwareTools-10.0.6-3595377.tar.gz /tmp
[root@CentOS /]# cd /tmp
[root@CentOS tmp]# tar -zxvf ./VMwareTools-10.0.6-3595377.tar.gz
[root@CentOS tmp]# cd ./vmware-tools-distrib
[root@CentOS vmware-tools-distrib]# ./vmware-install.pl
然后按照提示安装即可。
出现过的问题:
/usr/bin/perl:bad interpreter:No such file or directory.
这是因为CentOS最小化安装时,没有安装Perl环境,需要使用yum groupinstall “Perl Support”来安装Perl。
安装open-vm-tools CentOS7之后已经有带一个open-vm-tools,这是为了个简化安装流程做的open source版本,所以CentOS7之后版本要安装VMware Tools直接使用下列指令就可以了。
yum -y install open-vm-tools
配置网络
使用NAT模式连接网络
主机配置共享网络
虚拟机配置网络接口信息:
vim /etc/sysconfig/network-scripts/ifcfg-eth0
HWADDR=00:0c:29:A3:55:F1
TYPE=Ethernet
UUID=b47dcb09-98cc-4eaf-893e-0020ac444f07
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.137.10
NETMASK=255.255.255.0
GATEWAY=192.168.137.1
DNS1=114.114.114.114
IPV6INIT=no
USERCTL=no
ARPCHECK=no
重启网络服务
service network restart
配置端口转发
此时主机能与虚拟机互通,但虚拟机与局域网其他主机不能连通,于是做一个端口转发
更换软件源
将CentOS的yum源更换为国内的阿里云源
备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
运行yum makecache生成缓存
yum clean all
yum makecache
相关链接
http://www.centos.org/
http://www.centos.org/docs/
http://www.jianshu.com/p/99927be43a04
http://mirrors.aliyun.com/help/centos?spm=5176.bbsr150321.0.0.d6ykiD
评论暂时关闭