centos7.5-cdh5.16离线安装(二)软件准备-centos7.5同步rpm包,搭建本地yum源

由于开发环境只有局域网,没法使用网上的各种YUM源,来回拷贝rpm包安装麻烦,还得解决依赖问题。可以将其他yum源服务器的包同步到本地
感兴趣的小伙伴可以去官网下载 下面是我整理好的所有需要用到的rpm包

百度网盘链接有点大哈。。。。。。16G不着急慢慢下哈。。。。。

链接:https://pan.baidu.com/s/1_Uj1vN5zYRfGc3hf6KCQ_Q 
提取码:w3jo 

将rpms.tar.gz 上传到root目录
解压

tar zxvf rpm.tar.gz 

删除所有节点 /etc/yum.repos.d 目录下的所有内容 rm -rf ./*
local.repo内容如下新建即可 mkdir local.repo

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#
[base]
name=base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=file:///root/docs/x86_64
enabled=1
gpgcheck=0

[updates]
name=updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=file:///root/docs/updates
enabled=1
gpgcheck=0

[extras]
name=extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=file:///root/docs/extras
enabled=1
gpgcheck=0

#additional packages that extend functionality of existing packages
[centosplus]
name=centosplus
baseurl=file:///root/docs/centosplus
gpgcheck=1
enabled=0

[mysql]
name=mysql
baseurl=file:///root/docs/mysql
enabled=1
gpgcheck=0

将local.repo 文件移动到yum.repos.d
1 然后安装

yum install -y httpd 

开启httpd服务

systemctl start httpd.service
systemctl enable httpd.service

2 删除root下的docs 将rpms.tar.gz 解压至 /var/www/html/

tar -zxvf rpm.tar.gz -C /var/www/html/

3 解压完成 在浏览器查看ip:docs 是否可以解压成功
在这里插入图片描述

删除、etc/yum.repos.d 下的local.repo
将base.repo 上传至 /etc/yum.repos.d(每个节点都要上传同时删除掉每个节点改目录下的所有文件)可通过scp命令进行传输

scp base.repo hadoop002:/etc/yum.repos.d(根据自己的实际情况)

base.repo内容如下 mkdir base.repo

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#
[base]
name=base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://192.168.1.80/docs/x86_64
enabled=1
gpgcheck=0

[updates]
name=updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://192.168.1.80/docs/updates
enabled=1
gpgcheck=0

[extras]
name=extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://192.168.1.80/docs/extras
enabled=1
gpgcheck=0

#additional packages that extend functionality of existing packages
[centosplus]
name=centosplus
baseurl=http://192.168.1.80/docs/centosplus
gpgcheck=1
enabled=0

[mysql]
name=mysql
baseurl=http://192.168.1.80/docs/mysql
enabled=1
gpgcheck=0

修改base.repo (根据自己的实际情况修改ip)

在这里插入图片描述

4 每个节点都安装ntp服务

yum install -y nano wget ntp

待续。。。见下篇文章l离线安装mysql

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值