CentOS 7.3虚拟机安装(CDH安装前奏)
2019-06-26 本文已影响0人
绿叶悠
一.安装介绍
基于虚拟机VMWARE 12的CentOS系统安装及配置文档,由于安装CDH需要多台机器,所以我们采用先安装一台模板机,再使用该虚拟机克隆三台新虚拟机(克隆机需要更改里面的网卡MAC)的方式使用,同时可以保留模板机,用于重新安装时再次克隆使用。
二.下载所需安装文件
- CentOS-7-x86_64-DVD-1611.iso: CentOS安装文件,同时在安装完成后将文件上传至系统用于后续CDH安装时缺少的依赖包安装。
- 在线下载地址:http://archive.kernel.org/centos-vault/7.3.1611/isos/x86_64/CentOS-7-x86_64-DVD-1611.iso
三.新建VMWARE虚拟主机
1.新建虚拟主机如图:

- 注意:网络选择桥接模式
四.启动虚拟机, 选择安装CentOS7

- 注意:鼠标要点击黑屏,才能通过上下键选择,然后回车
五.一阵黑屏闪过,进入图形界面,选择语言

六.主选项页-位置选择

- 时区:选择上海
- 其它默认就是US即可
七.主选项页-软件选择

- SOFTWARE : 选择点开后的第二项:Compute Node
八.主选项页-系统设置

1.INSTALLATION DESTINATION选择自动分区:

2.KDUMP和NETWORK保持默认
3.SECURITY POLICY选择OFF:

九.点击Begin Installation开始安装
十.在安装界面设置root密码

1.设置root密码为: 123456

2.USER CREATION不需要
十一.等—安装完成: Reboot

十二.又一是阵黑屏闪过,系统安装成功

- 输入账户 root,密码 123456 进行系统
- 输入以下命令关闭系统
shutdown -h now
十三.克隆
- 克隆菜单:右键->管理->克隆(注意:克隆选择:完整克隆)
十四.修改各系统网卡MAC
对新克隆的系统,在虚拟机设置中将网络适配器 移除再重添加,即可避免MAC一样的问题

十五.设置各系统IP和主机名
在文件 /etc/sysconfig/network-scripts/ifcfg-ens33 中添加或更改以下各项
(有则更改无则添加, 最后的文件名可能根据你的网卡名有差异)
TYPE=Ethernet
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.205
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
- 填写你的IP地址
十六.修改各系统主机名
使用命令:
hostnamectl set-hostname xxx
分别修改三台主机的主机名,如:
hostnamectl set-hostname master01
hostnamectl set-hostname slave01
hostnamectl set-hostname slave02