加入收藏 | 设为首页 | 会员中心 | 我要投稿 青岛站长网 (https://www.0532zz.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Windows > 正文

12条实用的zypper命令范例

发布时间:2018-12-18 05:40:34 所属栏目:Windows 来源:Kerneltalks
导读:zypper 是 Suse Linux 系统的包和补丁管理器,你可以根据下面的 12 条附带输出示例的实用范例来学习 zypper 命令的使用。 Suse Linux 使用 zypper 进行包管理,其是一个由 ZYpp 包管理引擎提供的包管理系统。在此篇文章中我们将分享 12 条附带输出示例的实

使用 list-patcheslp 子命令来显示你的 Suse Linux 系统需要被应用的所有可用补丁。

  1. root@kerneltalks # zypper lp
  2. Refreshing service 'SMT-http_smt-ec2_susecloud_net'.
  3. Refreshing service 'cloud_update'.
  4. Loading repository data...
  5. Reading installed packages...
  6. Repository | Name | Category | Severity | Interactive | Status | Summary
  7. ----------------------------------|------------------------------------------|-------------|-----------|-------------|--------|------------------------------------------------------------------------------------
  8. SLE-Module-Containers12-Updates | SUSE-SLE-Module-Containers-12-2018-273 | security | important | --- | needed | Version update for docker, docker-runc, containerd, golang-github-docker-libnetwork
  9. SLE-Module-Containers12-Updates | SUSE-SLE-Module-Containers-12-2018-62 | recommended | low | --- | needed | Recommended update for sle2docker
  10. SLE-Module-Public-Cloud12-Updates | SUSE-SLE-Module-Public-Cloud-12-2018-268 | recommended | low | --- | needed | Recommended update for python-ecdsa
  11. SLES12-SP3-Updates | SUSE-SLE-SERVER-12-SP3-2018-116 | security | moderate | --- | needed | Security update for rsync
  12. ---- output clipped ----
  13. SLES12-SP3-Updates | SUSE-SLE-SERVER-12-SP3-2018-89 | security | moderate | --- | needed | Security update for perl-XML-LibXML
  14. SLES12-SP3-Updates | SUSE-SLE-SERVER-12-SP3-2018-90 | recommended | low | --- | needed | Recommended update for lvm2
  15. Found 37 applicable patches:
  16. 37 patches needed (18 security patches)

使用相应的表头可以很好地组织输出。你可以轻松地找出并根据情况计划你的补丁更新。我们能看到在我们的系统中,37 个可用补丁中有 18 个是安全补丁,需要被高优先级应用!

你可以通过发出 zypper patch 命令安装所有需要的补丁。

如何使用 zypper 更新包

要使用 zypper 更新包,使用 updateup 子命令后接包名。在上述列出的更新命令中,我们知道在我们的服务器上 rsync 包更新可用。让我们现在来更新它吧!

  1. root@kerneltalks # zypper update rsync
  2. Refreshing service 'SMT-http_smt-ec2_susecloud_net'.
  3. Refreshing service 'cloud_update'.
  4. Loading repository data...
  5. Reading installed packages...
  6. Resolving package dependencies...
  7. The following package is going to be upgraded:
  8. rsync
  9. 1 package to upgrade.
  10. Overall download size: 325.2 KiB. Already cached: 0 B. After the operation, additional 64.0 B will be used.
  11. Continue? [y/n/...? shows all options] (y): y
  12. Retrieving package rsync-3.1.0-13.10.1.x86_64 (1/1), 325.2 KiB (625.5 KiB unpacked)
  13. Retrieving: rsync-3.1.0-13.10.1.x86_64.rpm .......................................................................................................................[done]
  14. Checking for file conflicts: .....................................................................................................................................[done]
  15. (1/1) Installing: rsync-3.1.0-13.10.1.x86_64 .....................................................................................................................[done]

在 Suse Linux 上使用 zypper 查找包

(编辑:青岛站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!