2.[创建Local Repository]2. create local repo

1. 安装yum utilities

yum install -y yum-utils createrepo

2. 创建 repository 文件夹

 mkdir -p /var/www/html/

3. cd /var/www/html

4. mkdir -p ambari/centos7

5. 下载 repo file 并且 确认 repository 可用

Ambari :wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.2.2/ambari.repo -O /etc/yum.repos.d/ambari.repo

ambari repo name must be ”ambari.repo“, otherwise 

 will throw  out error when registering hosts into cluster

HDP :wget  -nv http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.5.0/hdp.repo -O /etc/yum.repos.d/hdp-2.6.5.0.repo

HDP-GPL:wget -nv http://public-repo-1.hortonworks.com/HDP-GPL/centos6/2.x/updates/2.6.5.0/hdp.gpl.repo -O /etc/yum.repos.d/hdp.gpl-2.6.5.0.repo

HDF :wget -nv http://public-repo-1.hortonworks.com/HDF/centos7/3.x/updates/3.1.0.0/hdf.repo -O /etc/yum.repos.d/hdf-3.1.0.0.repo

执行 yum repolist,确保ambari,hdp,hdp-gpl,hdf 出现

yum repolist

6. 创建Ambari本地仓库

cd /var/www/html/ambari/centos7

 reposync -r ambari-2.6.2.2

下载ambari,创建本地ambari仓库

cd /var/www/html/ambari/centos7/ambari-2.6.2.2

createrepo .

nginx 访问结果

修改 Ambari  repo 文件:替换baseurl为本地位置: 

baseurl=http://114.115.141.93/ambari/centos7/ambari-2.6.2.2/

Ambari repo 文件修改后

7. 创建hdp本地仓库

cd /var/www/html/

mkdir -p hdp/centos7

cd hdp/centos7

reposync -r HDP-2.6.5.0

reposync -r HDP-UTILS-1.1.0.22

reposync -r HDP-GPL-2.6.5.0

cd /var/www/html/hdp/centos7/HDP-2.6.5.0

createrepo .

cd /var/www/html/hdp/centos7/HDP-UTILS-1.1.0.22

createrepo .

cd /var/www/html/hdp/centos7/HDP-GPL-2.6.5.0

createrepo .

修改repo 文件的base url,使其指定到本地 repository

修改hdp repo文件


8. 创建hdf本地仓库

cd /var/www/html/

mkdir -p hdf/centos7

cd hdf/centos7

reposync -r HDF-3.1.0.0

creating hdf repository

cd /var/www/html/hdf/centos7/HDF-3.1.0.0

createrepo .

cd /var/www/html/hdp/centos7/

reposync -r HDP-UTILS-1.1.0.21

cd /var/www/html/hdp/centos7/HDP-UTILS-1.1.0.21

createrepo .

修改repo base url:

9. edit /etc/yum/pluginconf.d/priorities.conf, 内容如下

[main]

enabled=1

gpgcheck=0


上一篇 下一篇

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容