Cloudera 局域网安装部署
集群部署在局域网内部,与外网隔离开来。
第一步,下载安装包和相关文件。
其实 cloudera 就有一个 yum源,查看一下http://archive.cloudera.com/redhat/cdh/3/ ,yum源的结构就很清晰了。
wget -mc http://archive.cloudera.com/redhat/cdh/3/
mkdir /var/www/html/cloudera-hadoop cp -r archive.cloudera.com/redhat/cdh/3 /var/www/html/cloudera-hadoop
[cloudera-cdh3]name=Cloudera's Distribution for Hadoop, Version 3baseurl=http://10.10.224.109/cloudera/3/ gpgcheck=0enabled=1
error: Failed dependencies: jdk >= 1.6 is needed by hadoop-0.20-0.20.2+320-1.noarch.rpm
# cp -r /etc/hadoop-0.20/conf.empty /etc/hadoop-0.20/conf.my_cluster
# alternatives --install /etc/hadoop-0.20/conf hadoop-0.20-conf /etc/hadoop-0.20/conf.my_cluster 50
scp -rp master:/etc/hadoop-0.20/conf.my_cluster /etc/hadoop-0.20/conf.my_cluster
# alternatives --install /etc/hadoop-0.20/conf hadoop-0.20-conf /etc/hadoop-0.20/conf.my_cluster 50
$ sudo -u hdfs hadoop namenode -format
$ sudo chkconfig hadoop-0.20-namenode on$ sudo chkconfig hadoop-0.20-jobtracker on$ sudo chkconfig hadoop-0.20-secondarynamenode on$ sudo chkconfig hadoop-0.20-tasktracker on$ sudo chkconfig hadoop-0.20-datanode on
$ sudo service hadoop-0.20-namenode start$ sudo service hadoop-0.20-jobtracker start$ sudo service hadoop-0.20-secondarynamenode start$ sudo service hadoop-0.20-tasktracker start$ sudo service hadoop-0.20-datanode start
$ sudo mkdir -p /data/dfs/nn/1 /data/dfs/nn/2
$ sudo mkdir -p /data/dfs/dn/1 /data/dfs/dn/2 /data/dfs/dn/3 /data/dfs/dn/4
$ sudo mkdir -p /data/mapred/local/1 /data/mapred/local/2 /data/mapred/local/3 /data/mapred/local/4
$ sudo chown -R hdfs:hadoop /data/dfs/nn/1 /data/dfs/nn/2 /data/dfs/dn/1 /data/dfs/dn/2 /data/dfs/dn/3 /data/dfs/dn/4
$ sudo chown -R mapred:hadoop /data/mapred/local/1 /data/mapred/local/2 /data/mapred/local/3 /data/mapred/local/4
$sudo -u hdfs hadoop fs -mkdir /mapred/system$sudo -u hdfs hadoop fs -chown mapred /mapred/system