##六、安装hadoop
####2.6、hadoop-env.sh的配置1
2
3cd /home/hadoop/hadoop_installs/hadoop-2.3.0/etc/hadoop/
vim hadoop-env.sh
1 | # The java implementation to use. |
####2.7、修改core-site.xml1
2
3cd /home/hadoop/hadoop_installs/hadoop-2.3.0/etc/hadoop/
vim core-site.xml
1 | <configuration> |
####2.9、修改yarn-site.xml1
2
3cd /home/hadoop/hadoop_installs/hadoop-2.3.0/etc/hadoop/
vim yarn-site.xml
1 | <configuration> |
####2.10、修改hdfs-site.xml1
sudo gedit /usr/local/hadoop/etc/hadoop/hdfs-site.xml
1 | <configuration> |
####2.11、修改master与slaves1
2
3
4
5sudo gedit /usr/local/hadoop/etc/hadoop/masters
sudo gedit /usr/local/hadoop/etc/hadoop/slaves
添加:localhost
##七、运行hadoop
###①首先在 Hadoop 目录下创建所需的临时目录1
2cd /usr/local/hadoop
mkdir tmp dfs dfs/name dfs/data
###②格式化hdfs文件系统,初次运行1
2cd /usr/local/hadoop/
bin/hdfs namenode -format
###③最后开启服务1
2sbin/start-dfs.sh
sbin/start-yarn.sh
##八、状态查看1
2
3Namenode information:
http://localhost:50070
来查看Hadoop的信息。
1 | All Applications: |