1.下载解压
新建目录
lcc@localhost hadoop$ pwd
/Users/lcc/soft/hadoop
下面有三个目录
lcc@localhost hadoop$ ll
total 520880
drwxr-xr-x 5 lcc staff 170 6 6 16:22 ./
drwxr-xr-x 5 lcc staff 170 6 6 17:00 ../
drwxr-xr-x 3 lcc staff 102 6 6 16:22 data/ 数据目录
drwxr-xr-x@ 16 lcc staff 544 6 6 15:32 hadoop/ 解压后的目录
-rw-r--r--@ 1 lcc staff 266688029 6 6 15:03 hadoop-2.7.4.tar.gz 源文件
注意版本:此处是要和hive一起的,所以Hadoop 为2.7.4 而hive为2.2.0
2 配置
vim hadoop-env.sh
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
vim hdfs-site.xml
<configuration>
<property>
<name>dfs.replica