Ubuntu 22.04系统中安装podman流程步骤
我的测试服务器版本是:
Ubuntu 20.04.5 LTS (GNU/Linux 5.4.0-100-generic x86_64)
默认ip已配好网络正常、防火墙已关、ssh已配好远程正常
直接进入步骤:
Kubic项目为 Ubuntu 20.04 提供了软件包,我们可以通过如下方式在我们及其上进行安装:
[email protected]:~# . /etc/os-release
[email protected]:~# echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.listdeb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /
[email protected]:~# curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key" | sudo apt-key add -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1093 100 1093 0 0 1111 0 --:--:-- --:--:-- --:--:-- 1110
OK
更新一下系统
[email protected]:~# apt-get update
Hit:1 https://mirrors.aliyun.com/docker-ce/linux/ubuntu focal InRelease
Get:2 https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04 InRelease [1,642 B]
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:4 https://downloadcontent2.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04 Packages [12.6 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Fetched 350 kB in 5s (66.7 kB/s)
Reading package lists... Done
[email protected]:~# apt-get -y upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
libfwupdplugin1 libxmlb1
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
安装podman
[email protected]:~# apt-get -y install podman
Reading package lists... Done
Building dependency tree
Reading state information... Done
...
安装成功
[email protected]:~# podman version
Version: 3.4.2
API Version: 3.4.2
Go Version: go1.15.2
Built: Thu Jan 1 00:00:00 1970
OS/Arch: linux/amd64
设置podman开机启动
systemctl enable podman
查看运行状态
systemctl status podman
启动podman
systemctl start podman
安装中出现的提示如下图:
意思是配置文件/etc/ssh/sshd_config的新版本(/tmp/filewo1WSR)可用,但当前安装的版本已被本地修改。
你想对修改的配置文件sshd_config做什么?
安装软件包维护者的版本
保留当前安装的本地版本
显示各版本之间的差异
显示各版本之间的并列差异
显示各版本之间的三向差异
显示可用版本之间的三向差异
在可用版本之间进行三向合并
在可用的版本之间进行3次合并
启动一个新的shell来检查这个情况
因为我修改过了,并且正常使用,所以直接选第一条。
2.安装中出现的一下错误,提示找不到包
E: Unable to locate package podman
需要使用Kubic项目为 Ubuntu 20.04 提供了软件包方式安装
相关文章