张小明 2026/1/1 5:13:25
网站设计行业吃香么,wordpress jetpack 3.7.2,免费站群系统,上海微信网站制作哪家专业各系统的包管理工具介绍
现阶段多种操作系统、多种不同版本#xff0c;相继有好几个包管理工具#xff0c;就RHEL/Centos就有rpm、yum、dnf三种#xff0c;Ubuntu有dpdk、apt、apt-get等#xff0c;还有一些跨发行版本#xff0c;以及通用软件管理方式pip、pip3#xff…各系统的包管理工具介绍现阶段多种操作系统、多种不同版本相继有好几个包管理工具就RHEL/Centos就有rpm、yum、dnf三种Ubuntu有dpdk、apt、apt-get等还有一些跨发行版本以及通用软件管理方式pip、pip3除了这些常见的操作系统国产操作系统又用到了哪些包管理工具呢。openouler系统是基于RHEL/CentOS生态构建从openEuler20.03LTS开始版本开始默认使用dnf工具取代老版本的yum软件管理工具。银河麒麟kylinos因版本不同所用的包管理工具也不同如果是桌面版本的操作系统大多是基于ubuntu系统开发因此延用dpdk和apt等工具如果是服务器版本的操作系统是基于CentOS/openEuler技术开发包管理工具使用yum、dnf等中标麒麟neokylin是早期版本基于CentOS/openEuler开发随着centos的停更新版本逐渐转向openouler系统开发如v7/v10版本这些都已经默认使用dnf。那这么多操作系统不同发现版使用的包管理工具也不同。但是系统都有默认的包管理工具并且都是linux操作系统通过命令查看确认使用的是rpm系还是Deb系。#查询系统版本的路径基本都差不多 ls /etc/*release #看看有哪些文件基本都显示系统版本os-release显示的更详细 cat /etc/os-release #IDkylin VERSION_IDV10 UBUNTU_CODENAME... → 是 Ubuntu 基础 → 用 apt #IDkylin VERSION_IDV10 PLATFORM_IDplatform:el8 或类似 RHEL 字样 → 是 RPM 基础 → 用 yum/dnf #或者查询默认有没有api或者rpm判断 which apt echo 使用 apt (Deb系) || echo 可能不是 Deb 系 which rpm echo 使用 rpm (RPM系) || echo 可能不是 RPM 系按照这中方式确定系统是用那中包管理工具。Ubuntu/Dabian Deb系sudo apt update sudo apt install nginx sudo dpkg -i package.deb #不推荐不自动解决依赖。RHEL/CentOS RPM系# CentOS 7 sudo yum install httpd # CentOS 8/Rocky Linux sudo dnf install httpd # 直接安装 RPM不推荐除非你知道依赖已满足 sudo rpm -ivh package.rpm国产信创系统就看是基于哪种操作系统研发的一般常规也就分deb系和rpm系。python pip除了上述操作系统默认的包管理工具以外还有各种通用的软件管理工具也可以在linux系统中使用。这里介绍python脚本语言常用的模块安装工具pip/pip3新版的ansible服务也可以通过pip3安装。包管理工具的基本使用RHEL/CentOS RPM系常用yum和dnfyum和dnf的使用基本一致常用的yum方式和dnf没区别。dnf可从epel源中安装。rpm工具无法解析依赖不常用。dnf安装依赖包比yum解析依赖更快、更精准支持多版本和模块化管理。全局配置文件/etc/yum.conf在dnf中仍然适用.repo文件无需修改。dnf默认是/etc/dnf/dnf.conf。Deb系Linux发行版Deb系Linux发行版如Debian、Ubuntu、Linux Mint、Kylin桌面版 等中软件包以.deb 格式分发主要使用两类包管理工具dbk和apt-get dbkg不解决依赖关系apt是apt-get的简化版本能够解析.deb包的依赖关系并完成安装。全局配置文件/etc/apt/apt.conf一般没有这个文件常规配置是在/etc/apt.conf.d/目录下。通过apt-config dump可查看当前配置参数。软件源列表配置文件/etc/apt/sources.list扩展源列表文件/etc/apt/sources.list.d/配置国内软件源配置yum软件源目前国产化替代的浪潮中建议国内软件源加速器使用华为华为在推进国产化替代中有着无可替代的作用和决心是完全可以信赖的公司。当前目前支持最好的还是阿里云后续配置推荐阿里云软件源。仓库文件目录: /etc/yum.repo.d/mkdir -p /etc/yum.repos.d.bak mv /etc/yum.repos.d/*.repo /etc/yum.repos.d.bak/ #华为云软件源 https://mirrors.huaweicloud.com/home #阿里云软件源 https://developer.aliyun.com/mirror #centos7 wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo yum clean all yum makecache #centos8 wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo yum clean all yum makecache也可以自动切换当前默认的配置为国内软件源codename$(lsb_release -cs) sudo sed -i s|http://[a-z0-9\.]*\.archive\.ubuntu\.com|https://mirrors.aliyun.com|g /etc/apt/sources.list sudo apt update清理并重新加载缓存dnf clean all #或者yum clean all dnf makecache #或者yum makecache验证yum repolist dnf repolist配置apt软件源仓库文件目录/etc/apt/sources.list配置国内apt软件源用阿里云。#先备份 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #编辑/etc/sources.list sudo tee /etc/apt/sources.list EOF deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse EOF #更新软件源 sudo apt update #验证测试 apt policy其他操作系统对应软件源可从阿里云官网查看ubuntu国内软件源列表ubuntu每年都跟新一个稳定版不同版本的软件源路径如下Ubuntu 18.04版本deb https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse # deb https://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverseUbuntu 20.04版本deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse # deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverseUbuntu 22.04版本deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse # deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse最新系统Ubuntu 2404deb https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse # deb https://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse往期推荐来自于个人公众号发布路途-在路上博客部署局域网内部yum服务器局域网内部配置ubuntu apt本地软件源
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站seo排名优化个人可以注册商标吗
在数字时代,屏幕截图已成为我们记录信息、分享内容的重要方式。然而,当你试图对某些应用进行截图时,却常常看到"无法截屏"的提示,这种限制让无数用户感到困扰。今天,我们将深入解析一款能够解决这一问题的开…
在线教育网站开发实例top网站怎么做
5G与F5G时代:挑战、机遇与未来展望 1. 5G与F5G发展的关键要素 在全球通信领域,统一标准和行业协作对于实现5G和F5G的宏伟愿景至关重要。就像全球移动网络行业一样,全球固定网络行业要实现F5G的承诺,统一标准和行业协作必不可少。同时,在5G时代,移动网络社区和固定网络社…
做淘宝联盟网站要多少钱大连网页设计哪家公司好
非程序员的版本控制:Git与GitLab实战指南 1. 版本控制概述 版本控制是一种跟踪电子文件变化并记录不同版本的过程。为了更好地理解版本控制及其作用,我们可以通过一个实际的写作协作场景来进行说明。假设有一个人独自撰写一本关于一个月学会Linux的书,但在编辑Frances和技…
网站 优化 教程263企业邮箱免费登录入口
Oracle VM VirtualBox:安装、配置与管理全攻略 1. 引言 Oracle VM VirtualBox 是一款由甲骨文公司推出的 x86 计算机虚拟机管理程序,它是一款跨平台的虚拟化软件,支持在 Windows、Mac OS X、Linux 和 Oracle Solaris 等操作系统上同时运行多个操作系统。许多 IT 专业人士利…
免费做自己的网站一个网络空间如何做两个网站
第一章:检索重排序的 Dify 结果过滤在构建基于大语言模型的应用时,检索增强生成(RAG)系统常面临检索结果相关性不足的问题。Dify 作为低代码 AI 应用开发平台,提供了灵活的结果过滤与重排序机制,可有效提升…