–> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-20.10.7-3.el7.x86_64
–> Processing Dependency: containerd.io >= 1.4.1 for package: 3:docker-ce-20.10.7-3.el7.x86_64
–> Processing Dependency: docker-ce-cli for package: 3:docker-ce-20.10.7-3.el7.x86_64
–> Processing Dependency: docker-ce-rootless-extras for package: 3:docker-ce-20.10.7-3.el7.x86_64
–> Running transaction check
—> Package container-selinux.noarch 2:2.119.2-1.911c772.el7_8 will be installed
—> Package containerd.io.x86_64 0:1.4.6-3.1.el7 will be installed
—> Package docker-ce-cli.x86_64 1:20.10.7-3.el7 will be installed
–> Processing Dependency: docker-scan-plugin(x86-64) for package: 1:docker-ce-cli-20.10.7-3.el7.x86_64
—> Package docker-ce-rootless-extras.x86_64 0:20.10.7-3.el7 will be installed
–> Processing Dependency: fuse-overlayfs >= 0.7 for package: docker-ce-rootless-extras-20.10.7-3.el7.x86_64
–> Processing Dependency: slirp4netns >= 0.4 for package: docker-ce-rootless-extras-20.10.7-3.el7.x86_64
–> Running transaction check
—> Package docker-scan-plugin.x86_64 0:0.8.0-3.el7 will be installed
—> Package fuse-overlayfs.x86_64 0:0.7.2-6.el7_8 will be installed
–> Processing Dependency: libfuse3.so.3(FUSE_3.2)(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64
–> Processing Dependency: libfuse3.so.3(FUSE_3.0)(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64
–> Processing Dependency: libfuse3.so.3()(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64
—> Package slirp4netns.x86_64 0:0.4.3-4.el7_8 will be installed
–> Running transaction check
—> Package fuse3-libs.x86_64 0:3.6.1-4.el7 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================
Package Arch Version Repository Size
===============================================================================================================
Installing:
docker-ce x86_64 3:20.10.7-3.el7 docker-ce-stable 27 M
Installing for dependencies:
container-selinux noarch 2:2.119.2-1.911c772.el7_8 extras 40 k
containerd.io x86_64 1.4.6-3.1.el7 docker-ce-stable 34 M
docker-ce-cli x86_64 1:20.10.7-3.el7 docker-ce-stable 33 M
docker-ce-rootless-extras x86_64 20.10.7-3.el7 docker-ce-stable 9.2 M
docker-scan-plugin x86_64 0.8.0-3.el7 docker-ce-stable 4.2 M
fuse-overlayfs x86_64 0.7.2-6.el7_8 extras 54 k
fuse3-libs x86_64 3.6.1-4.el7 extras 82 k
slirp4netns x86_64 0.4.3-4.el7_8 extras 81 k
Transaction Summary
===============================================================================================================
Install 1 Package (+8 Dependent packages)
Total download size: 107 M
Installed size: 438 M
Background downloading packages, then exiting:
(1/9): container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm | 40 kB 00:00:00
(2/9): docker-ce-20.10.7-3.el7.x86_64.rpm | 27 MB 00:00:16
(3/9): containerd.io-1.4.6-3.1.el7.x86_64.rpm | 34 MB 00:00:21
(4/9): docker-ce-rootless-extras-20.10.7-3.el7.x86_64.rpm | 9.2 MB 00:00:06
(5/9): fuse3-libs-3.6.1-4.el7.x86_64.rpm | 82 kB 00:00:00
(6/9): slirp4netns-0.4.3-4.el7_8.x86_64.rpm | 81 kB 00:00:00
(7/9): fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm | 54 kB 00:00:01
(8/9): docker-scan-plugin-0.8.0-3.el7.x86_64.rpm | 4.2 MB 00:00:02
(9/9): docker-ce-cli-20.10.7-3.el7.x86_64.rpm | 33 MB 00:00:21
Total 2.8 MB/s | 107 MB 00:00:37
exiting because “Download Only” specified
[root@ccx ~]# cd /docker/
[root@ccx docker]# ls
containerd.io-1.4.6-3.1.el7.x86_64.rpm docker-scan-plugin-0.8.0-3.el7.x86_64.rpm
container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm fuse3-libs-3.6.1-4.el7.x86_64.rpm
docker-ce-20.10.7-3.el7.x86_64.rpm fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm
docker-ce-cli-20.10.7-3.el7.x86_64.rpm slirp4netns-0.4.3-4.el7_8.x86_64.rpm
docker-ce-rootless-extras-20.10.7-3.el7.x86_64.rpm
[root@ccx docker]#
下载完毕以后就可以将这些包全部拷贝到需要离线安装的文件中了。
如果服务器很多的话,可以写个批量拷贝文件的脚本,然后把下面安装离线包的命令放在后面,一并就解压了哦。
- 方法很简单:在存放需要安装的软件包目录下,执行下面一行代码即可了
rpm -ivhU * --nodeps --force
-
-
ivhU
:先安装并升级,这个U建议加上,因为有些命令安装是有升级的服务的,如果不加U就失败了【比如java】【如何确定哪些包有升级的包,直接在通外网的服务器上yum安装该服务,看过程即可】 -
--nodeps --force
:忽略软件包的依赖关系,忽略软件包及文件的冲突并强行安装 -
如,我以安装docker为例:
[root@ccx docker]# ls
containerd.io-1.4.6-3.1.el7.x86_64.rpm docker-scan-plugin-0.8.0-3.el7.x86_64.rpm
container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm fuse3-libs-3.6.1-4.el7.x86_64.rpm
docker-ce-20.10.7-3.el7.x86_64.rpm fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm
docker-ce-cli-20.10.7-3.el7.x86_64.rpm slirp4netns-0.4.3-4.el7_8.x86_64.rpm
docker-ce-rootless-extras-20.10.7-3.el7.x86_64.rpm
[root@ccx docker]#
[root@ccx docker]# rpm -ivhU * --nodeps --force
Preparing… ################################# [100%]
Updating / installing…
1:docker-scan-plugin-0:0.8.0-3.el7 ################################# [ 11%]
2:docker-ce-cli-1:20.10.7-3.el7 ################################# [ 22%]
3:container-selinux-2:2.119.2-1.911################################# [ 33%]
4:containerd.io-1.4.6-3.1.el7 ################################# [ 44%]
5:slirp4netns-0.4.3-4.el7_8 ################################# [ 56%]
6:fuse3-libs-3.6.1-4.el7 ################################# [ 67%]
7:fuse-overlayfs-0.7.2-6.el7_8 ################################# [ 78%]
8:docker-ce-rootless-extras-0:20.10################################# [ 89%]
9:docker-ce-3:20.10.7-3.el7 ################################# [100%]
[root@ccx docker]#
[root@ccx docker]# systemctl restart docker
[root@ccx docker]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@ccx docker]#
用rpm安装的包是不能通过yum卸载的,只能通过rpm卸载,命令:rpm -e --nodeps package
【如果不加–nodeps,就会因为有依赖导致卸载报错】
如上,安装了9个,就需要rpm -e 包名【复制粘贴上面的包名】
重复9次【需要去掉后缀】。
[root@ccx ~]# rpm -e --nodeps fuse-overlayfs
[root@ccx ~]# rpm -e --nodeps containerd.io
[root@ccx ~]# rpm -e --nodeps docker-scan-plugin
[root@ccx ~]# rpm -e --nodeps container-selinux
[root@ccx ~]# rpm -e --nodeps fuse3-libs
[root@ccx ~]# rpm -e --nodeps docker-ce-cli
[root@ccx ~]# rpm -e --nodeps slirp4netns
[root@ccx ~]# rpm -e --nodeps docker-ce
[root@ccx ~]# rpm -e --nodeps docker-ce-rootless-extras # 这个卸载报错是因为卸载docker-ce的时候一并给卸载了】
error: package docker-ce-rootless-extras is not installed
卸载完毕重新去下载的时候,发现又是9个包了
Total download size: 107 M
Installed size: 438 M
Background downloading packages, then exiting:
(1/9): container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm | 40 kB 00:00:00
(2/9): docker-ce-20.10.7-3.el7.x86_64.rpm | 27 MB 00:00:13
(3/9): containerd.io-1.4.6-3.1.el7.x86_64.rpm | 34 MB 00:00:18
(4/9): docker-ce-rootless-extras-20.10.7-3.el7.x86_64.rpm | 9.2 MB 00:00:04
(5/9): fuse3-libs-3.6.1-4.el7.x86_64.rpm | 82 kB 00:00:00
(6/9): fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm | 54 kB 00:00:00
(7/9): slirp4netns-0.4.3-4.el7_8.x86_64.rpm | 81 kB 00:00:00
(8/9): docker-scan-plugin-0.8.0-3.el7.x86_64.rpm | 4.2 MB 00:00:02
(9/9): docker-ce-cli-20.10.7-3.el7.x86_64.rpm | 33 MB 00:00:15
Total 3.7 MB/s | 107 MB 00:00:29
exiting because “Download Only” specified
=========================================================================
-
我们知道卸载包的命令是:
yum remove package
【方法并不会卸载其依赖】 -
卸载包及其依赖的命令是:
yum autoremove package
-
如下,我以卸载docker及其依赖为例
[root@ccx docker]# yum autoremove docker-ce
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
–> Running transaction check
—> Package docker-ce.x86_64 3:20.10.7-3.el7 will be erased
–> Processing Dependency: docker-ce for package: docker-ce-rootless-extras-20.10.7-3.el7.x86_64
–> Running transaction check
—> Package docker-ce-rootless-extras.x86_64 0:20.10.7-3.el7 will be erased
–> Finished Dependency Resolution
–> Finding unneeded leftover dependencies
为了做好运维面试路上的助攻手,特整理了上百道 【运维技术栈面试题集锦】 ,让你面试不慌心不跳,高薪offer怀里抱!
这次整理的面试题,小到shell、MySQL,大到K8s等云原生技术栈,不仅适合运维新人入行面试需要,还适用于想提升进阶跳槽加薪的运维朋友。
本份面试集锦涵盖了
- 174 道运维工程师面试题
- 128道k8s面试题
- 108道shell脚本面试题
- 200道Linux面试题
- 51道docker面试题
- 35道Jenkis面试题
- 78道MongoDB面试题
- 17道ansible面试题
- 60道dubbo面试题
- 53道kafka面试
- 18道mysql面试题
- 40道nginx面试题
- 77道redis面试题
- 28道zookeeper
总计 1000+ 道面试题, 内容 又全含金量又高
- 174道运维工程师面试题
1、什么是运维?
2、在工作中,运维人员经常需要跟运营人员打交道,请问运营人员是做什么工作的?
3、现在给你三百台服务器,你怎么对他们进行管理?
4、简述raid0 raid1raid5二种工作模式的工作原理及特点
5、LVS、Nginx、HAproxy有什么区别?工作中你怎么选择?
6、Squid、Varinsh和Nginx有什么区别,工作中你怎么选择?
7、Tomcat和Resin有什么区别,工作中你怎么选择?
8、什么是中间件?什么是jdk?
9、讲述一下Tomcat8005、8009、8080三个端口的含义?
10、什么叫CDN?
11、什么叫网站灰度发布?
12、简述DNS进行域名解析的过程?
13、RabbitMQ是什么东西?
14、讲一下Keepalived的工作原理?
15、讲述一下LVS三种模式的工作过程?
16、mysql的innodb如何定位锁问题,mysql如何减少主从复制延迟?
17、如何重置mysql root密码?
加入社区》https://bbs.csdn.net/forums/4304bb5a486d4c3ab8389e65ecb71ac0
Varinsh和Nginx有什么区别,工作中你怎么选择?
7、Tomcat和Resin有什么区别,工作中你怎么选择?
8、什么是中间件?什么是jdk?
9、讲述一下Tomcat8005、8009、8080三个端口的含义?
10、什么叫CDN?
11、什么叫网站灰度发布?
12、简述DNS进行域名解析的过程?
13、RabbitMQ是什么东西?
14、讲一下Keepalived的工作原理?
15、讲述一下LVS三种模式的工作过程?
16、mysql的innodb如何定位锁问题,mysql如何减少主从复制延迟?
17、如何重置mysql root密码?
加入社区》https://bbs.csdn.net/forums/4304bb5a486d4c3ab8389e65ecb71ac0