1.安装虚拟机

2.安装centos6.4

3.分区安装,最小化安装,minimal 安装,没有界面,没有个性化安装,

4.安装vmwaretools   

CentOS安装VMware Tools

出现错误提示:-bash: ./vmware-install.pl: /usr/bin/perl: bad interpreter: No such file or directory

解决方法:找不到perl 语言编译器

yum install prel

是因为没有网络的原因,没有下载完成

打算用远程登录

但是发现最小化安装没有虚拟机最小化安装CentOS,会发现登陆系统后输入ifconfig命令发现找不到etho0网卡只有lo,也就无法查到eth0 的IP地址

成功解决:

虚拟机最小化安装CentOS,会发现登陆系统后输入ifconfig命令发现找不到etho0网卡只有lo,也就无法查到eth0 的IP地址

1、以root用户登陆系统,用ifconfig命令暂时先给eth0一个IP地址,例如“ifconfig eth0 192.168.1.99”

2、在系统的/etc/sysconfig/network-scripts目录下找到ifcfg-eth0文件

3、编辑ifconfig-eth0

    ONBOOT=yes

:wq

4、重启网络服务   #service network restart

5、最后再输入ifconfig命令检查一下,OK,我是成功了

主机与虚拟机相互ping  暂时ping不通

我在Windows7系统安装了虚拟机,通过虚拟机安装了Ubuntu13.04,我设置的主机与虚拟机的连接方式是桥接,安装好后,发现虚拟机ping不通主机,但是主机可以ping通虚拟机。

我的操作是:关闭防火墙,发现虚拟机可以ping通主机了。说明是Windows7防火墙阻止了。

现在存在的问题是:如果我一直关闭防火墙也不是个事啊?这样做会影响我的电脑安全的。于是我想我要先确定防火墙阻止了什么,导致需要关闭防火墙?

于是我在网上查看资料,原来是Windows7的防火墙没有打开ICMPv4-in这个规则,那怎么打开呢:

1. 打开WIN7防火墙

2. 选择高级设置

3.入站规则

4. 找到配置文件类型为“公用”的“文件和打印共享(回显请求 – ICMPv4-In)”规则,设置为允许。

5. 虚拟机可以ping通主机了!

通过远程登录软件可以登录了

更新源

没有wegt命令,yum install wegt 

yum install perl

安装vmwaretools

安装成功但是好像没有效果,应该是最小化安装的原因吧

更新源

有时候CentOS默认的yum源不一定是国内镜像,导致yum在线安装及更新速度不是很理想。这时候需要将yum源设置为国内镜像站点。国内主要开源的开源镜像站点应该是网易和阿里云了。

修改CentOS默认yum源为mirrors.163.com

1、首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo

1

[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup


2、进入yum源配置文件所在的文件夹

1

[root@localhost ~]# cd /etc/yum.repos.d/


3、下载163的yum源配置文件到上面那个文件夹内

CentOS7

1

[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

 
CentOS6

1

[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

 
CentOS5

1

[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS5-Base-163.repo


4、运行yum makecache生成缓存

1

[root@localhost yum.repos.d]# yum makecache


5、这时候再更新系统就会看到以下mirrors.163.com信息

1

2

3

4

5

6

[root@localhost yum.repos.d]# yum -y update

已加载插件:fastestmirror, refresh-packagekit, security

设置更新进程Loading mirror speeds from cached hostfile

* base: mirrors.163.com

* extras: mirrors.163.com

* updates: mirrors.163.com

修改CentOS默认yum源为mirrors.aliyun.com
1、首先备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo

1

[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup


2、下载ailiyun的yum源配置文件到/etc/yum.repos.d/
CentOS7

1

[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo


CentOS6

1

[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo


CentOS5

1

[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

 
3、运行yum makecache生成缓存

1

[root@localhost ~]# yum makecache


4、这时候再更新系统就会看到以下mirrors.aliyun.com信息

1

2

3

4

5

6

[root@localhost ~]# yum -y update

已加载插件:fastestmirror, refresh-packagekit, security

设置更新进程Loading mirror speeds from cached hostfile

* base: mirrors.aliyun.com

* extras: mirrors.aliyun.com

* updates: mirrors.aliyun.com

打包  虚拟机文件

直接压缩OK

最小化安装版只有openssh-server      自己安装openssh-clients

  • openssh-server的功能主要是作为一个服务运行在后台,如果这个服务开启,我们就可以用一些远程连接工具来连接centos。因为minimal版本自带openssh-server,所以XShell可以连上centos

  • openssh-client的功能我觉得类似于XShell,可以作为一个客户端连接上openssh-server,但是Centos6.4的minimal版本不包括openssh-client,所以centos之前出现无法使用ssh登录的情况,centos可以使用如下命令安装客户端:

安装openssh-client
yum install openssh-clients

猜你喜欢

转载自blog.csdn.net/bigfoolee/article/details/82632617
今日推荐