标签:tps replica sid family position mmu shuff bashrc ext
1 # cd ~/software 2 wget http://apache.communilink.net/hadoop/common/hadoop-2.9.2/hadoop-2.9.2.tar.gz
1 tar -xzvf hadoop-2.9.2.tar.gz 2 mv hadoop-2.9.2 hadoop
1 export HADOOP_HOME=/software/hadoop 2 export HADOOP_INSTALL=$HADOOP_HOME 3 export HADOOP_MAPRED_HOME=$HADOOP_HOME 4 export HADOOP_COMMON_HOME=$HADOOP_HOME 5 export HADOOP_HDFS_HOME=$HADOOP_HOME 6 export YARN_HOME=$HADOOP_HOME 7 export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native 8 export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib/native" 9 export PATH=$PATH:$HADOOP_HOME/sbin:$HADOOP_HOME/bin
1 cd /software/hadoop/etc/hadoop 2 vim core-site.xml
1 <configuration> 2 <!-- 指定运行端口 --> 3 <property> 4 <name>fs.defaultFS</name> 5 <value>hdfs://localhost:9000</value> 6 </property> 7 <!-- 指定临时目录 --> 8 <property> 9 <name>hadoop.tmp.dir</name> 10 <value>/data/hadoop/tmp</value> 11 </property> 12 </configuration>
1 cd /software/hadoop/etc/hadoop 2 vim hdfs-site.xml
1 <configuration> 2 <!-- 备份数量 --> 3 <property> 4 <name>dfs.replication</name> 5 <value>1</value> 6 </property> 7 </configuration>
1 cd /software/hadoop/etc/hadoop 2 # 复制并重命名 3 cp mapred-site.xml.template mapred-site.xml 4 vim mapred-site.xml
1 <configuration> 2 <!-- 配置资源管理器 --> 3 <property> 4 <name>mapreduce.framework.name</name> 5 <value>yarn</value> 6 </property> 7 </configuration>
1 cd /software/hadoop/etc/hadoop 2 vim yarn-site.xml
1 <configuration> 2 <property> 3 <name>yarn.nodemanager.aux-services</name> 4 <value>mapreduce_shuffle</value> 5 </property> 6 </configuration>
1 # 第一次,格式化namenode 2 hdfs namenode -format 3 # 运行HDFS 4 start-dfs.sh 5 # 运行yarn 6 start-yarn.sh 7 # 查看运行状况(前提是安装jdk并配置环境变量) 8 jps 9 # 停止hdfs 10 stop-dfs.sh 11 # 停止yarn 12 stop-yarn.sh
标签:tps replica sid family position mmu shuff bashrc ext
原文地址:https://www.cnblogs.com/dintalk/p/12234254.html