1.rz command hadoop archive uploaded to the Linux server
2.tar -zxvf hadoop-2.7.7.tar.gz (codecs can be used)
3. The extract from the hadoop moved to want to put in the position mv hadoop-2.7.7 ../software
4. Configure six files
1.hadoop-env.sh
cd /opt/software/hadoop-2.7.7
vim etc/hadoop/hadoop-env.sh
export JAVA_HOME = / opt / software / jdk1.8 # 25 modified line
export HADOOP_CONF_DIR = / opt / software / hadoop-2.7.7 / etc / hadoop # 33 modified line
2.core.site.xml
<configuration>
<-! NameNode address specified in HDFS ->
<property>
<name>fs.defalutFS</name>
<Value> hdfs: // hostname: 9000 </ value>
</property>
<! - Specifies the storage directory is running hadoop generated files ->
<property>
<name>hadoop.tmp.dir</name>
<value>/opt/software/hadoop-2.7.7/tmp</value>
</property>
</configuration>
3.hdfs-site.xml
<configuration>
<! - Specifies the number of copies of HDFS ->
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
</configuration>
4.mapred-site.xml
<configuration>
<-! Mr designated to run on yarn ->
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
5.yarn-site.xml
<configuration>
<-! ResourceManager address of the specified yarn ->
<property>
<name>yarn.resourcemanager.hostname</name>
<Value> hostname </ value>
</property>
<! - Specifies the way to reduce access to data ->
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>
5.slaves
CPU name
The configuration environment variable to hadoop
vim /etc/profile
JAVA_HOME=/opt/software/jdk1.8
HADOOP_HOME=/opt/software/hadoop-2.7.7
PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
source /etc/profile
6. modify host mapping
vim /etc/hosts
192.168.2.121 host name
7. formatted file system
Hadoop namenode -format
8. Start hadoop
start-all.sh
stop-all.sh (closed Hadoop)