Hadoop2.2.0 environment configuration description (multi-node configuration at the end) 1. Disable the firewall # chkconfigiptablesoff2. check status # chkconfig-list | lifecycle 5. renamed # mvHa
Hadoop2.2.0 environment configuration description (multi-node configuration at the end) 1. disable the firewall # chkconfigiptablesoff 2. check status # chkconfig-list | grepiptables all off. copy the hadoop-2.2.0.tar.gz file to the/usr/local directory 4. decompress # tar -zxvfhadoop-2.2.0.tar.gz 5. renamed # mv Ha
Hadoop2.2.0 environment configuration description (multi-node configuration is at the end)
1. Disable the firewall # chkconfig iptables off
2. Check the status # chkconfig-list | grep iptables all off.
3. Copy the hadoop-2.2.0.tar.gz file to the/usr/local directory.
4. Unzip # tar-zxvf hadoop-2.2.0.tar.gz
5. renamed # mv Hadoop-2.2.0 hadoop2.2
6. Modify the environment variable # vim/etc/profile
7. Add export HADOOP_HOME =/usr/local/hadoop2.2
Export HADOOP_MAPRED_HOME = $ HADOOP_HOME
Export HADOOP_COMMON_HOME = $ HADOOP_HOME
Export HADOOP_HDFS_HOME = $ HADOOP_HOME
Export YARN_HOME = $ HADOOP_HOME
Export HADOOP_CONF_DIR = $ HADOOP_HOME/etc/hadoop
Add $ HADOOP_HOME/bin: $ HADOOP_HOME/sbin under PATH
8. Reload # source/etc/profile
9. Switch the directory to # cd/usr/local/hadoop2.2/etc/Hadoop
10. Add the corresponding content to the following file:
11. hadoop-env.sh 27th rows modified
Export JAVA_HOME =/usr/local/jdk1.6
12. yarn-env.sh 23rd rows modified
Export JAVA_HOME =/usr/local/jdk1.6
13. Copy the mapred-site.xml.template as a mapred-site.xml
# Cp mapred-site.xml.template mapred-site.xml
14. Add 20th rows (configuration) in the mapred-site.xml
Mapreduce. framework. name
Yarn
15. yarn-site.xml 18th rows (configuration) add
Yarn. resourcemanager. hostname
Localhost
Hostanem of RM
Yarn. resourcemanager. resource-tracker.address
Localhost: 5274
Host is the hostname of the resource manager and
Port is the port on which the NodeManagers contact the Resource Manager.
Yarn. resourcemanager. schedager. address
Localhost: 5273
Host is the hostname of the resourcemanager and port is the port
On which the Applications in the cluster talk to the Resource Manager.
Yarn. resourcemanager. schedager. class
Org. apache. hadoop. yarn. server. resourcemanager. schedity. capacity. capacityschedity
In case you do not want to use the default scheduler
Yarn. resourcemanager. address
Localhost: 5271
The host is the hostname of the ResourceManager and the port is the port on which the clients can talk to the Resource Manager.
Yarn. nodemanager. local-dirs
The local directories used by the nodemanager
Yarn. nodemanager. address
Localhost: 5272
The nodemanagers bind to this port
Yarn. nodemanager. resource. memory-mb
10240
The amount of memory on the NodeManager in GB
Yarn. nodemanager. remote-app-log-dir
/App-logs
Directory on hdfs where the application logs are moved
Yarn. nodemanager. log-dirs
/Usr/log
The directories used by Nodemanagers as log directories
Yarn. nodemanager. aux-services
Mapreduce_shuffle
Shuffle service that needs to be set for Map Reduce to run
16. core-site.xml 20th rows (configuration) add
Hadoop. tmp. dir
/Usr/local/hadoop2.2/tmp
Fs. defaultFS
Hdfs: // localhost: 9000
True
17. hdfs-site.xml 20th rows (configuration) add
Dfs. namenode. name. dir
File: // dfs/name
True
Dfs. datanode. data. dir
File: // dfs/data
True
Dfs. replication
1
Dfs. permissions. enabled
False
Inside the hadoop-env.sh # export JAVA_HOME =/usr/local/jdk
18. Set ssh
# Ssh-keygen-t rsa one-way carriage return Default Value
View (id_rsa and id_rsa.pub have a key file)
# Cd ~ /. Ssh
# Ls
Copy the Public Key
# Cp id_rsa.pub authorized_keys
View # ls should have three files
Validation process
# Ssh localhost (enter yes)
# Exit
# Ssh localhost
19. Format
# Hadoop namenode-format
20. Start
# Start-dfs.sh
# Start-yarn.sh
21. view # There should be 6 jps
22. Use your browser to open http: // localhost: 50070/and http: // localhost: 8088/cluster.
(Multi-host environment configuration)
23. DNS configuration (recommended to restart the virtual machine after modification)
24. Change the host name to hadoop2.
# Vim/etc/sysconfig/network
Line 2: Change localhost. localdomain to hadoop2.
25. Modify address ing
# Vim/etc/hosts
Add 192.168.100.11 hadoop2 in the third line (the address is not fixed)