Instalación de dnf en CentOS 7

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp
Share on telegram
Share on email

dnf (o Dandified Yum) es el gestor de paquetes RPM que está siendo utilizado en Linux Fedora desde hace bastante tiempo y que se habla que será el sucesor de yum. Ya lo veremos.

Sin embargo, en RedHat y CentOS todavía sigue vigente yum como estándar de gestión de software pero podemos instalar dnf si lo deseamos. Se hace de la siguiente manera:

Descargamos el paquete RPM con el comando wget:

[[email protected] ~]# wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64//dnf-0.6.4-2.sdl7.noarch.rpm
–2018-04-20 07:20:46– http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64//dnf-0.6.4-2.sdl7.noarch.rpm
Resolving springdale.math.ias.edu (springdale.math.ias.edu)… 192.16.204.192
Connecting to springdale.math.ias.edu (springdale.math.ias.edu)|192.16.204.192|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 213696 (209K) [application/x-rpm]
Saving to: ‘dnf-0.6.4-2.sdl7.noarch.rpm’

100%[=============================================>] 213,696 182KB/s in 1.1s

2018-04-20 07:20:47 (182 KB/s) – ‘dnf-0.6.4-2.sdl7.noarch.rpm’ saved [213696/213696]

[[email protected] ~]# wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/dnf-conf-0.6.4-2.sdl7.noarch.rpm
–2018-04-20 07:20:59– http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/dnf-conf-0.6.4-2.sdl7.noarch.rpm
Resolving springdale.math.ias.edu (springdale.math.ias.edu)… 192.16.204.192
Connecting to springdale.math.ias.edu (springdale.math.ias.edu)|192.16.204.192|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 62404 (61K) [application/x-rpm]
Saving to: ‘dnf-conf-0.6.4-2.sdl7.noarch.rpm.1’

100%[=============================================>] 62,404 161KB/s in 0.4s

2018-04-20 07:21:00 (161 KB/s) – ‘dnf-conf-0.6.4-2.sdl7.noarch.rpm.1’ saved [62404/62404]

[[email protected] ~]# wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/python-dnf-0.6.4-2.sdl7.noarch.rpm
–2018-04-20 07:21:10– http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/python-dnf-0.6.4-2.sdl7.noarch.rpm
Resolving springdale.math.ias.edu (springdale.math.ias.edu)… 192.16.204.192
Connecting to springdale.math.ias.edu (springdale.math.ias.edu)|192.16.204.192|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 416988 (407K) [application/x-rpm]
Saving to: ‘python-dnf-0.6.4-2.sdl7.noarch.rpm.1’

100%[=============================================>] 416,988 258KB/s in 1.6s

2018-04-20 07:21:12 (258 KB/s) – ‘python-dnf-0.6.4-2.sdl7.noarch.rpm.1’ saved [416988/416988]

Instalamos DNF con el paquete RPM descargado anteriormente:

[[email protected] ~]# yum install -y 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
Loaded plugins: fastestmirror, langpacks
Examining dnf-0.6.4-2.sdl7.noarch.rpm: dnf-0.6.4-2.sdl7.noarch
Marking dnf-0.6.4-2.sdl7.noarch.rpm to be installed
Examining dnf-conf-0.6.4-2.sdl7.noarch.rpm: dnf-conf-0.6.4-2.sdl7.noarch
Marking dnf-conf-0.6.4-2.sdl7.noarch.rpm to be installed
Examining python-dnf-0.6.4-2.sdl7.noarch.rpm: python-dnf-0.6.4-2.sdl7.noarch
Marking python-dnf-0.6.4-2.sdl7.noarch.rpm to be installed
Resolving Dependencies
–> Running transaction check
—> Package dnf.noarch 0:0.6.4-2.sdl7 will be installed
—> Package dnf-conf.noarch 0:0.6.4-2.sdl7 will be installed
—> Package python-dnf.noarch 0:0.6.4-2.sdl7 will be installed
–> Processing Dependency: python-hawkey >= 0.5.3 for package: python-dnf-0.6.4-2.sdl7.noarch
Loading mirror speeds from cached hostfile
* epel: mirror.freethought-internet.co.uk
* extras: mirror.airenetworks.es
* updates: mirror.airenetworks.es
–> Processing Dependency: python-libcomps >= 0.1.6 for package: python-dnf-0.6.4-2.sdl7.noarch
–> Processing Dependency: python-librepo >= 1.7.5 for package: python-dnf-0.6.4-2.sdl7.noarch
–> Running transaction check
—> Package python-librepo.x86_64 0:1.7.16-1.el7 will be installed
–> Processing Dependency: librepo(x86-64) = 1.7.16-1.el7 for package: python-librepo-1.7.16-1.el7.x86_64
–> Processing Dependency: librepo.so.0()(64bit) for package: python-librepo-1.7.16-1.el7.x86_64
—> Package python2-hawkey.x86_64 0:0.6.3-4.el7 will be installed
–> Processing Dependency: hawkey(x86-64) = 0.6.3-4.el7 for package: python2-hawkey-0.6.3-4.el7.x86_64
–> Processing Dependency: libsolvext.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.6.3-4.el7.x86_64
–> Processing Dependency: libsolv.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.6.3-4.el7.x86_64
–> Processing Dependency: libsolvext.so.0()(64bit) for package: python2-hawkey-0.6.3-4.el7.x86_64
–> Processing Dependency: libsolv.so.0()(64bit) for package: python2-hawkey-0.6.3-4.el7.x86_64
–> Processing Dependency: libhawkey.so.2()(64bit) for package: python2-hawkey-0.6.3-4.el7.x86_64
—> Package python2-libcomps.x86_64 0:0.1.8-3.el7 will be installed
–> Processing Dependency: libcomps(x86-64) = 0.1.8-3.el7 for package: python2-libcomps-0.1.8-3.el7.x86_64
–> Processing Dependency: libcomps.so.0.1.6()(64bit) for package: python2-libcomps-0.1.8-3.el7.x86_64
–> Running transaction check
—> Package hawkey.x86_64 0:0.6.3-4.el7 will be installed
—> Package libcomps.x86_64 0:0.1.8-3.el7 will be installed
—> Package librepo.x86_64 0:1.7.16-1.el7 will be installed
—> Package libsolv.x86_64 0:0.6.26-1.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================
Package Arch Version Repository Size
=======================================================================================
Installing:
dnf noarch 0.6.4-2.sdl7 /dnf-0.6.4-2.sdl7.noarch 652 k
dnf-conf noarch 0.6.4-2.sdl7 /dnf-conf-0.6.4-2.sdl7.noarch 29 k
python-dnf noarch 0.6.4-2.sdl7 /python-dnf-0.6.4-2.sdl7.noarch 1.8 M
Installing for dependencies:
hawkey x86_64 0.6.3-4.el7 base 89 k
libcomps x86_64 0.1.8-3.el7 epel 74 k
librepo x86_64 1.7.16-1.el7 base 77 k
libsolv x86_64 0.6.26-1.el7 base 323 k
python-librepo x86_64 1.7.16-1.el7 base 49 k
python2-hawkey x86_64 0.6.3-4.el7 base 73 k
python2-libcomps x86_64 0.1.8-3.el7 epel 46 k

Transaction Summary
=======================================================================================
Install 3 Packages (+7 Dependent packages)

Total size: 3.2 M
Total download size: 730 k
Installed size: 4.1 M
Downloading packages:
(1/7): libcomps-0.1.8-3.el7.x86_64.rpm | 74 kB 00:00:00
(2/7): librepo-1.7.16-1.el7.x86_64.rpm | 77 kB 00:00:00
(3/7): hawkey-0.6.3-4.el7.x86_64.rpm | 89 kB 00:00:00
(4/7): libsolv-0.6.26-1.el7.x86_64.rpm | 323 kB 00:00:00
(5/7): python2-libcomps-0.1.8-3.el7.x86_64.rpm | 46 kB 00:00:00
(6/7): python2-hawkey-0.6.3-4.el7.x86_64.rpm | 73 kB 00:00:00
(7/7): python-librepo-1.7.16-1.el7.x86_64.rpm | 49 kB 00:00:00
—————————————————————————————
Total 671 kB/s | 730 kB 00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libsolv-0.6.26-1.el7.x86_64 1/10
Installing : hawkey-0.6.3-4.el7.x86_64 2/10
Installing : python2-hawkey-0.6.3-4.el7.x86_64 3/10
Installing : libcomps-0.1.8-3.el7.x86_64 4/10
Installing : python2-libcomps-0.1.8-3.el7.x86_64 5/10
Installing : dnf-conf-0.6.4-2.sdl7.noarch 6/10
Installing : librepo-1.7.16-1.el7.x86_64 7/10
Installing : python-librepo-1.7.16-1.el7.x86_64 8/10
Installing : python-dnf-0.6.4-2.sdl7.noarch 9/10
Installing : dnf-0.6.4-2.sdl7.noarch 10/10
Verifying : libsolv-0.6.26-1.el7.x86_64 1/10
Verifying : python2-libcomps-0.1.8-3.el7.x86_64 2/10
Verifying : librepo-1.7.16-1.el7.x86_64 3/10
Verifying : dnf-conf-0.6.4-2.sdl7.noarch 4/10
Verifying : python-dnf-0.6.4-2.sdl7.noarch 5/10
Verifying : libcomps-0.1.8-3.el7.x86_64 6/10
Verifying : python2-hawkey-0.6.3-4.el7.x86_64 7/10
Verifying : python-librepo-1.7.16-1.el7.x86_64 8/10
Verifying : hawkey-0.6.3-4.el7.x86_64 9/10
Verifying : dnf-0.6.4-2.sdl7.noarch 10/10

Installed:
dnf.noarch 0:0.6.4-2.sdl7 dnf-conf.noarch 0:0.6.4-2.sdl7
python-dnf.noarch 0:0.6.4-2.sdl7

Dependency Installed:
hawkey.x86_64 0:0.6.3-4.el7 libcomps.x86_64 0:0.1.8-3.el7
librepo.x86_64 0:1.7.16-1.el7 libsolv.x86_64 0:0.6.26-1.el7
python-librepo.x86_64 0:1.7.16-1.el7 python2-hawkey.x86_64 0:0.6.3-4.el7
python2-libcomps.x86_64 0:0.1.8-3.el7

Complete!

Una vez finalizada la instalación, ya tenemos disponible el comando dnf para su uso:

[[email protected] ~]# dnf help
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
[[email protected] ~]#

A lo mejor quieres probar de instalar un Linux en un servidor nuevo utilizando, únicamente, DNF. Podría ser una buena práctica de uso y familiarización del comando.

¿Te ha gustado? ¡Compártelo!

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp
Share on telegram
Share on email

SUSCRÍBETE A PUERTO53

Recibe un email periódico con los artículos más interesantes de Puerto53.com

Antes de suscribirte lee los términos y condiciones. Gracias.

Contenido Relacionado

Artículos Recientes

Deja un comentario

About Author