部署环境
OS: Ubuntu12.04 Server
Hadoop:CDH3U6
机器列表:namenode 192.168.71.46;datanode 192.168.71.202,192.168.71.203,192.168.71.204
安装Hadoop
添加软件源
/etc/apt/sources.list.d/cloudera-3u6.list
插入
deb http://192.168.52.100/hadoop maverick-cdh3 contrib
deb-src http://192.168.52.100/hadoop maverick-cdh3 contrib
增加GPG Key,执行
curl -s http://archive.cloudera.com/debian/archive.key | sudo apt-key add -
更新
apt-get update
在namenode上安装hadoop-0.20-namenode和jobtracker
apt-get install -y --force-yes hadoop-0.20-namenode hadoop-0.20-jobtracker
在datanode上安装hadoop-0.20-datanode和tasktracker
apt-get install -y --force-yes hadoop-0.20-datanode hadoop-0.20-tasktracker
配置无SSH登录
在namendoe机器上执行
ssh-keygen -t rsa
一路回车,将在~/.ssh文件夹下生成的id_rsa.pub的内容复制到其他datanode机器的/root/.ssh/authorized_keys文件的尾部,如果其他机器中没有这个文件就自己手动创建一个。
建立Hadoop存储目录并修改owner
mkdir /opt/hadoop
chown hdfs:hadoop /opt/hadoop
mkdir /opt/hadoop/mapred
chown mapred:hadoop /opt/hadoop/mapred
修改配置文件并分发
修改/etc/hadoop/conf/core-site.xml为
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>fs.default.name</name> <value>hdfs://192.168.71.46:8020</value> </property> <property> <name>hadoop.tmp.dir</name> <value>/opt/hadoop</value> </property> </configuration>
修改/etc/hadoop/conf/hdfs-site.xml为
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>dfs.balance.bandwidthPerSec</name> <value>10485760</value> </property> <property> <name>dfs.block.size</name> <value>134217728</value> </property> <property> <name>dfs.data.dir</name> <value>/opt/hadoop/dfs/data</value> </property> <property> <name>dfs.datanode.max.xcievers</name> <value>4096</value> </property> <property> <name>dfs.namenode.handler.count</name> <value>100</value> </property> </configuration>
以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索hadoop
, namenode
, hadoop 视频点播
, ambari hadoop
, hadoop集群
, spark hadoop
, dfs
, cloudera
, cloudera impala
, cdh5.4 安装问题
, CDH
, cdh5,cloudera
, hadoop cdh
datanode
hadoop集群部署、docker部署hadoop集群、hadoop集群部署方案、一键部署 hadoop集群、hadoop集群部署图,以便于您获取更多的相关知识。