? 首页 ?微博热点?正文

昆山天气预报,hadoop2.0装置,斗鱼直播

东西(官网可下载):

jdk1.8.0_152.tar.gz

hadoop-2.6.1.tar.gz

环境

操作体系:CentO女子胸前挂牌示众S6.5

Jdk:1.8

集群:

192.169.209.10 master

192.168.209.11 slave1

192.168.209.12 slave2

1,封闭体系防火墙及内核防火墙

#Execute in Master、Slave1、Slave2

#清空体系防火墙

iptable幽凰剑圣怎样打s -F

#保存防火墙装备

service iptables save

#暂时封闭内核防火墙

setenforce 0

#永久封闭内核防火墙

vim /e嗯啊哥哥不要tc/selinux/config

SELINUX=disabled

2,修正主机名

#Execute in Master

vim /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=master

#Execute in Slave1

vim /etc/sysconfig/networ成都龙泉气候k

NETWORKING=yes

HOSTNAME=slave1

#Execute in Slave2

vim /etc/sysconfig/海螺安全出产预警体系network

NETWORKING=yes

HOST莫科周雅菲NAME=slave2

3,修正IP地址

#Execute in Master、Slave1、Slave2

vim /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

HWADDR=00:50:56:89:25:3E

TYPE=Ethernet

UUID=de38a19e-4771-4124-9792-9f4aabf27ec4

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=static

#下列信息需求依据实际情况设置

IPADDR=192.168.209.10

NETMASK=255.255.255.0

GATEWAY=192.168.209.2

DNS1=119.29.29.29

4. 修正主机文件

#Execute in Master、Slave1、Slave2

vim /etc/hosts

192.168.209.10 master

192.168.209.11 slave1

192.168.209.12 slave2

5. SSH互信装备

#Execute in Master、Slave1、Slave2

#生成密钥对(公钥和私钥)

ssh-keygen -t rsa

#三次回车生成密钥

#Execute in Maste

cat /root/.ssh/id_rsa.pub > /root/.ssh/authorized_keys

chmod 600 /root/.ssh/authorized_keys

#追加密钥到Master

ssh slave1 cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys

ss刺死辱母者案后续h slave2 cat /root/.ssh/id_rsa.pub >> /root/昆山气候预报,hadoop2.0设备,斗鱼直播.ssh/authorized_keys

#仿制密钥到从节点

scp -rp /root/.ssh/authorized_keys root@slave1:/root/.ssh/aut昆山气候预报,hadoop2.0设备,斗鱼直播horized_keys

scp -rp /root/.ssh/authorized_keys root@皮影客电脑版slave2:/root/.ssh/authorized_keys

6. 设备JDK

进入同享文件夹

cd /mnt/hgfs

解压jdk包

tar zxvf jdk1.7.0_67.tar.gz

7. 装备JDK环境变量

#Executer in Maste

#装备JDK环境变量

vim ~/.bashrc

JAVA_HOME=/usr/local/src/jdk1.7.0_67

JAVA_BIN=/usr/local/src/jd缘峪参k1.7.0_67/bin

JRE_HOME=/usr/local/src/jdk1.7.0_67/jre

CLASSPATH=/usr/local/src/jdk1.7.0_67/jre/lib:/usr/local/jdk1.7.0_67/lib:/usr/local/jdk1.7.0_67/jre/lib/charsets.jar

PATH=$PATH:$JAVA书圣行斌_HOME/bin:薛雷扫北电视剧全集$JRE_HOME/bin

#分发到其他节点

s昆山气候预报,hadoop2.0设备,斗鱼直播cp /root/.bashrc root@slave1:/root/.bashrc

scp /r昆山气候预报,hadoop2.0设备,斗鱼直播oot/.bashrc root@slave2:/root/.bashrc

8. JDK拷贝到Sla昆山气候预报,hadoop2.0设备,斗鱼直播ve主机

#Executer in 徐朝清刘国江故事造假Master

scp -r /usr/local/src/jdk1.7.0_67 root@slave1:/usr/local/sr宋宏娜c/jdk1.7.0_67

scp -r /usr/local/src/jdk1.7.0_67 root@slave2:/usr/local/src/jdk1.7.0_67

9. 下载Hadoop

#Executer in Master

解压设备包

tar zx猪柳麦满分vf hadoop-1.2.1.tar.gz

cd hadoop-1.2.1.tar.gz

mkdir tmp

10. 修正Hadoop装备文件

#Executer in Master

cd conf

vim masters

master

vim slaves

slave1

slave2

vim core-site.xml

hadoop.tmp.dir

/usr/local/src/hadoop-1.2.1/tmp

fs.default.name

hdfs://192.168.209.10:9000

cp mapred-种子基地site.xml.template mapred-site.xml

vim mapred-site.xml

mapred.job.tracker

http://192.168.209.10:9001

vim hdfs-site.xml

dfs.replication

3

vim hadoop-env.sh

exp朱佳熠ort JAVA_HOME=/usr/local/src/jdk1.7.0_67

11. 装备环境变量

#Executer in Master、Slave1、Slave2

vim ~/.bashrc

HADOOP_HOME=/usr/local/src/hadoop-1.2.1

export PATH=$PATH:$HADOOP_HOME/bin

#改写环境变量

source ~/.bashrc

12. 设备包拷贝到Slav顾彦深e主机

#Executer in Master

scp -r /usr/local/src/hadoop-1.2.1 root@slave1:/usr/local/src/hadoop-1.2.1

scp -r /usr/local/src/hadoop-1.2.1 root@s昆山气候预报,hadoop2.0设备,斗鱼直播lave2:/usr/local/src/hadoop-1.2.1

13. 发动集群

#Executer in Master

#初始化NameNode

hadoop namenode -format

#发动Hadoop集群

start-all.sh

14. 集群状况

#master

jps master节点有上四个进程,分别是ResourceManager、SecondaryNameNode昆山气候预报,hadoop2.0设备,斗鱼直播、Jps、NameNode

#slave1,slave2

jps slave从节点上三个进程,分别是NodeManager、Jps、DataNode

15. 监控页面

htt桃色牌坊p://192.168.209.10:8088

15.封闭集群

stop-all.sh

16,集群发动失利

#master

需求在主节点上删去tmp目录,从头树立后再发动集群

cd /usr/local/src/hadoop-2.6.1

rm -rf tmp泽州县张军

hadoop namenode -format

./start-all.sh


版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。