102.5 Use RPM and YUM package management

Beschreibung

102.5 Use RPM and YUM package management
Rolando Martinez
Mindmap von Rolando Martinez, aktualisiert more than 1 year ago
Rolando Martinez
Erstellt von Rolando Martinez vor mehr als 3 Jahre
10
0

Zusammenfassung der Ressource

102.5 Use RPM and YUM package management
  1. rpm, yum, dnf and zypper
    1. install, manage and remove software on a Linux system.
      1. rpm:redhat,fedora,centos
        1. DNF:Fedora
          1. zypper:Suse
            1. yum:Rhel, Centos
            2. rpm The RPM Package Manager
              1. rpm -i PACKAGENAME.rpm
                1. Installing,
                2. rpm -U PACKAGENAME.rpm
                  1. upgrade
                    1. If there is a previous version
                      1. If there is no previous version of PACKAGENAME installed, then a fresh copy will be installed.
                    2. rpm -F PACKAGENAME.rpm
                      1. only upgrade an installed package
                    3. rpm -ivh PACKAGENAME.rpm
                      1. install, verbose, #
                      2. rpm -e PACKAGENAME.rpm
                        1. to remove a installed Package
                        2. rpm -e unzip error: Failed dependencies:
                          1. /usr/bin/unzip is needed by (installed) file-roller-3.28.1-2.el7.x86_64
                        3. Dealing with Dependencies
                          1. rpm will list what is missing. However it cannot solve dependencies by itself.
                            1. # rpm -i gimp-2.8.22-1.el7.x86_64.rpm error: Failed dependencies:
                            2. Listing Installed Packages
                              1. rpm -qa
                                1. To get a list of all installed packages on your system
                                  1. query all
                                2. Getting Package Information
                                  1. # rpm -qi unzip
                                    1. To get information about an installed package, such as its version number, architecture, install date, packager, summary
                                      1. query info
                                      2. rpm -ql info
                                        1. To get a list of what files are inside an installed package
                                          1. query list
                                          2. If you wish to get information or a file listing from a package that has not been installed yet
                                            1. rpm -qip atom.x86_64.rpm
                                              1. Version, number, install date,
                                              2. rpm -qlp atom.x86_64.rpm
                                                1. List of archives
                                            2. Finding Out Which Package Owns a Specific File
                                              1. rpm -qf /usr/bin/unzip unzip-6.0-19.el7.x86_64
                                                1. query file
                                              2. YellowDog Updater Modified (YUM)
                                                1. yum can be used to install a single package, or to upgrade a whole system at once.
                                                  1. Searching for Packages
                                                    1. yum search 7zip
                                                    2. Installing, Upgrading and Removing Packages
                                                      1. yum install p7zip
                                                        1. install
                                                        2. yum update wget
                                                          1. upgrade install package
                                                          2. yum remove package
                                                            1. Delete Package
                                                          3. Finding Which Package Provides a Specific File
                                                            1. yum whatprovides libgimpui-2.0.so.0
                                                              1. The answer is gimp-libs-2.8.22-1.el7.i686. You can then install the package with the command yum install gimp-libs.
                                                            2. if you wish to know where the file /etc/hosts came from, you can use:
                                                              1. # yum whatprovides /etc/hosts
                                                                1. The answer is setup-2.8.71-10.el7.noarch.
                                                              2. Getting Information About a Package
                                                                1. yum info firefox
                                                              3. Managing Software Repositories
                                                                1. For yum the “repos” are listed in the directory /etc/yum.repos.d/
                                                                  1. CentOS-Base.repo.
                                                                  2. Additional, extra repositories can be added by the user by adding a .repo file in the directory mentioned above, or at the end of /etc/yum.conf.
                                                                    1. However, the recommended way to add or manage repositories is with the yum-config-manager tool.
                                                                    2. However, the recommended way to add or manage repositories is with the yum-config-manager tool.
                                                                      1. yum-config-manager --add-repo https://rpms.remirepo.net/enterprise/remi.repo
                                                                      2. To get a list of all available repositories
                                                                        1. yum repolist all
                                                                          1. repo id repo name status updates/7/x86_64 CentOS-7 - Updates enabled: 2,500 updates-source/7 CentOS-7 - Updates Sources disabled
                                                                          2. To enable or disable a repository, use the yum-config-manager utility, followed by the repository id.
                                                                            1. the repository id is shown on the first column (repo id) of each line. Use only the part before the first /
                                                                              1. yum-config-manager --disable updates
                                                                                1. yum-config-manager --enable updates
                                                                          3. Yum stores downloaded packages and associated metadata in a cache directory
                                                                            1. /var/cache/yum)
                                                                              1. To clean the cache and reclaim disk space you can use the yum clean command,
                                                                                1. yum clean packages
                                                                                  1. yum clean metadata
                                                                              2. Zypper
                                                                                1. used for suse y opensuse
                                                                                  1. # zypper refresh
                                                                                    1. refresh metadata
                                                                                    2. zypper se[arch] gnumeric
                                                                                      1. search
                                                                                        1. zypper se -i
                                                                                          1. # zypper se -i firefox
                                                                                        2. # zypper in[stall] unrar
                                                                                          1. zypper in /home/john/newpackage.rpm
                                                                                            1. install
                                                                                          2. zypper update
                                                                                            1. actualizar pquete
                                                                                              1. zypper list-updates
                                                                                                1. only list the available updates
                                                                                              2. zypper rm unrar
                                                                                                1. remove package
                                                                                                2. zypper se --provides /usr/lib64/libgimpmodule-2.0.so.0
                                                                                                  1. find Package
                                                                                                  2. zypper info gimp
                                                                                                    1. info Package
                                                                                                    2. zypper repos
                                                                                                      1. list all repository
                                                                                                        1. # zypper modifyrepo -d repo-non-oss
                                                                                                          1. disablesd repo-non-oss
                                                                                                          2. zypper modifyrepo -e repo-non-oss
                                                                                                            1. enabled repo-non-oss
                                                                                                            2. zypper modifyrepo -F repo-non-oss
                                                                                                              1. zypper modifyrepo -f repo-non-oss
                                                                                                                1. refresh
                                                                                                              2. zypper addrepo http://packman.inode.at/suse/openSUSE_Leap_15.1/ packman
                                                                                                                1. zypper removerepo packman
                                                                                                                  1. add o remove repository
                                                                                                            3. DNF
                                                                                                              1. is the package management tool used on Fedora
                                                                                                                1. dnf search package
                                                                                                                  1. dnf install package
                                                                                                                    1. dnf info packagename
                                                                                                                      1. dnf remove packagename
                                                                                                                        1. dnf upgrade packaname
                                                                                                                          1. dnf provides filename
                                                                                                                            1. dnf list --installed
                                                                                                                              1. dnf repoquery -l PACKAGENAME
                                                                                                                                1. dnf repolist
                                                                                                                                  1. dnf config-manager --add_repo URL
                                                                                                                                    1. dnf config-manager --set-enabled REPO_ID.
                                                                                                                                      1. dnf config-manager --set-disabled REPO_ID
                                                                                                                                    2. Preguntas Y Repuestas
                                                                                                                                      1. 1.- Using rpm on a Red Hat Enterprise Linux system, how would you install the package file-roller-3.28.1-2.el7.x86_64.rpm showing a progress bar during the installation?
                                                                                                                                        1. rpm -ih file-roller-3.28.1-2.el7.x86_64.rpm
                                                                                                                                        2. 2.- Using rpm, find out which package contains the file /etc/redhat-release
                                                                                                                                          1. rpm -qf /etc/redhat-release
                                                                                                                                          2. 3.- How would you use yum to check for updates for all packages in the system?
                                                                                                                                            1. yum check-update
                                                                                                                                            2. 4.- Using zypper, how would you disable a repository called repo-extras?
                                                                                                                                              1. zipper modifyrepo -d repo-extras
                                                                                                                                              2. 5.- If you have a .repo file describing a new repository, where this file should be put so that it is recognized by DNF?
                                                                                                                                                1. .repo files for DNF should be put on the same place used by YUM, inside /etc/yum.repos.d/
                                                                                                                                                2. Preguntas y Respuestas exploratorias
                                                                                                                                                  1. 6.- How would you use zypper to find out which package owns the file /usr/sbin/swapon?
                                                                                                                                                    1. zipper se --provides /usr/sbin/swapon
                                                                                                                                                    2. 7.-How can you get a list of all installed packages in the system using dnf?
                                                                                                                                                      1. dnf list --installed
                                                                                                                                                      2. 8.- Using dnf, what is the command to add a repository located at URL
                                                                                                                                                        1. dnf config-manager --add_repo URL
                                                                                                                                                        2. 9.- How can you use zypper to check if the package unzip is installed?
                                                                                                                                                          1. zypper se -i unzip
                                                                                                                                                          2. 10.- Using yum, find out which package provides the file /bin/wget
                                                                                                                                                            1. yum whatprovides /bin/wget
                                                                                                                                                        Zusammenfassung anzeigen Zusammenfassung ausblenden

                                                                                                                                                        ähnlicher Inhalt

                                                                                                                                                        Öff. Recht - Grundrechte Streite
                                                                                                                                                        myJurazone
                                                                                                                                                        Untersuchung von ganzrationalen Funktionen
                                                                                                                                                        Anna Lena
                                                                                                                                                        Ecologie politique - Vocabulaire
                                                                                                                                                        Gaelle Bourgeois
                                                                                                                                                        Lernplan Analysis
                                                                                                                                                        Hanna Marie Hock
                                                                                                                                                        1_Blut und Blutkreislauf
                                                                                                                                                        Ulrike Renauer
                                                                                                                                                        Marketing-Mix
                                                                                                                                                        Marion Engel
                                                                                                                                                        Vetie - Tierzucht & Genetik - S I
                                                                                                                                                        Fioras Hu
                                                                                                                                                        Vetie: Virologie 2017
                                                                                                                                                        Johanna Tr
                                                                                                                                                        Innere Rind Vetie
                                                                                                                                                        Anne Käfer
                                                                                                                                                        Vetie Fleisch 2021
                                                                                                                                                        Mascha K.