搭建cloudera yum私服

阅读更多

一、安装Cloudera yum仓库

1. 下载仓库rpm包

  centos6

    wget http://archive.cloudera.com/cdh4/one-click-install/redhat/6/x86_64/cloudera-cdh-4-0.x86_64.rpm 
  centos 5

    wget http://archive.cloudera.com/cdh4/one-click-install/redhat/5/x86_64/cloudera-cdh-4-0.noarch.rpm

 

2. 安装rpm到yum本地仓库

sudo yum --nogpgcheck localinstall cloudera-cdh-4-0.x86_64.rpm
sudo rpm --import http://archive.cloudera.com/cdh4/redhat/6/x86_64/cdh/RPM-GPG-KEY-cloudera

 

二、创建Cloudera yum私服

 

1. 安装createrepo
  sudo yum install yum-utils createrepo


2. 下载cloudera-cdh4官方仓库rpm包

  reposync -r cloudera-cdh4
  执行完后会下载远程rpm包,下载路径为当前路径,目前路径为”  /data/localyum/cloudera-cdh4/RPMS/ “

 

3. 将rpm配置到apache服务器
  mkdir -p /var/www/html/cdh/4
  cd /var/www/html/cdh/4/
  ln -s /data/localyum/cloudera-cdh4/RPMS RPMS
  ll /var/www/html/cdh/4/RPMS/noarch/  (应该可以看到很多rpm包)

  打开浏览器:http://xxx.xxx.xxx.xxx/cdh/4/RPMS/
  cd /var/www/html/cdh/4/
  createrepo .

 

4. 修改本地cloudera仓库为私服(需要分发repo到集群所有机器
  vi /etc/yum.repos.d/cloudera-cdh4.repo
 修改 " baseurl=http://xxx.xx.xx.xxx/cdh/4/"

--end

 

你可能感兴趣的:(搭建cloudera yum私服)