一,搭建大数据集群环境
(由于内容过多分为了4个博客,后面有链接分享,也可去我的主页查看)
1.1安装准备
1.1.1虚拟机安装与克隆
1.虚拟机的安装和设置以及启动虚拟机并安装操作系统
安装一台虚拟机主机名为:hadoop01的虚拟机备用(以下仅供参考)
VMware虚拟机安装Linux教程(超详细)_vmware安装linux虚拟机_七维大脑的博客-CSDN博客https://blog.csdn.net/weixin_52799373/article/details/124324077?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522169284581716800222858488%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=169284581716800222858488&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-3-124324077-null-null.142%5Ev93%5Econtrol&utm_term=%E8%99%9A%E6%8B%9F%E6%9C%BA%E7%9A%84%E5%AE%89%E8%A3%85%E5%92%8C%E8%AE%BE%E7%BD%AE&spm=1018.2226.3001.4187
2.克隆虚拟机
克隆两台虚拟机主机名分别为:hadoop02、hadoop03备用。(以下仅供参考)
虚拟机克隆的两种方式_虚拟机怎么克隆_梦中挽歌的博客-CSDN博客https://blog.csdn.net/awd15771131554/article/details/123778655?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522169284602516800213011597%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=169284602516800213011597&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-2-123778655-null-null.142%5Ev93%5Econtrol&utm_term=%E8%99%9A%E6%8B%9F%E6%9C%BA%E7%9A%84%E5%85%8B%E9%9A%86&spm=1018.2226.3001.4187
1.1.2虚拟机网络配置
1.主机名与ip映射配置
开启三台虚拟机
分别在hadoop01、hadoop02、hadoop03中输入root 和自己设置的root用户密码进入root用户
(1)修改主机名(三台分别改为hadoop01、hadoop02、hadoop03)
vi /etc/sysconfig/network
(2)配置ip
查看当前虚拟机的ip(编辑--->虚拟网络编辑器)
每个人的ip可能都不一样,我的是192.168.80.0,自己做的时候需要修改为自己的ip
修改ip:vi /etc/sysconfig/network-scripts/ifcfg-ens33
hadoop01的IPADDR=192.168.80.131
hadoop02的IPADDR=192.168.80.132
hadoop03的IPADDR=192.168.80.133
其他的都一样
(3)ip 映射
vi /etc/hosts
三台都是一样的
192.168.80.131 hadoop01
192.168.80.132 hadoop02
192.168.80.133 hadoop03
(4)配置效果检验
1.1.3 SSH服务配置
1 SSH 远程登录功能配置
为了方便操作和更美观,我使用finalshell远程操作虚拟机(以下仅供参考)
通过finalshell远程连接Windows中linux虚拟机_finalshell连接_徐一435的博客-CSDN博客https://blog.csdn.net/weixin_46268244/article/details/129133690?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522169285438316800197087430%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=169285438316800197087430&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-1-129133690-null-null.142%5Ev93%5Econtrol&utm_term=%E4%BD%BF%E7%94%A8finalshell%E8%BF%9C%E7%A8%8B%E6%93%8D%E4%BD%9C%E8%99%9A%E6%8B%9F%E6%9C%BA&spm=1018.2226.3001.4187
2 SSH免密登录功能配置
(1)在三台虚拟机中分别执行以下命令:
ssh-keygen -t rsa 一直输入回车即可
(2)在三台虚拟机中分别执行以下命令:
ssh-copy-id hadoop01 输入yes和密码即可
(3)在Hadoop01上将文件/root/.ssh/authorized_keys发送给Hadoop02和Hadoop03
scp /root/.ssh/authorized_keys hadoop02:/root/.ssh
scp /root/.ssh/authorized_keys hadoop03:/root/.ssh
1.2 hadoop集群搭建
大数据项目实战(Hadoop集群搭建)_瑾寰的博客-CSDN博客https://blog.csdn.net/qq_68383591/article/details/132490267?spm=1001.2014.3001.5502
1.3安装Hive
大数据项目实战(安装Hive)_瑾寰的博客-CSDN博客https://blog.csdn.net/qq_68383591/article/details/132532493?spm=1001.2014.3001.5502
1.4安装Sqoop
大数据项目实战(Sqoop安装)_瑾寰的博客-CSDN博客https://blog.csdn.net/qq_68383591/article/details/132539510?spm=1001.2014.3001.5502