[mac] Hadoop 安装
1. Homebrew 安装
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL
https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
安装在目录 /usr/local
brew -v
2.Hadoop 安装
brew install hadoop
安装目录 /usr/local/Cellar/hadoop
3.ssh 免密
ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
ssh localhost
提示 ssh: connect to host localhost port 22: Connection refused
失败,打开系统偏好设置--共享--远程登陆。
4.hadoop配置
/usr/local/Cellar/hadoop/2.7.2/libexec/etc/hadoop/core-site.xml:
《configuration》
《/configuration》
etc/hadoop/hdfs-site.xml:
《configuration》
《/configuration》
etc/hadoop/mapred-site.xml
《configuration》
《/configuration》
6.格式化HDFS
hadoop namenode -format
7.hapoop启停
/usr/local/Cellar/hadoop/2.7.2/sbin
./start-dfs.sh
./stop-dfs.sh
http://localhost:50070/
参考此文