Configure JDK in the hadoop-env.sh file:exportJAVA_HOME=/java/jdk1.8.0_112 |
Configure the core-site. XML file, including the Hadoop cluster name, Hadoop file storage and the storage address and ports of hosts in the Zookeeper cluster. |
< configuration > |
< property > |
< name > fs.defaultFS < / name > |
< value > hdfs : / / ns < / value > |
< / property > |
< property > |
< name > hadoop.tmp.dir < / name > |
< value > / home/ software/ hadoop-2.7.1/ tmp < / value > |
< / property > |
< property > |
< name > ha .zookeeper .quorum < / name > |
< value > centos1: 2181, centos 2 : 2181, centos 3 : 2181 < / value > |
< / property > |
< / configuration > |
Configure the HDFS -site. XML file. The configuration content is mainly about the number of copies on a cloth cluster, the number of replicas must be 3. |
< configuration > |
< property > |
< name > dfs.replication < / name > |
< value >3 < / value > |
< / property > |
< / configuration > |
Configure mapred-site. XML to set yarn resource scheduling, and content is as follows: |
< configuration > |
< property > |
< name > mapreduce.framework .name < / name > |
< value > yarn < / value > |
< / property > |
< / configuration > |
Configure yarn-site. XML to specify the START VM of Yarn Resource manager, and in this paper it is |
centos1 and centos3. |
< property > |
< name > yarn .resourcemanager .hostname.rm1 < / name > |
< value > centos1 < / value > |
< / property > |
< property > |
< name > yarn .resourcemanager .hostname.rm 2 < / name >? |
< value > centos 3 < / value > |
< / property > |