目录
1. jdk1.8安装,环境变量配置
2. 配置hostname
/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=hadoop001
3. 设置ip和hostname的映射关系
/etc/hosts
192.168.100.xx hadoop001
127.0.0.1 localhost
4. 设置ssh免密码登录
(1) 执行ssh-keygen -t rsa
(2) cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
(3)执行 ssh hadoop001测试是否连接成功
5. hadoop下载地址(百度搜索cdh5)
http://archive.cloudera.com/cdh5/cdh/5/hadoop-2.6.0-cdh5.7.0/
6. 解压hadoop到~/app目录,并且配置环境变量
7. 修改hdfs配置文件
(1) 修改hadoop-env.sh(大数据框架的env都是修改JAVA_HOME)
(2) core-site.xml配置
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:8020</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>~/app/tmp</value>
</property>
</configuration>
(3) hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
8. HDFS格式化
(1) 集群第一次的时候执行
bin/hdfs namenode -format
9. 启动HDFS
sbin/start-dfs.sh
10. YARN配置
1)mapred-site.xml
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
2)yarn-site.xml
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>
11. 启动yarn
启动 sbin/start-yarn.sh