測試環境 CentOS7

套件管理從最早的 Red Hat Package Manager (#rpm) , 到現在常用的 Yellowdog Updater, Modified (#yum) 現在 Fedora 22 改成 DNF : Dandified Yum (#dnf) 為預設的套件管理工具.

wiki:

DNF is intended to address include poor performance, high memory usage, and the slowness of its iterative dependency resolution. DNF uses libsolv, an external dependency resolver.

因為遇到一個套件一定要用 dnf 來安裝,所以試著在 CentOS7 下來使用 dnf ,YUM 預設並沒有 dnf ,所以我們需要手動新增 dnf 的 Repo 檔 (epel-release) ,或是手動編寫 /etc/yum.repos.d/epel.repo .

[root@localhost ~]# yum install epel-release

Loaded plugins: fastestmirror

base | 3.6 kB 00:00

extras | 3.4 kB 00:00

nginx | 2.9 kB 00:00

updates | 3.4 kB 00:00

Loading mirror speeds from cached hostfile

* base: centos.cs.nctu.edu.tw

* extras: centos.cs.nctu.edu.tw

* updates: centos.cs.nctu.edu.tw

Resolving Dependencies

--> Running transaction check

---> Package epel-release.noarch 0:7-6 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

================================================================================

Package Arch Version Repository Size

================================================================================

Installing:

epel-release noarch 7-6 extras 14 k

Transaction Summary

================================================================================

Install 1 Package

Total download size: 14 k

Installed size: 24 k

Is this ok [y/d/N]: y

Downloading packages:

epel-release-7-6.noarch.rpm | 14 kB 00:06

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Installing : epel-release-7-6.noarch 1/1

Verifying : epel-release-7-6.noarch 1/1

Installed:

epel-release.noarch 0:7-6

Complete!

[root@localhost ~]# cat /etc/yum.repos.d/epel.repo

[epel]

name=Extra Packages for Enterprise Linux 7 - $basearch

#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch

failovermethod=priority

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]

name=Extra Packages for Enterprise Linux 7 - $basearch - Debug

#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch

failovermethod=priority

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

gpgcheck=1

[epel-source]

name=Extra Packages for Enterprise Linux 7 - $basearch - Source

#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch

failovermethod=priority

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

gpgcheck=1

現在就可以直接透過 yum 安裝 dnf

[root@localhost ~]# yum install dnf

好像因為一些安全性問題 DNF 不再提供,需要自行下載,須自行確認最新版本.

[root@localhost ~]$ wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/dnf-0.6.4-2.sdl7.noarch.rpm

[root@localhost ~]$ wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/dnf-conf-0.6.4-2.sdl7.noarch.rpm

[root@localhost ~]$ wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/python-dnf-0.6.4-2.sdl7.noarch.rpm

[root@localhost ~]$ yum install dnf-0.6.4-2.sdl7.noarch.rpm dnf-conf-0.6.4-2.sdl7.noarch.rpm python-dnf-0.6.4-2.sdl7.noarch.rpm

使用可以直接參考 dnf 的說明.

[root@localhost ~]# dnf

You need to give some command

usage: dnf [options] COMMAND

List of Main Commands

autoremove

check-update Check for available package upgrades

clean Remove cached data

distro-sync Synchronize installed packages to the latest available versions

downgrade downgrade a package

group Display, or use, the groups information

help Display a helpful usage message

history Display, or use, the transaction history

info Display details about a package or group of packages

install Install a package or packages on your system

list List a package or groups of packages

makecache Generate the metadata cache

provides Find what package provides the given value

reinstall reinstall a package

remove Remove a package or packages from your system

repolist Display the configured software repositories

repository-packages Run commands on top of all packages in given repository

search Search package details for the given string

updateinfo Display advisories about packages

upgrade Upgrade a package or packages on your system

upgrade-to Upgrade a package on your system to the specified version

遇過的問題

CentOS7 ARM 系統透過 yum 找不到 epel-release,只能透過 wget 再手動 rpm.

[root@localhost ~]# yum install epel-release

...No package epel-release available

Error: Nothing to do

[root@localhost ~]# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

[root@localhost ~]# rpm -Uvh epel-release-latest-7*.rpm

安裝完 dnf 初次會遇到類似下方的錯誤訊息,需要移除 epel-release 並執行 dnf repolist

[root@localhost ~]# dnf repolist

Extra Packages for Enterprise Linux 7 - x86_64 616 kB/s | 12 MB 00:19

Failed to open: /var/cache/dnf/x86_64/7/x86_64/7/epel/repodata/a2cc7cbec8f5f02226dc6590b7a6ed439ae7324e9fa52b70e303470895d08066-updateinfo.xml.bz2.

[root@localhost ~]# yum remove epel-release

Loaded plugins: fastestmirror

Resolving Dependencies

--> Running transaction check

---> Package epel-release.noarch 0:7-6 will be erased

--> Finished Dependency Resolution

Dependencies Resolved

================================================================================

Package Arch Version Repository Size

================================================================================

Removing:

epel-release noarch 7-6 @extras 24 k

Transaction Summary

================================================================================

Remove 1 Package

Installed size: 24 k

Is this ok [y/N]: y

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Erasing : epel-release-7-6.noarch 1/1

Verifying : epel-release-7-6.noarch 1/1

Removed:

epel-release.noarch 0:7-6

Complete!

[root@localhost ~]# dnf repolist

CentOS-7 - Base 893 kB/s | 8.8 MB 00:10

CentOS-7 - Updates 1.4 MB/s | 12 MB 00:08

CentOS-7 - Extras 750 kB/s | 569 kB 00:00

Using metadata from Wed Nov 23 20:41:50 2016

repo id repo name status

base CentOS-7 - Base 9,007

extras CentOS-7 - Extras 393

nginx nginx repo 41

updates CentOS-7 - Updates 2,560

沒有解決問題,試試搜尋本站其他內容

dnf服务端linux,Linux 套件管理 – dnf (Dandified Yum)相关推荐

  1. python3 ftp服务器_python3实现ftp服务功能(服务端 For Linux)

    本文实例为大家分享了python3实现ftp服务功能的具体代码,供大家参考,具体内容如下 功能介绍: 可执行的命令: ls pwd cd put rm get mkdir 1.用户加密认证 2.允许多 ...

  2. linux samba 服务端口号,Linux系统学习 二十、SAMBA服务—介绍、安装、端口

    1.简介 网络数据文件共享服务器 可以和Windows中的网上邻居通用 数据共享的方法: Windows中最常用的是"网上邻居".网上邻居使用的文件系统是CIFS(通用互联网文件系 ...

  3. dnf服务端linux架设,OpenMandriva Lx 4.0 Alpha 1 发布,dnf为软件包管理器

    Cristina Sgubbi宣布推出即将推出的OpenMandriva Lx 4.0的第一个开发版本.新版本带来了包管理器的变化(转换到RPM 4和dnf),现在使用Clang 7.0编译分发. 今 ...

  4. linux cxf服务端,cxf linux问题

    请各位大神原谅我在nutz上问这个问题..... Mar 28, 2016 4:56:46 PM org.apache.cxf.wsdl.service.factory.ReflectionServi ...

  5. 设置linux拨号服务端,CentOS Linux上搭建PPPoE服务器及拨号设置

    CentOS下PPPoE拨号设置 1.查看并安装拨号软件: [root@RedHat ~]# rpm -qa|grep pppoe [root@redhat ~]# yum -y install rp ...

  6. Linux服务端开发——Linux中stat函数和stat命令使用详解

    这篇文章主要介绍了Linux中stat函数和stat命令使用详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧 stat函数和s ...

  7. linux服务端 程序,linux服务端程序tunning过程简要总结

    8种机械键盘轴体对比 本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选? 步骤1:网络丢包的原因定位 ethtool -S eth0 rx_dropped代表丢包发生在linux 内核缓冲区,丢 ...

  8. 麻将服务端架设linux,湖南房卡麻将客户端/服务器端完整源码及编译教程

    客户端源码是基于cocos2d-x 3.10版本开发的.代码完整可编译.本人在WINDOWS平台下成功编译了android包并正常运行.源码里面也有服务器的源码(C++),经过再次鉴定应该是配套的,服 ...

  9. Linux软件安装管理 - CentOS (二) ---- yum在线安装

    1. 软件包管理简介 2. rpm命令管理(Redhat Package Manager) 3. yum在线安装 3.1 yum源文件 vi /etc/yum.repos.d/CentOS-Base. ...

最新文章

  1. python写http文件下载器_http分片请求-python分片下载文件
  2. 教育部最新通知,中高考又有大变化,学生欲哭无泪,家长炸锅了
  3. Newtonsoft.Json使用
  4. Java MathContext类| hashCode()方法与示例
  5. Ubuntu安装与配置(简要)
  6. 如果删除网上服务器登陆账号密码,怎么清除SVN的用户名和密码
  7. 数据探查与可视化平台 Caravel
  8. 36. Element length 属性
  9. Python del:删除对象
  10. 湖北 政府项目 软件 测试,湖北电子政务应用系统技术验收测试规范.doc
  11. 基于tensorflow的iris数据集分类示例
  12. java pdfreader 用法_使用 iText 进行 Acroform 编辑的 Pdf
  13. 数学笔记30——无穷级数和收敛判定
  14. ActiveMQ学习笔记(4)----JMS的API结构和开发步骤
  15. 转载:ESP系统——ABS、TCS、VDC及VAF功能介绍
  16. 软考中级选哪个比较合适?
  17. Dell戴尔笔记本电脑Vostro 14 5410原装出厂WIN10系统恢复原厂OEM系统
  18. STM32CubeMX学习笔记(5)——基本定时器接口使用
  19. SCRUM项目 4.0
  20. CVE-2014-0160:心脏出血(心血)漏洞

热门文章

  1. 怎样恢复Excel没保存的数据?
  2. XMind 8 Pro 3.7.8 最受欢迎思维导图
  3. Unity修改分辨率优化游戏性能
  4. ubuntu 桌面卡死 解决方法
  5. 2021-2025年中国农用拖拉机行业市场供需与战略研究报告
  6. Python爬虫——Scrapy通用爬虫
  7. CRA(Cheif ray angle)
  8. java基础学习-7
  9. aws云服务器查看系统版本,Amazon EC2是什么?Amazon EC2云服务器常见问题汇总
  10. win10自带截图(Win+Shift+S快捷键)