标签:目录权限 拖拉 sync 客户端 tfs 文件夹 authorize bubuko chm
一个虚拟机
开始安装Hadoop/jdk
开始配置HDFS四大文件 core-site.xml hdfs-site.xml mapred-site.xml yarn-site.xml
<configuration> <property> <name>fs.defaultFS</name> <value>hdfs://s101:9000</value> </property> </configuration>
2.hdfs-site.xml
<configuration> <!-- Configurations for NameNode: --> <property> <name>dfs.replication</name> <value>2</value> </property> <property> <name>dfs.namenode.name.dir</name> <value>file:/data/hdfs/name</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>file:/data/hdfs/data</value> </property> <property> <name>dfs.namenode.secondary.http-address</name> <value>s101:50090</value> </property> <property> <name>dfs.namenode.http-address</name> <value>s101:50070</value> <description> The address and the base port where the dfs namenode web ui will listen on. If the port is 0 then the server will start on a free port. </description> </property> <property> <name>dfs.namenode.checkpoint.dir</name> <value>file:/data/hdfs/checkpoint</value> </property> <property> <name>dfs.namenode.checkpoint.edits.dir</name> <value>file:/data/hdfs/edits</value> </property> </configuration>
3. mapred-site.xml
<configuration> <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property> </configuration>
4.yarn-site.xml
<configuration> <!-- Site specific YARN configuration properties --> <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> </property> <property> <name>yarn.resourcemanager.hostname</name> <value>s101</value> </property> </configuration>
到此成功一半。。。。。。。。。。。。。。
创建文件夹
mkdir /data/hdfs/tmp
mkdir /data/hdfs/var
mkdir /data/hdfs/logs
mkdir /data/hdfs/dfs
mkdir /data/hdfs/data
mkdir /data/hdfs/name
mkdir /data/hdfs/checkpoint
mkdir /data/hdfs/edits
记得将目录权限修改
接下来传输 /soft文件夹到其他主机
创建 xsync可执行文件
#!/bin/bash pcount=$# if((pcount<1));then echo no args; exit; fi p1=$1; fname=`basename $p1` pdir=`cd -P $(dirname $p1);pwd` cuser=`whoami` for((host=102 ; host<105 ;host=host+1));do echo --------s$host-------- rsync -rvl $pdir/$fname $cuser@s$host:$pdir done
创建 xcall 向其他主机传命令
#!/bin/bash pcount=$# if((pcount<1));then echo no args; exit; fi echo --------localhost-------- $@ for ((host=102;host<105;host=host+1));do echo --------$shost-------- ssh s$host $@ done
别着急 快结束了 哈
还得配置 workers问价
注意重点来了
进入网页
是不是很想牛泪,成功了耶!!!
中间出现了很多问题
1, rsync 权限不够 :删除文件夹 更改文件夹权限chown
2.学会看日志 log
标签:目录权限 拖拉 sync 客户端 tfs 文件夹 authorize bubuko chm
原文地址:https://www.cnblogs.com/wbdream/p/9824229.html