基于公司内网部署的情况,当我们需要进行本地部署时,环境依赖永远是大问题,那么配置了本地yum源后,我们就可以对需要的依赖直接进行yum操作
前置知识:linux基础
前期准备:系统镜像文件(下方为CentOS-7.6-x86_64-DVD-1810.iso)
光盘挂载
在进入服务器后,我们需要将对应的镜像挂载到我们的本地磁盘,可以理解为在windows上插入一个U盘,U盘里包含了所有的系统文件依赖,虽然版本可能不是最新的,但内网环境下,大多数的默认版本已经够用,这免去了非常多的打包传入传出过程。
参考文档:
https://www.cnblogs.com/irisrain/p/4309801.html
https://blog.csdn.net/dahuzix/article/details/80316920
配置本地yum源
至此,本地yum源配置完毕,我们就可以使用yum install命令下载依赖啦
参考文档
https://blog.csdn.net/no_ob/article/details/78668255
各类资源(通外网的情况)
在上述yum仓库目录下下载对应的yum源之后,更新yum即可
阿里源:
https://developer.aliyun.com/mirror/
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
网易163:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
腾讯源:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos6_base.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-6.repo
已有 0 条评论