Apache hadoop集群部署 原

2018-08-15 09:48:04 浏览数 (1)

1.修改主机名

hostname 主机名(实时生效、重启失效) /etc/sysconfig/network(永久生效、需要重启)

2.修改/ets/hosts

192.168.1.238  JZYH-COLLECTOR-LTEMR1-OSS 192.168.1.239  JZYH-COLLECTOR-LTEMR2-OSS 192.168.1.240  JZYH-COLLECTOR-SCHE1-OSS 192.168.1.241  JZYH-COLLECTOR-LTEMR3-OSS

3.修改配置文件

    * hdfs          * hadoop-env.sh          * core-site.xml          * hdfs-site.xml          * slaves     * yarn          * yarn-env.sh          * yarn-site.xml          * slaves     * mapredue          * mapred-env.sh          * mapred-site.xml

4.配置免登录(每台机器分别执行)

ssh-keygen -t rsa(四个回车) ssh-copy-id JZYH-COLLECTOR-LTEMR1-OSS ssh-copy-id JZYH-COLLECTOR-LTEMR2-OSS ssh-copy-id JZYH-COLLECTOR-SCHE1-OSS ssh-copy-id JZYH-COLLECTOR-LTEMR3-OSS 测试 ssh nwom@JZYH-COLLECTOR-LTEMR3-OSS

5.分发

scp -r ./hadoop-2.5.0/ nwom@JZYH-COLLECTOR-LTEMR1-OSS:/opt/nwom/hadoop scp -r ./hadoop-2.5.0/ nwom@JZYH-COLLECTOR-LTEMR2-OSS:/opt/nwom/hadoop scp -r ./hadoop-2.5.0/ nwom@JZYH-COLLECTOR-SCHE1-OSS:/opt/nwom/hadoop

6.启动集群

cd /opt/nwom/hadoop/hadoop-2.5.0/ bin/hdfs namenode -format(NameNode节点240) sbin/start-dfs.sh (NameNode节点240) http://192.168.1.240:50070 sbin/start-yarn.sh (Yarn节点238) http://192.168.1.238:8088 sbin/mr-jobhistory-daemon.sh start historyserver(240)

0 人点赞