hadoop环境搭建之制作本地yum源

因为需要的三个安装包都在国外服务器,切最大的超过5G。

如果不是对网络特别有自信,最好确认完整下载后制作本地yum源安装(推荐)。

一、安装 Apache HTTP 服务器

直接yum安装即可

yum install httpd

因为前面已经关闭了防火墙,不需要额外添加信任。如果没有关闭请使用以下命令信任

firewall-cmd --add-service=http 
firewall-cmd --permanent --add-service=http

启动并添加开机启动

systemctl start httpd.service
systemctl enable httpd.service

查看安装启动是否成功



二、下载安装资源

适用于CentOS 7 版本的Ambari Repository:
http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.0.0/ambari-2.2.0.0-centos7.tar.gz.md5

下载适用于CentOS 7 版本的HDP Stack Repository:
HDP下载链接:
http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.3.4.0/HDP-2.3.4.0-centos7-rpm.tar.gz.md5

HDP下载链接:
http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos7/HDP-UTILS-1.1.0.20-centos7.tar.gz.md5

将下载的压缩包解压到/var/www/html/ambari目录(与yum源文件中的地址对应好)



解压

cd /var/www/html/ambari
tar -zxvf ambari-2.2.0.0-centos7.tar.gz
tar -zxvf HDP-2.3.4.0-centos7-rpm.tar.gz
tar -zxvf HDP-UTILS-1.1.0.20-centos7.tar.gz

使用浏览器访问查看是否能够通过http成功访问



三、创建本地yum源文件

下载yum源模板

下载适用于CentOS 7 版本的Ambari Repository:
http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.0.0/ambari.repo

下载适用于CentOS 7 版本的HDP Stack Repository:
http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.3.4.0/hdp.repo

修改其中的URL为本地的地址

ambari.repo

#VERSION_NUMBER=2.2.0.0-1310

[Updates-ambari-2.2.0.0]
name=ambari-2.2.0.0 - Updates
baseurl=http://192.168.0.172:80/ambari/ambari-2.2.0.0/centos7/2.2.0.0-1310
gpgcheck=1
gpgkey=http://public-repo-1.hortonworks.com/ambari/centos7/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1


hdp.repo

#VERSION_NUMBER=2.3.4.0-3485
[HDP-2.3.4.0]
name=HDP Version - HDP-2.3.4.0
baseurl=http://192.168.0.172:80/ambari/HDP/centos7/2.x/updates/2.3.4.0
gpgcheck=1
gpgkey=http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.3.4.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1


[HDP-UTILS-1.1.0.20]
name=HDP Utils Version - HDP-UTILS-1.1.0.20
baseurl=http://192.168.0.172:80/ambari/HDP-UTILS-1.1.0.20/repos/centos7
gpgcheck=1
gpgkey=http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.3.4.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1

将上面的修改过的源放到/etc/yum.repos.d/下面

yum clean all
yum makecache
yum repolist


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值