本地安装CDH集群——(1)保姆级CentOS7安装及配置教程

一、使用VMware Workstation Pro安装CentOS 7

1.安装并打开VMware Workstation Pro。

centos的iwlist无效 centos which_big data

2.选择创建新的虚拟机。

centos的iwlist无效 centos which_root用户_02

3.选择自定义。

centos的iwlist无效 centos which_centos的iwlist无效_03

4.为了更好的稳定性与兼容性,选择Workstation 12.x。

centos的iwlist无效 centos which_big data_04

5.选择稍后安装操作系统。

centos的iwlist无效 centos which_big data_05

6.客户机操作系统选择Linux,版本选择CentOS 7 64位。

centos的iwlist无效 centos which_root用户_06

7.修改好虚拟机的名称以及路径。

centos的iwlist无效 centos which_centos的iwlist无效_07

8.选择适当的处理器个数与内核数量(稍后可自行更改)。

centos的iwlist无效 centos which_big data_08

9.选择适当的内存容量。

centos的iwlist无效 centos which_root用户_09

10.选择网络类型为:使用网络地址转换(NAT)。

centos的iwlist无效 centos which_centos的iwlist无效_10

11.I/O控制器选择 LSI Logic。

centos的iwlist无效 centos which_big data_11

12.磁盘类型选择SCSI(S)。

centos的iwlist无效 centos which_CentOS_12

13.选择创建新虚拟磁盘。

centos的iwlist无效 centos which_big data_13

14.分配磁盘大小并勾选将虚拟磁盘拆分成多个文件。

centos的iwlist无效 centos which_root用户_14

15.磁盘文件名不用修改,直接下一步。

centos的iwlist无效 centos which_big data_15

16.点击自定义硬件。

centos的iwlist无效 centos which_CentOS_16

17.选中声卡,将其移除。

centos的iwlist无效 centos which_centos的iwlist无效_17

18.选中CD/DVD 将自动检测改为使用ISO镜像文件,并选择CentOS7的镜像文件。

centos的iwlist无效 centos which_root用户_18

19.然后点击完成,完成虚拟机的设置。

centos的iwlist无效 centos which_big data_19

20.选中刚刚新建的虚拟机,并点击开启此虚拟机。

centos的iwlist无效 centos which_centos的iwlist无效_20

21.进入之后选择Install CentOS 7

centos的iwlist无效 centos which_big data_21

22.地区和语言都选择English,然后continue。

centos的iwlist无效 centos which_root用户_22

23.DATE&TIME 选择Shanghai。

centos的iwlist无效 centos which_big data_23


24.INSTALLATION DESTINATION 选择之后,进去直接点击done,然后点击Begin Installation。

centos的iwlist无效 centos which_big data_24

centos的iwlist无效 centos which_root用户_25

25.设置ROOTPASSWORD,完成之后点击done。

centos的iwlist无效 centos which_ip地址_26

centos的iwlist无效 centos which_centos的iwlist无效_27

26.点击USER CREATION ,创建用户

centos的iwlist无效 centos which_CentOS_28

centos的iwlist无效 centos which_root用户_29

27.等读条完毕之后,点击reboot,至此,CentOS 7 系统安装成功,接下来要做的是系统内的相关配置。

centos的iwlist无效 centos which_root用户_30

二、虚拟机的备份以及导入

1.重启之后使用root用户登入系统,然后使用shutdown -h now 命令来关闭虚拟机。

centos的iwlist无效 centos which_centos的iwlist无效_31


centos的iwlist无效 centos which_root用户_32

2.虚拟机关闭之后,选中虚拟机,点击文件,然后选择导出为OVF,然后选择路径,命名为XXXback。

centos的iwlist无效 centos which_big data_33

3.等待读条完成即导出完成。

centos的iwlist无效 centos which_ip地址_34

4.完成之后,选择文件–>打开,并打开刚刚备份的文件。

centos的iwlist无效 centos which_ip地址_35

5.修改虚拟机名称以及路径,然后选择导入。

centos的iwlist无效 centos which_centos的iwlist无效_36

6.等读条完毕之后即导入成功。

centos的iwlist无效 centos which_centos的iwlist无效_37

三、CentOS 7内IP地址及网关设置

1.进入CentOS 7并使用root用户登入系统。

centos的iwlist无效 centos which_centos的iwlist无效_38

centos的iwlist无效 centos which_big data_39

2.依次输入systemctl stop firewalld以及systemctl disable firewalld 停用并禁用防火墙,注意,此时必须是由root用户登录,否则权限不够,若非root用户登录,可使用 su XXX(用户名) 命令来切换用户。

centos的iwlist无效 centos which_CentOS_40

3.使用cd /etc/sysconfig/network-scripts/ 命令来跳转至network-scripts目录,并使用ls命令来查看当前目录下的所有文件。

centos的iwlist无效 centos which_CentOS_41

4.使用vi ifcfg-ens33命令来修改ifcfg-ens33文件。

centos的iwlist无效 centos which_centos的iwlist无效_42

5.回车之后,按i进行插入,将ONBOOT修改为yes,并插入 IPADDR=192.168.60.XXX 来设置ip地址,插入GATEWAY=192.168.60.2 来设置网关,插入NETMASK=255.255.255.0 来设置子网掩码,插入DNS1=8.8.8.8 来设置DNS。并按一下esc键,再输入:x进行保存。

centos的iwlist无效 centos which_big data_43

centos的iwlist无效 centos which_big data_44

6.ip地址的号段是通过 编辑–>虚拟网络编辑器中的VMnet8的DHCP中的ip地址范围来决定的。网关以及子网掩码需要与NAT设置中的网关以及子网掩码保持一致。

centos的iwlist无效 centos which_root用户_45

centos的iwlist无效 centos which_root用户_46

7.输入systemctl restrat network.service命令来重启网络服务。

centos的iwlist无效 centos which_big data_47

8.重启完之后使用 ping www.baidu.com 命令来ping网络连接,使用ctrl+c来结束测试,如下图所示则网路连接正常。

centos的iwlist无效 centos which_root用户_48

四、Xshell 6 的安装与使用

1.安装Xshell 6 以及 Xftp 6。

2.打开Xshell 6 ,选择新建。

centos的iwlist无效 centos which_ip地址_49

3.输入名称以及主机,主机要与刚刚设置的ip地址保持一致。

centos的iwlist无效 centos which_centos的iwlist无效_50

4.点击用户身份验证,并输入root用户名与密码。

centos的iwlist无效 centos which_ip地址_51

5.选择保存并接受。

centos的iwlist无效 centos which_CentOS_52

6.出现如下界面,则使用Xshell 6登入远程虚拟机成功。

centos的iwlist无效 centos which_root用户_53

五、Xftp 6的安装与使用

1.安装完Xftp 6 之后,打开软件,选择新建。

centos的iwlist无效 centos which_ip地址_54

2.输入名称与主机地址,地址与ip地址保持一致,协议选择SFTP,输入root用户名与密码,点击确定。

centos的iwlist无效 centos which_big data_55

3.选择刚刚新建的会话名称,点击连接。

centos的iwlist无效 centos which_big data_56

4.出现如下界面则连接成功。

centos的iwlist无效 centos which_root用户_57