- 浏览: 25278 次
- 性别:
- 来自: 深圳
文章分类
最新评论
192.168.23.231 server1
192.168.23.234 server2
192.168.23.239 server3
http://mirrors.163.com/centos/6/isos/
关闭防火墙
service iptables stop
chkconfig iptables off
停闭selinux
vim /etc/sysconfig/selinux
SELINUX=disables
export JAVA_HOME=/usr/jdk1.8.0_25
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
BASE_HOME=/myhome/usr
JAVA_HOME=/usr/jdk1.8.0_25
CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar
PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export PATH
ssh-keygen -t rsa
cat id_rsa.pub>> authorized_keys
ssh root@192.168.23.234 cat ~/.ssh/id_rsa.pub>> authorized_keys
ssh root@192.168.23.239 cat ~/.ssh/id_rsa.pub>> authorized_keys
scp authorized_keys root@server2:~/.ssh/
scp authorized_keys root@server3:~/.ssh/
mkdir -p /myhome/usr#已安装的目录
mkdir -p /myhome/root
mkdir -p /myhome/tmp
mkdir -p /myhome/src
mkdir -p /myhome/logs
mkdir -p /myhome/dev
mkdir -p /myhome/bin
mkdir -p /myhome/usr/hadoop/yarn/local
mkdir -p /myhome/usr/hadoop/yarn/logs
mkdir -p /myhome/usr/hadoop/journal/zjenterprise
mkdir -p /myhome/usr/hadoop/hdfs/name
mkdir -p /myhome/usr/hadoop/hdfs/data
mkdir -p /myhome/usr/hadoop/tmp
mkdir -p /myhome/usr/hadoop/journal/
mkdir -p /myhome/usr/zookeeper/data/
touch /myhome/usr/zookeeper/data/myid
echo 1 > /myhome/usr/zookeeper/data/myid
core-site.xml
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://192.168.23.231:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>file:/myhome/usr/hadoop/tmp</value>
</property>
<property>
<name>io.file.buffer.size</name>
<value>131702</value>
</property>
</configuration>
hdfs-site.xml
<configuration>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/myhome/usr/hadoop/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/myhome/usr/hadoop/dfs/data</value>
</property>
<property>
<name>dfs.replication</name>
<value>2</value>
</property>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>192.168.23.231:9001</value>
</property>
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
</configuration>
mapred-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>mapreduce.jobhistory.address</name>
<value>192.168.23.231:10020</value>
</property>
<property>
<name>mapreduce.jobhistory.webapp.address</name>
<value>192.168.23.231:19888</value>
</property>
</configuration>
yarn-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.auxservices.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
<name>yarn.resourcemanager.address</name>
<value>192.168.23.231:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>192.168.23.231:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>192.168.23.231:8031</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>192.168.23.231:8033</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>192.168.23.231:8088</value>
</property>
<property>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>768</value>
</property>
</configuration>
scp -r /myhome/usr/hadoop 192.168.23.234:/myhome/usr
scp -r /myhome/usr/hadoop 192.168.23.239:/myhome/usr
在Master服务器启动hadoop,从节点会自动启动,进入/home/hadoop/hadoop-2.7.0目录
(1)初始化,输入命令,bin/hdfs namenode -format
(2)全部启动sbin/start-all.sh,也可以分开sbin/start-dfs.sh、sbin/start-yarn.sh
(3)停止的话,输入命令,sbin/stop-all.sh
(4)输入命令,jps,可以看到相关信息
192.168.23.234 server2
192.168.23.239 server3
http://mirrors.163.com/centos/6/isos/
关闭防火墙
service iptables stop
chkconfig iptables off
停闭selinux
vim /etc/sysconfig/selinux
SELINUX=disables
export JAVA_HOME=/usr/jdk1.8.0_25
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
BASE_HOME=/myhome/usr
JAVA_HOME=/usr/jdk1.8.0_25
CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar
PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export PATH
ssh-keygen -t rsa
cat id_rsa.pub>> authorized_keys
ssh root@192.168.23.234 cat ~/.ssh/id_rsa.pub>> authorized_keys
ssh root@192.168.23.239 cat ~/.ssh/id_rsa.pub>> authorized_keys
scp authorized_keys root@server2:~/.ssh/
scp authorized_keys root@server3:~/.ssh/
mkdir -p /myhome/usr#已安装的目录
mkdir -p /myhome/root
mkdir -p /myhome/tmp
mkdir -p /myhome/src
mkdir -p /myhome/logs
mkdir -p /myhome/dev
mkdir -p /myhome/bin
mkdir -p /myhome/usr/hadoop/yarn/local
mkdir -p /myhome/usr/hadoop/yarn/logs
mkdir -p /myhome/usr/hadoop/journal/zjenterprise
mkdir -p /myhome/usr/hadoop/hdfs/name
mkdir -p /myhome/usr/hadoop/hdfs/data
mkdir -p /myhome/usr/hadoop/tmp
mkdir -p /myhome/usr/hadoop/journal/
mkdir -p /myhome/usr/zookeeper/data/
touch /myhome/usr/zookeeper/data/myid
echo 1 > /myhome/usr/zookeeper/data/myid
core-site.xml
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://192.168.23.231:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>file:/myhome/usr/hadoop/tmp</value>
</property>
<property>
<name>io.file.buffer.size</name>
<value>131702</value>
</property>
</configuration>
hdfs-site.xml
<configuration>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/myhome/usr/hadoop/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/myhome/usr/hadoop/dfs/data</value>
</property>
<property>
<name>dfs.replication</name>
<value>2</value>
</property>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>192.168.23.231:9001</value>
</property>
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
</configuration>
mapred-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>mapreduce.jobhistory.address</name>
<value>192.168.23.231:10020</value>
</property>
<property>
<name>mapreduce.jobhistory.webapp.address</name>
<value>192.168.23.231:19888</value>
</property>
</configuration>
yarn-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.auxservices.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
<name>yarn.resourcemanager.address</name>
<value>192.168.23.231:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>192.168.23.231:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>192.168.23.231:8031</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>192.168.23.231:8033</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>192.168.23.231:8088</value>
</property>
<property>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>768</value>
</property>
</configuration>
scp -r /myhome/usr/hadoop 192.168.23.234:/myhome/usr
scp -r /myhome/usr/hadoop 192.168.23.239:/myhome/usr
在Master服务器启动hadoop,从节点会自动启动,进入/home/hadoop/hadoop-2.7.0目录
(1)初始化,输入命令,bin/hdfs namenode -format
(2)全部启动sbin/start-all.sh,也可以分开sbin/start-dfs.sh、sbin/start-yarn.sh
(3)停止的话,输入命令,sbin/stop-all.sh
(4)输入命令,jps,可以看到相关信息
发表评论
-
Canal相关理解
2017-12-29 16:18 456转载:http://www.importnew.com/251 ... -
kettle部署
2017-12-26 16:04 7141.将jmbi sql先上生产环境, 参考附件jmbi.sql ... -
crontab定时运行MR不行,手动shell可以执行成功问题排查过程
2017-12-26 15:48 852设置了定时任务,但MR任务没有执行。 第一步:手动执行she ... -
Flume+kafka+Spark Steaming demo2
2017-11-22 13:15 455一,flume配置 # Name the components ... -
Flume+Kafka+Spark Steaming demo
2017-11-21 15:21 437一.准备flume配置 a1.sources = r1 a1. ... -
HBase表导出成HDFS
2017-10-19 19:40 892导出步骤:在old cluster上/opt/cloudera ... -
zepplin实战
2017-10-13 16:10 357一句话介绍Zeppelin 以笔记(Note)的形式展示的数据 ... -
Azkaban安装
2017-10-10 18:32 903一.下载 https://github.com/azkaban ... -
KYKIN安装
2017-09-30 17:35 121. Kylin的一些概念 No. 关键字 解释 1 Kyl ... -
KYKIN安装
2017-09-30 17:40 3571. Kylin的一些概念 No. 关键字 解释 1 Kyl ... -
Logstash安装部署配置
2017-04-28 10:24 1016为了实现各业务平台日志信息采集到大数据平台hdf ... -
HBASE API
2017-04-18 11:01 467package org.jumore.test; impor ... -
Ambari卸载shell
2017-03-28 17:28 464#!/bin/bash # Program: # uni ... -
linux ssh 相互密码登录
2017-02-22 13:40 4101.修改集群各机器名称 vim /etc/sysconfig/ ... -
Kettle Linux 安装部署
2017-02-15 17:20 1349一.安装JDK环境:根据自己的linux系统选择相应的版本,比 ... -
环境安装
2017-01-17 16:26 389物理机部署分配 3台物理机上部署 Zookeeper 3个,F ... -
Storm demo
2016-12-19 15:50 439public class SentenceSpout exte ... -
运行Hadoop jar 第三方jar包依赖
2016-08-22 13:47 1008将自己编写的MapReduce程序打包成jar后,在运行 ha ... -
windows10下运行MR错误
2016-07-05 13:45 1650当在windows下运行MR程序时,会报各种错误。现把这次碰到 ... -
HBase问题
2016-06-16 17:02 3011.java.net.UnknownHostException ...
相关推荐
Hadoop环境搭建主要包括配置Hadoop相关的配置文件,包括但不限于hadoop-env.sh、core-site.xml、hdfs-site.xml、mapred-site.xml、masters和slaves文件。 在hadoop-env.sh文件中需要指定Java的安装路径,因为Hadoop...
在Windows上使用Cygwin作为类Unix支撑环境来安装Hadoop, 网上介绍的还是比较多的。...其实,Hadoop环境搭建的主要内容是Cygwin的安装,估计要占总时间的2/3, 其它工作我会手把手的教你,come on,follow me!
hadoop环境搭建和eclipse开发