博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Offline Package Installation II
阅读量:5101 次
发布时间:2019-06-13

本文共 4166 字,大约阅读时间需要 13 分钟。

Now, let's practice what we have learned from series I. For example, I want to create a self-contained k8s cluster installer, that means I need to install docker and kubeadm etc offline in the target machine.

Docker

Note: here we only download actual dependencies need for installation, not all rpms if we use --installroot option

I want to install Docker 18.06.3 (currently kubeadm now properly recognizes Docker 18.09.0 and newer, but still treats 18.06 as the default supported version). You should perform below steps on a machine that hasn't install docker yet.

Note: , rpms list in this link are not complete, they are in top level but can be used to upgrade version.

Uninstall old version

yum remove docker \           docker-client \           docker-client-latest \           docker-common \           docker-latest \           docker-latest-logrotate \           docker-logrotate \           docker-engine

The contents of /var/lib/docker/, including images, containers, volumes, and networks, are preserved. The Docker CE package is now called docker-ce.

Set up docker repository

Before you install Docker CE for the first time on a new host machine, you need to set up the Docker repository. Afterward, you can install and update Docker from the repository.

yum install -y yum-utils \  device-mapper-persistent-data \  lvm2

Use the following command to set up the stable repository.

yum-config-manager \    --add-repo \    https://download.docker.com/linux/centos/docker-ce.repo

List docker version

List and sort the versions available in your repo. This example sorts results by version number, highest to lowest, and is truncated:

yum list docker-ce --showduplicates | sort -r
Loaded plugins: product-id, search-disabled-reposdocker-ce.x86_64            3:18.09.2-3.el7                     docker-ce-stabledocker-ce.x86_64            3:18.09.1-3.el7                     docker-ce-stabledocker-ce.x86_64            3:18.09.0-3.el7                     docker-ce-stabledocker-ce.x86_64            18.06.3.ce-3.el7                    docker-ce-stabledocker-ce.x86_64            18.06.2.ce-3.el7                    docker-ce-stabledocker-ce.x86_64            18.06.1.ce-3.el7                    docker-ce-stabledocker-ce.x86_64            18.06.0.ce-3.el7                    docker-ce-stabledocker-ce.x86_64            18.03.1.ce-1.el7.centos             docker-ce-stabledocker-ce.x86_64            18.03.0.ce-1.el7.centos             docker-ce-stabledocker-ce.x86_64            17.12.1.ce-1.el7.centos             docker-ce-stable...

Download docker rpms

Install a specific version by its fully qualified package name, which is the package name (docker-ce) plus the version string (2nd column) starting at the first colon (:), up to the first hyphen, separated by a hyphen (-). For example, docker-ce-18.06.3.ce.

mkdir -p /root/docker-18.06.3-rpmsyum install --downloadonly --downloaddir=/root/docker-18.06.3-rpms docker-ce-18.06.3.ce

list the rpms in the target folder:

audit-2.8.4-4.el7.x86_64.rpm               libselinux-utils-2.5-14.1.el7.x86_64.rpmaudit-libs-2.8.4-4.el7.x86_64.rpm          libsemanage-2.5-14.el7.x86_64.rpmaudit-libs-python-2.8.4-4.el7.x86_64.rpm   libsemanage-python-2.5-14.el7.x86_64.rpmcheckpolicy-2.5-8.el7.x86_64.rpm           libsepol-2.5-10.el7.x86_64.rpmcontainer-selinux-2.68-1.el7.noarch.rpm    libtool-ltdl-2.4.2-22.el7_3.x86_64.rpmdocker-ce-18.06.3.ce-3.el7.x86_64.rpm      policycoreutils-2.5-29.el7_6.1.x86_64.rpmlibcgroup-0.41-20.el7.x86_64.rpm           policycoreutils-python-2.5-29.el7_6.1.x86_64.rpmlibseccomp-2.3.1-3.el7.x86_64.rpm          python-IPy-0.75-6.el7.noarch.rpmlibselinux-2.5-14.1.el7.x86_64.rpm         setools-libs-3.3.8-4.el7.x86_64.rpmlibselinux-python-2.5-14.1.el7.x86_64.rpm

Note that the required components may be changed in later version, such as 18.09.2

mkdir -p /root/docker-18.09.2-rpmsyum install --downloadonly --downloaddir=/root/docker-18.09.2-rpms docker-ce-18.09.2 docker-ce-cli-18.09.2 containerd.io

Install docker rpms

now install docker 18.06.3 offline by running:

yum --disablerepo=* -y install /root/docker-18.06.3-rpms/*.rpm

转载于:https://www.cnblogs.com/chengdol/p/10443927.html

你可能感兴趣的文章
ReentrantLock 源码解析
查看>>
永远的动漫,梦想在,就有远方
查看>>
mysql 查看当前连接及修改连接数
查看>>
springboot No Identifier specified for entity的解决办法
查看>>
【Luogu1303】【模板】A*B Problem
查看>>
慵懒中长大的人,只会挨生活留下的耳光
查看>>
HTML——校友会(bootstrap)
查看>>
【分布计算环境学习笔记】2 分布式系统中的面向对象技术
查看>>
Enable SSH Server
查看>>
如何终止线程的运行(C/C++)
查看>>
"远程桌面连接--“发生身份验证错误。要求的函数不受支持
查看>>
【BZOJ1565】 植物大战僵尸
查看>>
视频:"我是设计师"高清完整版Plus拍摄花絮
查看>>
sicp solutions
查看>>
VALSE2019总结(4)-主题报告
查看>>
浅谈 unix, linux, ios, android 区别和联系
查看>>
PhotoZoom放大图片,真的能无损吗?
查看>>
转载分享移动网站最佳实践
查看>>
spark--环境搭建--4.ZooKeeper345集群搭建
查看>>
【Leetcode_easy】1103. Distribute Candies to People
查看>>