CentOS 8 系统中如果没有安装Podman的话,想要离线安装会比较麻烦,因为podman依赖的包比较多,从网上一个一个下载会很繁琐,也容易出错。
这里介绍一种曲线救国的方式来离线安装。
首先分享下我刚获取的离线安装包,下载,解压后,直接安装所有rpm 就可以了。
链接:https://pan.baidu.com/s/1AKrGVDNln1zSNpsD74HQrg
提取码:6666
[root@node13 podmanpackage]# podman -v
podman version 3.3.1
之所以叫曲线救国,多少是有点儿原因的:
离线安装包的制作方法,很简单,就是用一台能够联网的centos8 机器,然后执行下面的命令yum install --downloadonly --downloaddir=/opt/podmanpackage/ podman
就会把所有的包下载到 /opt/podmanpackage/ 这个目录下,然后把这个目录下的所有rpm 打包到离线的机器上进行安装,就可以了,是不是有点儿曲线救国的意思。
下面是操作日志:
[root@node13 podmanpackage]# yum install --downloadonly --downloaddir=/opt/podmanpackage/ podman
CentOS-8.5.2111 - Base - mirrors.aliyun.com 192 kB/s | 4.6 MB 00:24
CentOS-8.5.2111 - Extras - mirrors.aliyun.com 38 kB/s | 10 kB 00:00
CentOS-8.5.2111 - AppStream - mirrors.aliyun.com 132 kB/s | 8.4 MB 01:05
Dependencies resolved.
=============================================================================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================================================================
Installing:
podman x86_64 3.3.1-9.module_el8.5.0+988+b1f0b741 AppStream 12 M
Installing dependencies:
conmon x86_64 2:2.0.29-1.module_el8.5.0+890+6b136101 AppStream 52 k
containernetworking-plugins x86_64 1.0.0-1.module_el8.5.0+890+6b136101 AppStream 19 M
containers-common noarch 2:1-2.module_el8.5.0+890+6b136101 AppStream 79 k
criu x86_64 3.15-3.module_el8.5.0+890+6b136101 AppStream 518 k
fuse-overlayfs x86_64 1.7.1-1.module_el8.5.0+890+6b136101 AppStream 73 k
fuse3 x86_64 3.2.1-12.el8 base 50 k
fuse3-libs x86_64 3.2.1-12.el8 base 94 k
libnet x86_64 1.1.6-15.el8 AppStream 67 k
libslirp x86_64 4.4.0-1.module_el8.5.0+890+6b136101 AppStream 70 k
podman-catatonit x86_64 3.3.1-9.module_el8.5.0+988+b1f0b741 AppStream 340 k
runc x86_64 1.0.2-1.module_el8.5.0+911+f19012f9 AppStream 3.1 M
slirp4netns x86_64 1.1.8-1.module_el8.5.0+890+6b136101 AppStream 51 k
Enabling module streams:
container-tools rhel8
Transaction Summary
=============================================================================================================================================================================================
Install 13 Packages
Total download size: 36 M
Installed size: 124 M
YUM will only download packages for the transaction.
Is this ok [y/N]: y
Downloading Packages:
(1/13): fuse3-3.2.1-12.el8.x86_64.rpm 77 kB/s | 50 kB 00:00
(2/13): conmon-2.0.29-1.module_el8.5.0+890+6b136101.x86_64.rpm 57 kB/s | 52 kB 00:00
(3/13): fuse3-libs-3.2.1-12.el8.x86_64.rpm 67 kB/s | 94 kB 00:01
(4/13): containers-common-1-2.module_el8.5.0+890+6b136101.noarch.rpm 67 kB/s | 79 kB 00:01
(5/13): fuse-overlayfs-1.7.1-1.module_el8.5.0+890+6b136101.x86_64.rpm 74 kB/s | 73 kB 00:00
(6/13): libnet-1.1.6-15.el8.x86_64.rpm 88 kB/s | 67 kB 00:00
(7/13): libslirp-4.4.0-1.module_el8.5.0+890+6b136101.x86_64.rpm 96 kB/s | 70 kB 00:00
(8/13): criu-3.15-3.module_el8.5.0+890+6b136101.x86_64.rpm 91 kB/s | 518 kB 00:05
(9/13): podman-catatonit-3.3.1-9.module_el8.5.0+988+b1f0b741.x86_64.rpm 101 kB/s | 340 kB 00:03
(10/13): runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64.rpm 98 kB/s | 3.1 MB 00:32
(11/13): slirp4netns-1.1.8-1.module_el8.5.0+890+6b136101.x86_64.rpm 62 kB/s | 51 kB 00:00
(12/13): podman-3.3.1-9.module_el8.5.0+988+b1f0b741.x86_64.rpm 97 kB/s | 12 MB 02:07
(13/13): containernetworking-plugins-1.0.0-1.module_el8.5.0+890+6b136101.x86_64.rpm 95 kB/s | 19 MB 03:25
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 177 kB/s | 36 MB 03:26
Complete!
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
[root@node13 podmanpackage]# ll
total 36536
-rw-r--r--. 1 root root 53667 Nov 14 08:47 conmon-2.0.29-1.module_el8.5.0+890+6b136101.x86_64.rpm
-rw-r--r--. 1 root root 20038039 Nov 14 08:50 containernetworking-plugins-1.0.0-1.module_el8.5.0+890+6b136101.x86_64.rpm
-rw-r--r--. 1 root root 80919 Nov 14 08:47 containers-common-1-2.module_el8.5.0+890+6b136101.noarch.rpm
-rw-r--r--. 1 root root 530199 Nov 14 08:47 criu-3.15-3.module_el8.5.0+890+6b136101.x86_64.rpm
-rw-r--r--. 1 root root 51396 Nov 14 08:47 fuse3-3.2.1-12.el8.x86_64.rpm
-rw-r--r--. 1 root root 96540 Nov 14 08:47 fuse3-libs-3.2.1-12.el8.x86_64.rpm
-rw-r--r--. 1 root root 74287 Nov 14 08:47 fuse-overlayfs-1.7.1-1.module_el8.5.0+890+6b136101.x86_64.rpm
-rw-r--r--. 1 root root 68632 Nov 14 08:47 libnet-1.1.6-15.el8.x86_64.rpm
-rw-r--r--. 1 root root 71995 Nov 14 08:47 libslirp-4.4.0-1.module_el8.5.0+890+6b136101.x86_64.rpm
-rw-r--r--. 1 root root 12692155 Nov 14 08:49 podman-3.3.1-9.module_el8.5.0+988+b1f0b741.x86_64.rpm
-rw-r--r--. 1 root root 348543 Nov 14 08:47 podman-catatonit-3.3.1-9.module_el8.5.0+988+b1f0b741.x86_64.rpm
-rw-r--r--. 1 root root 3227247 Nov 14 08:48 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64.rpm
-rw-r--r--. 1 root root 52427 Nov 14 08:48 slirp4netns-1.1.8-1.module_el8.5.0+890+6b136101.x86_64.rpm
[root@node13 podmanpackage]# vim /etc/resolv.conf
[root@node13 podmanpackage]# vim /etc/sysconfig/network-scripts/ifcfg-ens33
[root@node13 podmanpackage]# systemctl restart NetworkManager
[root@node13 podmanpackage]# ping www.baidu.com
ping: www.baidu.com: Name or service not known
[root@node13 podmanpackage]# rpm -ivh *.rpm
warning: conmon-2.0.29-1.module_el8.5.0+890+6b136101.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:libslirp-4.4.0-1.module_el8.5.0+8################################# [ 8%]
2:slirp4netns-1.1.8-1.module_el8.5.################################# [ 15%]
3:libnet-1.1.6-15.el8 ################################# [ 23%]
4:criu-3.15-3.module_el8.5.0+890+6b################################# [ 31%]
5:runc-1.0.2-1.module_el8.5.0+911+f################################# [ 38%]
6:fuse3-libs-3.2.1-12.el8 ################################# [ 46%]
7:fuse3-3.2.1-12.el8 ################################# [ 54%]
8:fuse-overlayfs-1.7.1-1.module_el8################################# [ 62%]
9:containers-common-2:1-2.module_el################################# [ 69%]
10:containernetworking-plugins-1.0.0################################# [ 77%]
11:conmon-2:2.0.29-1.module_el8.5.0+################################# [ 85%]
12:podman-catatonit-3.3.1-9.module_e################################# [ 92%]
13:podman-3.3.1-9.module_el8.5.0+988################################# [100%]
[root@node13 podmanpackage]# podman -v
podman version 3.3.1
[root@node13 ~]# cd /opt/podmanpackage/
[root@node13 podmanpackage]# ll
total 36536
-rw-r--r--. 1 root root 53667 Nov 14 08:47 conmon-2.0.29-1.module_el8.5.0+890+6b136101.x86_64.rpm
-rw-r--r--. 1 root root 20038039 Nov 14 08:50 containernetworking-plugins-1.0.0-1.module_el8.5.0+890+6b136101.x86_64.rpm
-rw-r--r--. 1 root root 80919 Nov 14 08:47 containers-common-1-2.module_el8.5.0+890+6b136101.noarch.rpm
-rw-r--r--. 1 root root 530199 Nov 14 08:47 criu-3.15-3.module_el8.5.0+890+6b136101.x86_64.rpm
-rw-r--r--. 1 root root 51396 Nov 14 08:47 fuse3-3.2.1-12.el8.x86_64.rpm
-rw-r--r--. 1 root root 96540 Nov 14 08:47 fuse3-libs-3.2.1-12.el8.x86_64.rpm
-rw-r--r--. 1 root root 74287 Nov 14 08:47 fuse-overlayfs-1.7.1-1.module_el8.5.0+890+6b136101.x86_64.rpm
-rw-r--r--. 1 root root 68632 Nov 14 08:47 libnet-1.1.6-15.el8.x86_64.rpm
-rw-r--r--. 1 root root 71995 Nov 14 08:47 libslirp-4.4.0-1.module_el8.5.0+890+6b136101.x86_64.rpm
-rw-r--r--. 1 root root 12692155 Nov 14 08:49 podman-3.3.1-9.module_el8.5.0+988+b1f0b741.x86_64.rpm
-rw-r--r--. 1 root root 348543 Nov 14 08:47 podman-catatonit-3.3.1-9.module_el8.5.0+988+b1f0b741.x86_64.rpm
-rw-r--r--. 1 root root 3227247 Nov 14 08:48 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64.rpm
-rw-r--r--. 1 root root 52427 Nov 14 08:48 slirp4netns-1.1.8-1.module_el8.5.0+890+6b136101.x86_64.rpm
[root@node13 opt]# tar -czf podman_3.3.1_x86_64.rpmpackage.tgz podmanpackage
[root@node13 opt]# sz podman_3.3.1_x86_64.rpmpackage.tgz