1、准备:
centos6.5系统,root用户
2、安装所需包:
sudo yum install yum-utils createrepo
3、下载cdh4.6的repo:
wget
http://archive.cloudera.com/cdh4/redhat/5/x86_64/cdh/RPM-GPG-KEY-cloudera sudo rpm --import RPM-GPG-KEY-cloudera
cd /etc/yum.repos.d/
sudo wget http://archive.cloudera.com/cdh4/one-click-install/redhat/6/x86_64/cloudera-cdh-4-0.x86_64.rpm
cd /etc/yum.repos.d/ && wget http://archive.cloudera.com/gplextras/redhat/6/x86_64/gplextras/cloudera-gplextras4.repo
4、更新源:
sudo yum clean all && sudo yum makecache
5、同步cdh4.6源:
reposync -r cloudera-cdh4
reposync -r cloudera-gplextras4
6、配置web server:
cp cloudera-cdh4 /var/www/html/
cp cloudera-gplextras4 /var/www/html/
7、创建本地仓库:
cd /var/www/html/cloudera-cdh4 && createrepo .
cd /var/www/html/cloudera-gplextras4 && createrepo .
cd /var/www/html/cloudera-cdh4 &&
wget
http://archive.cloudera.com/cdh4/redhat/5/x86_64/cdh/RPM-GPG-KEY-cloudera8、客户端配置:
在/etc/yum.repos.d/CentOS-Base.repo中添加:
[cloudera-cdh4]
name=Cloudera's Distribution for Hadoop, Version 4
baseurl=http://192.168.86.137/cloudera-cdh4/
gpgkey = http://192.168.86.137/cloudera-cdh4/RPM-GPG-KEY-cloudera
gpgcheck = 1 [cloudera-gplextras4]
# Packages for Cloudera's Distribution for Hadoop, Version 4, on RedHat or CentOS 6 x86_64
name=Cloudera's Distribution for Hadoop, Version 4
baseurl=http://192.168.86.137/cloudera-gplextras4/
gpgkey = http://192.168.86.137/cloudera-gplextras4/RPM-GPG-KEY-cloudera
gpgcheck = 1
9、客户端更新yum:
sudo yum clean all && sudo yum makecache