線上要部署CDH5,因爲打算全套組件都使用CDH5版本,因此須要安裝大量的軟件包,使用官方的在線安裝速度實在受不了,故直接把CDH5的Centos的repo給同步下來了: web
cdh5.repo shell
[cloudera-cdh5] # Packages for Cloudera's Distribution for Hadoop, Version 5, on RedHat or CentOS 6 x86_64 name=Cloudera's Distribution for Hadoop, Version 5 baseurl=http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/5/ gpgkey = http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/RPM-GPG-KEY-cloudera gpgcheck = 1開始同步:
reposync -r cloudera-cdh5
例如咱們是在/mnt/cdh5/目錄下面執行該命令的,當同步完成後會出現一個cloudera-cdh5目錄,進入其中的RPMS目錄會看到兩個文件夾:noarch和x86_64,表明了不一樣的架構體系,咱們能夠在/mnt/cdh5/cloudera-cdh5/RPMS目錄之上搭建一個web服務器,而後在clouder-cdh5目錄下執行初始化命令便可: 服務器
createrepo .在/etc/yum.repos.d/ 下面添加相關cdh5的repo文件便可,即用你的web url替換原先repo中的baseurl便可。
[cloudera-cdh5] # Packages for Cloudera's Distribution for Hadoop, Version 5, on RedHat or CentOS 6 x86_64 name=Cloudera's Distribution for Hadoop, Version 5 baseurl=http://yourwebserver/