标签:启动 ase 免密码 zook slave mapr type mat base
jdk需要1.7以上版本64位.
创建hadoop用户.
在hadoop用户目录下解压安装包hadoop-2.7.2.tar.gz
生成公钥和私钥:ssh-keygen -t rsa
四次enter.
将公钥添加进公钥库:cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
修改authorized_keys权限:chmod 600 ~/.ssh/authorized_keys
验证:ssh localhost
将各节点中id_rsa.pub中的内容共同拷贝到authorized_keys,将authorized_keys覆盖各节点.
mkdir -p ~/hadoop/dfs/name
mkdir -p ~/hadoop/dfs/data
mkdir -p ~/hadoop/tmp
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/wangkai/hadoop/tmp</value>
</property>
<property>
<name>fs.defaultFS</name>
<value>hdfs://centos7-1:9000</value>
</property>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/wangkai/hadoop/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/home/wangkai/hadoop/dfs/data</value>
</property>
</configuration>
<?xml version="1.0"?>
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.resourcemanager.hostname</name>
<value>192.168.163.101</value>
</property>
</configuration>
注:不配置yarn.resourcemanager.hostname可能会导致从节点的nodemanager无法与主节点resourcemanager通信,默认为0.0.0.0,需要修改.
centos7-1
centos7-2
centos7-3
第一行添加
export JAVA_HOME=/usr/local/jdk1.7.0_79
第一行添加:
export JAVA_HOME=/usr/local/jdk1.7.0_79
文件末尾添加
192.168.163.101 centos7-1
192.168.163.102 centos7-2
192.168.163.103 centos7-3
文件末尾添加
export JAVA_HOME=/usr/local/jdk1.7.0_79
export HADOOP_HOME=/home/wangkai/hadoop
export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH
export PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
source ~/.bashrc
将Hadoop文件夹移动至各个节点
/home/wangkai/hadoop/dfs/name
/home/wangkai/hadoop/dfs/data
/home/wangkai/hadoop/tmp
执行格式化:hadoop namenode -format
执行start-dfs.sh
查看进程应显示:
NameNode
DataNode
SecondaryNameNode
浏览器访问:192.168.163.101:50070
注意:关闭防火墙
systemctl stop firewalld.service
或
systemctl disable firewalld.service
执行start-yarn.sh
查看进程应显示:
NodeManager
ResourceManager
浏览器访问: 192.168.163.101:8088
一个典型搭配
Hadoop 2.7.2,HBase 1.2.2 , Hive 2.1.0 ,Zookeeper 3.4.8 ,Sqoop 1.4.6 , Spark 2.0.2 ,Kafka 2.11-0.10.0.0等等
标签:启动 ase 免密码 zook slave mapr type mat base
原文地址:https://www.cnblogs.com/guan-li/p/9916928.html