前言:
在某些离线环境下,我们可能不得不处理一些棘手的问题,如:安装开源项目到离线服务器上,如:半虚拟化的云平台提供的云主机,其中的服务器软件包版本可能有了细微的变化,从而导致一些难以处理的问题,这时,我们就需要一个完整的,基本包含所有软件包的yum源来帮助我们省心省力的处理软件包的依赖问题。
1、配置yum源
base wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo epel wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
2、装软件
yum install createrepo yum-utils -y
3、配置本地目录
mkdir -p /data
4、同步
yum repolist reposync -r base -p /data