Window 10 WSL 下hadoop 伪分布式安装
Window 10 下的WSL子系统的安装可以参考之前的文章:window10 WSL子系统上设置redis开发环境
有时候,为了在window系统上进行hadoop开发和测试,可以在WSL上安装hadoop的伪分布式系统
因为子系统使用的是ubuntu 18.04,所以下面的安装以此为参考
下面是具体的配置步骤:
1:JDK的安装配置:这是必不可少的步骤
2:ssh的安装配置:Ubuntu SSH安装及配置免密码登录,安装完后可以用 ssh localhost来验证是否成功
3:hadoop伪分布式配置:下载hadoop并解压,然后修改相应的配置文件如下
hadoop-env.sh
export JAVA_HOME=/home/xxx/java/jdk1.8.0_241
core-site.xml
<configuration> <property> <name>fs.defaultFS</name> <value>hdfs://localhost:9000</value> </property> <property> <name>hadoop.tmp.dir</name> <value>/home/xxx/hadoop-2.7.4/tmp</value> </property> </configuration>
hdfs-site.xml
<configuration> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>dfs.permissions</name> <value>false</value> </property> <property> <name>dfs.namenode.name.dir</name> <value>file:/home/xxx/hadoop-2.7.4/hdfs/name</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>file:/home/xxx/hadoop-2.7.4/hdfs/data</value> </property> </configuration>
上面是配置了HDFS,下面继续配置YARN
maprep-site.xml
<configuration> <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property> </configuration>
yarn-site.xml
<configuration> <!-- Site specific YARN configuration properties --> <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> </property> </configuration>
配置完后,就可以
1:格式化namenode:bin/hdfs namenode -format
2:启动hdfs: sbin/start-dfs.sh
3:在浏览器里查看dfs:http://localhost:50070
4:启动YARN:sbin/start-yarn.sh
5:在浏览器里查看YARN:http://localhost:8088
相关推荐
changjiang 2020-11-16
minerd 2020-10-28
WeiHHH 2020-09-23
Aleks 2020-08-19
WeiHHH 2020-08-17
飞鸿踏雪0 2020-07-26
tomli 2020-07-26
deyu 2020-07-21
strongyoung 2020-07-19
eternityzzy 2020-07-19
Elmo 2020-07-19
飞鸿踏雪0 2020-07-09
飞鸿踏雪0 2020-07-04
xieting 2020-07-04
WeiHHH 2020-06-28
genshengxiao 2020-06-26
Hhanwen 2020-06-25