乐趣区

关于数据库:haoop搭建记录

hadoop 集群搭建

1. 配置 jdk 环境

jdk1.8

export JAVA_HOME=/mydata/jdk1.8.0_151
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

2. 解压 tar 包

3. 配置 hadoop 环境

hadoop

export HADOOP_HOME=/mydata/hadoop-2.7.4
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin

4. 批改主机名,配置 host 解析文件

hostnamectl set-hostname hadoop1

172.16.233.173 hadoop3
172.16.233.174 hadoop1
172.16.233.175 hadoop2

5. 配置免密登录

ssh-copy-id -i .ssh/id_rsa.pub  172.16.233.174

ssh-copy-id -i .ssh/id_rsa.pub  hadoop1

6. 配置 hadoop 文件

hdfs-site.xml

<!– 设置 secondarynamenode 的 http 通讯地址 –>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>hadoop1:50090</value>
</property>

<!– 设置 namenode 寄存的门路 –>
<property>
<name>dfs.namenode.name.dir</name>
<value>/mydata/hadoop-2.7.4/hdfs/name</value>
</property>

<!– 设置 hdfs 正本数量 –>
<property>
<name>dfs.replication</name>
<value>2</value>
</property>
<!– 设置 datanode 寄存的门路 –>
<property>
<name>dfs.datanode.data.dir</name>
<value>/mydata/hadoop-2.7.4/hdfs/data</value>
</property>

core-site.xml 

<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop1:9000</value>
</property>
<!– 指定 hadoop 运行时产生文件的存储目录 –>
<property>
<name>hadoop.tmp.dir</name>
<value>/mydata/hadoop-2.7.4/hdfs/tmp</value>
</property>

yarn-site.xml

<property>
<name>yarn.resourcemanager.address</name>
<value>hadoop1:18040</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>hadoop1:18030</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>hadoop1:8088</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>hadoop1:18025</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>hadoop1:18141</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
<name>yarn.nodemanager.resource.cpu-vcores</name>
<value>1</value>
</property>
<property>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>1600</value>
</property>

mapred-site.xml

<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<!– 历史服务器端地址 –>
<property>
<name>mapreduce.jobhistory.address</name>
<value>hadoop1:10020</value>
</property>
<!– 历史服务器 web 端地址 –>
<property>
<name>mapreduce.jobhistory.webapp.address</name>
<value>hadoop1:19888</value>
</property>

启动历史服务器:mr-jobhistory-daemon.sh start historyserver

7. 将 hadoop 文件夹拷贝到其余服务器

8. 初始化主节点的 namenode

hdfs  namenode  -format

9. 启动集群   start-all.sh

10. 页面察看 hadoop 集群运行状况

8088 端口
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…
http://github.com/threebb10/w…
https://github.com/threebb10/…
https://www.github.com/threeb…

退出移动版