离线方式搭建本地的nginx yum源

Posted Oops!

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了离线方式搭建本地的nginx yum源相关的知识,希望对你有一定的参考价值。

  1. 手动下载安装nginx 需要的安装依赖包  

登录可连接公网的一台机器, 配置 nginx.repo yum源

 

cat nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0


执行 yum clean all && yum makecache

 

2. 执行 yum install  --downloadonly --downloaddir=/root/nginx nginx  将安装nginx所需要的安装rpm包下载到/root/nginx目录下

下载的 rpm 安装包目录

centos-indexhtml-7-9.el7.centos.noarch.rpm  nginx-1.16.1-2.el7.x86_64.rpm                        nginx-mod-http-perl-1.16.1-2.el7.x86_64.rpm
gd-2.0.35-26.el7.x86_64.rpm                 nginx-all-modules-1.16.1-2.el7.noarch.rpm            nginx-mod-http-xslt-filter-1.16.1-2.el7.x86_64.rpm
gperftools-libs-2.6.1-1.el7.x86_64.rpm      nginx-filesystem-1.16.1-2.el7.noarch.rpm             nginx-mod-mail-1.16.1-2.el7.x86_64.rpm
libXpm-3.5.12-1.el7.x86_64.rpm              nginx-mod-http-image-filter-1.16.1-2.el7.x86_64.rpm  nginx-mod-stream-1.16.1-2.el7.x86_64.rpm


3. 搭建本地yum源 , 将rpm包拷贝到本地源所在的目录

centos-indexhtml-7-9.el7.centos.noarch.rpm nginx-1.16.1-2.el7.x86_64.rpm nginx-mod-http-perl-1.16.1-2.el7.x86_64.rpm gd-2.0.35-26.el7.x86_64.rpm nginx-all-modules-1.16.1-2.el7.noarch.rpm nginx-mod-http-xslt-filter-1.16.1-2.el7.x86_64.rpm gperftools-libs-2.6.1-1.el7.x86_64.rpm nginx-filesystem-1.16.1-2.el7.noarch.rpm nginx-mod-mail-1.16.1-2.el7.x86_64.rpm libXpm-3.5.12-1.el7.x86_64.rpm nginx-mod-http-image-filter-1.16.1-2.el7.x86_64.rpm nginx-mod-stream-1.16.1-2.el7.x86_64.rpm

centos-indexhtml-7-9.el7.centos.noarch.rpm  nginx-1.16.1-2.el7.x86_64.rpm                        nginx-mod-http-perl-1.16.1-2.el7.x86_64.rpm
gd-2.0.35-26.el7.x86_64.rpm                 nginx-all-modules-1.16.1-2.el7.noarch.rpm            nginx-mod-http-xslt-filter-1.16.1-2.el7.x86_64.rpm
gperftools-libs-2.6.1-1.el7.x86_64.rpm      nginx-filesystem-1.16.1-2.el7.noarch.rpm             nginx-mod-mail-1.16.1-2.el7.x86_64.rpm
libXpm-3.5.12-1.el7.x86_64.rpm              nginx-mod-http-image-filter-1.16.1-2.el7.x86_64.rpm  nginx-mod-stream-1.16.1-2.el7.x86_64.rp3

 










以上是关于离线方式搭建本地的nginx yum源的主要内容,如果未能解决你的问题,请参考以下文章

搭建本地离线yum仓库

搭建本地 yum 源 离线安装 Docker 1.12.6

CentOS 如何搭建本地和局域网yum源

搭建本地Ceph yum源

Centos 7 局域网 yum 源搭建

Centos 7 局域网 yum 源搭建