在VMware vSphere Client下使用Linux虚拟机安装CentOS6.4系统
序言:公司要准备虚拟化,将配置比较高的物理机虚拟化成 N 个虚拟机,以便可以给更多的应用服务提供服务。
1,使用vShere client连接到物理机上面,选择“配置”--“存储器”—“数据存储”,右键点击选择“浏览数据存储”,就可以上传文件,如下图所示:
2,将需要安装的centos.iso文件上传上去。
3,右键开始创建虚拟机,然后选择安装类型
4,输入虚拟机名称

5,选择虚拟机文件的目标存储,选择虚拟机的操作系统(Linux系统)

6,选择虚拟机的操作系统类型

7,选择虚拟机所使用的磁盘空间大小

8,在完成前,选择“完成前编辑虚拟机设置”

9,选择虚拟机的内核数

10,选择为在虚拟机里面安装的iso文件,这里选择从光盘进行安装。
11,需要在设备状态下,把“已连接”和“打开电源时连接”选上,这样重启虚拟机就可以进行安装了,如下所示:

12,开始从光盘安装开始虚拟机的Linux系统,打开电源,然后查看控制台,如下所示:
13,安装模式选择
Install or upgrade an existing system 安装或升级现有的系统
install system with basic video driver 安装过程中采用 基本的显卡驱动
Rescue installed system 进入系统修复模式
Boot from local drive 退出安装从硬盘启动
Memory test 内存检测
由于是导入已有的iso系统,所以这里选择第一项,安装或升级现有的系统,回车。

14,出现是否对CD媒体进行测试的提问,这里选择“Skip”跳过测试。

15,继续下一个,选择“Next”

16,安装流程的语言选择,默认English(这些基本英语术语大家都OK吧,好歹小学中学大学学了那么久的英语,^_^)。

17,键盘模式选项为“U.S English”,美式键盘

18,安装设备选择,基本存储设备模式即可,选择“Basic Storage Devices”。
19,忽略这些原来的数据,选择“Yes,discard any data”
20,别点击“Configure Network”,以后手动配置即可,然后点击“Next”

21,时区上,时区选择:亚洲/上海,往下拉选择“Asia/Shanghai”,然后点击“Next”,


22,对root用户设置密码,然后输入密码,点击“Next”

23,磁盘分区选择,自定义布局,所以选择“Create Custom Layout”,然后点击“Next”
24,开始创建磁盘,点击“Create”按钮,选择“Standard Partition”选项,点击“Create”
可以看到硬盘的容量,我这里显示的是60G,现在自定义分区。
注意:分区之前,自己先要规划好,怎么分区,我这里的分区如下:
硬盘总共60G,内存8G;
/boot目录分配200M即可;Swap2G(内存小于2G时,设置为内存的2倍;内存大于或等于2G时,设置为2G,我这里内存是8G,所以这个我设置2G);根目录/则分配余下的所有磁盘空间
特别说明:用于正式生产的服务器,切记必须把数据盘单独分区,防止系统出问题时,保证数据的完整性。比如可以再划分一个/data专门用来存放数据。

(1),创建/boot目录,200M

(2),创建swap分区,2G

(3),创建主磁盘分区,所有磁盘空间
25,磁盘分配完毕,点击“Next”

26,在弹出的窗口中,选择“Format”开始进行格式化操作。

27,再在弹出的窗口中选择“Write changes to disk”进行格式化写入操作

28,然后完成格式化后,选择“Next”操作

29,选择“Customize now”按钮,接下来选择自己安装的组件:
默认是:Minimal(最小);如果是初次学习,建议选择:Desktop (桌面),如果是用作正式服务器,建议选择:Minimal(最小),这里选择:Minimal,然后选择自定义,选择“Customize now”按钮,点击“Next”按钮继续下一步。

30,这里选择一些基本的网络服务组件和Perl组件、语言包组件以及Server组件即可,
(Perl是必选的,否则无法安装VMware Tools,system managerment tools,network tools必选的,否则无法上网,其他的看着选吧)
其它的可以等安装好linux系统自己更加需要在yum安装下,选择好,点击“Next”进行下一步。


31,开始安装包组件

32,等待安装完组件之后,需要重启,点击“Reboot”按钮进行重启。

33,重启之后,使用root用户登录,进去配置虚拟机的网络。
配置网络IP地址:
ifconfig eth0 10.2xx.1.xx netmask 255.255.255.0
配置路由器地址:
route add add -net 0.0.0.0 gw 10.2xx.1.1
重启下网络服务:
service network restart
34,check下网络,cmd下ping下服务器
正在 Ping 10.2xx.1.xx 具有 32 字节的数据:
来自 10.2xx.1.xx 的回复: 字节=32 时间=69ms TTL=63
来自 10.2xx.1.xx 的回复: 字节=32 时间=84ms TTL=63
来自 10.2xx.1.xx 的回复: 字节=32 时间=66ms TTL=63
来自 10.2xx.1.xx 的回复: 字节=32 时间=63ms TTL=63
10.254.1.50 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 63ms,最长 = 84ms,平均 = 70ms
C:\Users\Administrator>
OK,到此,基本的Linux虚拟机搭建完成,以后可以根据自己需求去安装自己所需要的服务组件了。
<版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!>
原博客地址: http://blog.itpub.net/26230597/viewspace-1380155/
原作者:黄杉 (mchdba)
----------------------------------------------------------------------------------------------------------------