图文并茂!手把手教你在 VMware 中的安装部署 Linux-CentOS7.4
介绍
Linux 已经成为我们开发者常用的服务器系统,甚至有大部分的开发人员喜欢把 Linux 作为日常使用的系统,有些程序员使用 Linux 开发是为了缩小开发环境和线上生产环境的差异,避免由于开发环境和生产环境差异产生的一些未知问题。
Linux 作为一类操作系统问世多年,始终不温不火,给大家的感觉十分神秘。主要是对于日常的使用,人们还是更喜欢使用 window 或者 Mac 作为常用的系统平台,可视化,桌面化,操作简单,学习成本低,可以说是有手就行的,鼠标点点就能解决问题。不会像很久很久以前的 Dos 系统,需要记忆大量的命令,虽然 Linux 也有桌面的发行版,但是不够普及,没有 windows 和 Mac 好用,而且对日常使用软件的支持不够全面,虽然近些年有很大改进。不过在日常的使用中虽然不受人们喜欢,但是他依然是我们作为服务器的首选,据不完全统计,全球所有网站服务器中,Linux 的比例达到了 36.6%,超过了 windows 的 30.2%。近些年来最火热的大数据和人工智能领域,Linux 更是不二人选,成为 OpenStack、Hadoop 等分布式平台所支持的操作系统。同时也得到了 Google、Amazon、阿里云等云平台的青睐。而且作为服务器,他有以下几个优点:免费开源、稳定并且有强大的社区支持、使用自由、海量开源应用程序,还有最重要的一个就是安全,特别是作为服务器最重要的就是安全。
既然他对我们开发来说这么重要,那就让我们用起来吧,用起来的第一步那肯定就是安装,毕竟巧妇难为无米之炊,就像学习一门语言一样,拥有环境才能愉快地耍起来。
下面进入正题:
VMware 中安装 CentOS7.4 的安装步骤及注意事项
安装前的准备:
VMware(支持使用正版!下一步下一步安装即可)、
CentOS7.4(
各镜像网站:http://mirrors.aliyun.com
)
以阿里云为例:
1.打开网页

2.选择相应版本

3.选择系统项

4.选择 x86_64
5.选择 CentOS-7-x86-Everything-1708.iso

VMware 中的准备步骤
1.创建虚拟机

2.选择配置类型

3.作为一个有理想的青年应该选这项

4.选择安装操作系统的相关类型
这里如果选错了也没有太大关系但是有些地方会有影响(如,要安装 linux 却选择成了 windows,它的影响会表现在如让我们的虚拟机跟我们的宿主机交互时更方便,它在安装时会安装一些额外的工具,我们称为 vmware Tools,如为时间能够大保持时间同步,会额外安装一个程序,这个程序会自动选择这里选择的系统相匹配的版本,所以如果这里要安装 linux 而选择时选择的是 windows,则它所自动选择的版本就是 windows 相匹配的版本去安装,所以会有问题)

5.配置虚拟机的名称(标签上会显示名称),安装的位置不必相同(建议选择空间较大位置)

6.配置磁盘大小(大小无所谓,使用中逐渐增大不会立即分配出设定大小空间,大于实际空间无意义)

7.接下来点完成
8.编辑虚拟机的一相关设置

9.内存可以设置稍大些(内存的 1.5 倍,1.5G,2G)

10.处理器的数量也可以选择一下,但是核心数不要超过物理机实际核心数量

11.CD/DVD(IDE),启动时连接要勾上,安装完成后如果想要安装软件包时挂载不上,可以查看这里的选项是否勾选

12.网络适配器,刚开始,可以选择仅主机模式,后面如果需要连接其它机器可以选择桥接模式
仅主机模式:顾名思义只是在各虚拟主机之间自己玩,不能连接其它主机
桥接模式:共享了主机网卡,可以连接其它主机
NAT 模式:NAT 作为地址转换,你可以连接到别人,但是别人连接不到你

安装 CentOS
13.接下来点击开启虚拟机,进入到如下 页面,点击屏幕进入,上下键选择第一项开始安装(鼠标如果想退出按 CTRL+ALT)

14.现在进入系统的一些配置,选择语言,作为以此来谋生计的来说建议选择英文,毕竟企业生产环境都是英文,以后如果我们有自己的操作系统了,我们毫不犹豫的选择中文(现在还是在学习阶段)

15.时间的设置

16.如果时间不好选择,可以先在选择框选择,点 Done

17.选择安装什么类型的操作系统,刚开始学习选一个带图形界面的过渡下,应该是不错的选择(默认是最小化安装,实际生产环境是选择电小化安装)

18.这里可以选择 KDE,也可以选择 Gnome

19.这里是系统分区的一些设置,点击进入

20.作为即将成长为大牛的小菜来说,果断选择此项

21.接下来挂载点,选择 Standard Partition(默认是 LVM)

22.现在我们要设计一下我们的分区
/boot: 系统的引导分区,不必过大 1G 即可(独立一个分区)
/ : 根系统要安装在这里可以稍大些 50G(独立一个分区)
/swap: 交换分区(是内存的两倍即可,这里如果内存占用完了,可以用到这里)(独立一个分区)
/app : 我们自己的一个安装程序分区 20G
23.下面我们根据我们的设计的分区依次来完成实际分区

24.在 Mount Point 选择/boot,Desired Capacity:1G

25.在 Mount Point 选择/,Desired Capacity:50G

26.在 Mount Point 选择/swap,Desired Capacity:2G

26.在 Mount Point 选择/app,Desired Capacity:20G

27.到此分区完成,Done

28.配置一下网络

29.把网络打开,设置一下 Host name(主机名),位置比较隐秘,不经意就过去了

30.接下来进行期待已久的时时刻 Installation,出发!

至此 CentOS7.4,已经配置完成,成长第一步开始
版权声明: 本文为 InfoQ 作者【迷彩】的原创文章。
原文链接:【http://xie.infoq.cn/article/5fede2241743804fef67002ce】。文章转载请联系作者。
评论