MacOS下Hadoop安装记

安装Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

官网:https://brew.sh/index_zh-cn.html

安装Hadoop

brew install hadoop

查看安装路径:

brew list hadoop

配置Hadoop

前往安装目录(默认为/usr/local/Cellar/hadoop/2.8.0)

cd /usr/local/Cellar/hadoop/2.8.0/libexec/etc/hadoop/

修改相关配置文件

Core-site.xml


  
     hadoop.tmp.dir  
     /usr/local/Cellar/hadoop/hdfs/tmp
    A base for other temporary directories.
  
  
     fs.default.name                                     
     hdfs://localhost:9000                             
                                                         
 

mapred-site.xml.templete


       
         mapred.job.tracker
         localhost:9010
       
 

hdfs-site.xml


    
      dfs.replication
      1
     
 

运行Hadoop

格式化Namenode

cd /usr/local/Cellar/hadoop/2.8.0/bin
hadoop namenode -format

启动Hadoop

cd /usr/local/Cellar/hadoop/2.8.0/sbin
./start-all.sh

检查运行状态

Jps

jps

查看以下服务是否正常启动

94945 DataNode

95059 SecondaryNameNode

94853 NameNode

95318 Jps

95181 ResourceManager

95279 NodeManager

访问以下网址

Resource Manager: http://localhost:50070

JobTracker: http://localhost:8088

Specific Node Information: http://localhost:8042

你可能感兴趣的:(MacOS下Hadoop安装记)