6. Software Installation

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Before you install an RPM package, you want to verify the authenticity of the package and check the digital signature to ensure that it has not been altered. Which rpm option should you use?

--checksig The rpm --checksig command checks the authenticity of the package. The --checksig option checks the package's digital signing key against the package to ensure that it has not been altered.

Which dpkg option completely removes a package and its configuration files? -r --configure -R -P

-P The dpkg command installs Debian packages on Debian distributions. The dpkg -P command completely uninstalls the package, including the configuration files.

Which of the following dpkg options will install a package recursively? --configure -r -P -R

-R The dpkg command installs Debian packages on Debian distributions. The dpkg -R command installs the package recursively.

What is the full path and filename for the DNF configuration file?

/etc/dnf/dnf.conf DNF uses /etc/dnf/dnf.conf as the configuration file. The configuration file contains default settings options.

What is the full path and file name for the YUM configuration file?

/etc/yum.conf YUM uses /etc/yum.conf as the configuration file. The configuration file contains: URLs of RPM repositories. Directories where it saves downloaded packages. Locations of logs.

When managing DNF, what is the full path to the directory where should you place .repo files?

/etc/yum.repos.d/ DNF uses /etc/yum.repos.d/ to keep a .repo file for each internet repository. An internet repository contains packages for Linux systems. To change where Linux looks for new or updated packages, you can add .repo files to the /etc/yum.repos.d/ directory.

When managing YUM, what is the full path to the directory where you should place .repo files?

/etc/yum.repos.d/ YUM uses /etc/yum.repos.d/ to keep a .repo file for each internet repository. An internet repository contains packages for Linux systems. To change where Linux looks for new or updated packages, you can add .repo files to the /etc/yum.repos.d/ directory.

Package manager

A collection of software tools that automates the process of downloading, installing, upgrading, configuring, and removing computer applications in Linux.

Package dependency

A dependency that occurs when one software package requires another package to be installed to work properly.

Shared library

A library of routines that can be used by other applications.

Local repository

A local storage location that contains software packages for a Linux distribution.

Dynamic Library

A shared library that is not directly integrated into the code of a software application.

Static Library

A shared library usually installed with an application , that is integrated into the code of a software application.

Debian packages

A software package format that is different than the RPM format.

yumdownloader

A utility that downloads an RPM package from a software repository.

Idd

A utility that shows the shared libraries required by an application.

Which of the following actions does the dpkg -l (lowercase L) command perform? The installed files for a package are shown. Information about packages that are not installed is listed. A package is installed. All packages with names that match a specified pattern are displayed.

All packages with names that match a specified pattern are displayed. The dpkg command installs Debian packages on Debian distributions. The dpkg -l (lowercase L) command displays all packages with names that match a specified pattern.

Software repository

An online location that stores software packages for a Linux distribution.

6.4 Shared Libraries

As you study this section, answer the following questions: What is the purpose of a shared library? What is the difference between a dynamic shared library and a static shared library? What does it mean if a library file name contains .so? Which command would you use to identify library dependencies? What are the management complications for shared libraries? Which file contains a cached list of dynamic shared libraries? What are the methods for configuring additional dynamic libraries on a Linux system? In this section, you will learn to: Identify a daemon's required shared libraries. Recognize a broken library link. Key terms for this section include the following:

6.1 Red Hat Package Manager (RPM)

As you study this section, answer the following questions: What is the role of a package manager? How does the RPM naming convention help you to quickly select a package with a specific version? How would you check a package's authenticity? What sources are available for obtaining packages? What utility will extract files from an RPM package without installing the package? How would you verify that a package has been installed? In this section, you will learn to: Use rpm to test dependencies before installing a package. Install a package using the rpm -ihv options to install and view the progress of the installation. Uninstall a package using rpm. Determine whether a package has been installed. Key terms for this section include the following:

6.2 Online Package Installation

As you study this section, answer the following questions: What is the role of a package manager? What sources are available for obtaining packages? Which utility will extract files from an RPM package without installing the package? How would you verify that a package has been installed? What is the main configuration file for the YUM package? In this section, you will learn to: Use DNF to install an RPM package. Use DNF to remove an RPM package. Key terms for this section include the following:

6.3 Debian Package Manager (dpkg)

As you study this section, answer the following questions: When would you use Debian packages instead of RPM packages? How can you tell a Debian package from an RPM package? Which dpkg option prevents a package from being installed if a newer version of the package already exists on the computer? Which command would you use to display all of the package's dependencies? Which command for Debian is similar to the YUM tool for RPM packages? In this section, you will learn to: Install and uninstall a new package using the dpkg command. Use the apt-cache command to view information about installed packages. Download and install a package using the apt-get command. Key terms for this section include the following:

6.1.8 Practice Questions

CIST 2431

6.2.7 Practice Questions

CIST 2431

6.3.5 Practice Questions

CIST 2431

rpm2cpio

Converts RPM packages into a cpio archive. This is useful for extracting files from an RPM package without installing and searching for the specific files. ex. rpm2cpio logrotate-1.0-1.i386.rpm > logrotate.cpio converts the files from the logrotate package into a cpio archive.

createrepo

Creates a repository list of RPM packages stored locally or on a network. Be aware of the following options: -g specifies an xml file for the repository. -x excludes specific file globs. ex. createrepo -g packagefile.xml creates a list of packages using the .xml file.

6.3.4 Debian Package Management Facts

Debian packages are preconfigured installation packages similar to RPM packages. This lesson covers the following topics: Debian package functions Common commands

Debian Package Functions

Debian packages: Are used with some Linux distributions, including Ubuntu, Knoppix, and Linspire. Use naming conventions similar to RPM naming conventions, but use a .deb file extension. Include dependency information. Are not natively compatible with RPM.

You have found a patch for the Samba server on your system. The patch is a .rpm package. Which of the following procedures is the MOST correct for installing the package? Download the package. Run inspak -uvhf on the package to install the update. Download the package. Run tar -uvf on the package to install the update. Delete the rpm file after the install is complete. Download the package. Run rpm -ivh on the package to install the update. Download the package. Run rpm -Uvh on the package to install the update.

Download the package. Run rpm -Uvh on the package to install the update. Use the rpm -Uvh command to update an existing application. Use the -U switch to upgrade or install the package. The -vh switches enable verbose listing of installed files. There is no command called inspak. tar is used to unpack a tarball, not an rpm package. The rpm -ivh command runs a complete install, not an update

yumdownloader

Downloads a package without installing it. ex. yumdownloader zuff downloads the zuff package, but does not install it.

apt-get

Downloads and install packages. apt-get: Is similar to the yum utility on an RPM distribution. Gets its information about the application repositories from the /etc/apt/sources.list file. Automatically calculates and resolves package dependencies when installing, updating, and removing packages. Be aware of the following apt-get options: > update updates /etc/apt/sources.list with the latest information about available packages. > upgrade upgrades all installed packages to the latest versions in accordance with the information in /etc/apt/sources.list. > dist-upgrade shows all of the package's dependencies. > install installs a package using the package name. The package name is not the file name. During the install, apt-get retrieves the most recent version of the package. > remove removes a specified package, but leaves the configuration files. > purge removes the package and the configuration files. > source retrieves the latest version of the package. The command accesses the /etc/apt/sources.list file to determine whether the latest package version is installed. > check checks the package database for consistency and errors. > clean removes unneeded package information files and logs. This command is needed when not using the dselect utility to install Debian packages. > autoclean removes information files about packages that can no longer be downloaded. > -d downloads packages without installing them. > -f attempts to fix a computer with unsatisfied dependencies. Use this with apt-get install and apt-get remove. > -m ignores package files that cannot be accessed or located. > -q shows less progress information. > -s simulates package installation without doing an actual install. > -y automatically provides a yes response to yes / no questions in the package installation script. e.g. apt-get dist-upgrade 3dchess shows dependency information for the 3dchess package. apt-get install 3dchess downloads and installs the 3dchess package from a package repository. apt-get remove 3dchess removes the 3dchess package but leaves the 3dchess configuration files. apt-get purge 3dchess removes the 3dchess package along with the 3dchess configuration files. *Before purge was added as a command in the apt-get utility, --purge had to be used as an option with the remove command, for example apt-get remove --purge 3dchess (this older syntax is still supported) apt-get source 3dchess determines whether a newer version of 3dchess is available, and if so, installs it. apt-get -d install 3dchess downloads the 3dchess package without installing it. apt-get -f install 3dchess tries to fix dependency issues for the 3dchess package. apt-get -m remove 3dchess removes the 3dchess package but ignores missing files. apt-get -q remove 3dchess removes the 3dchess package but shows less of the information during the process. apt-get -s install 3dchess tests the installation process of the 3dchess package without installing it. apt-get -y install 3dchess installs the 3dchess package and automatically provides a yes answer to any yes/no prompts.

You need the DNF utility to check specific URLs for RPM repositories. Which of the following locations should you add the URLs to? In .repo files within the /etc/yum.conf file. In .repo files within the /var/lib/rpm directory. In .repo files within the /var/usr/yum.log file. In .repo files within the /etc/yum.repos.d/ directory.

In .repo files within the /etc/yum.repos.d/ directory. Add the URLs of RPM repositories to .repo files within the /etc/yum.repos.d/ directory.

apt-cache

Retrieves information about the Debian package database. Be aware of the following apt-cache options: > showpkg displays information about a package in the database. > stats shows the number of packages installed, dependency information, and other package cache statistics. > unmet lists any missing dependencies in the package cache. > depends shows all of the package's dependencies. > pkgnames displays whether a package is installed on the system. When the package name is left off, the command shows information for all packages on the computer. > search searches for a package in the cache. e.g. apt-cache showpkg 3dchess shows information about the 3dchess package. apt-cache depends 3dchess shows dependency information for the 3dchess package. apt-cache pkgnames 3dchess displays whether the 3dchess package is installed. apt-cache pkgnames 3dchess displays whether the 3dchess package is installed.

You have previously installed the package mplayer and wish to remove it from your computer. Which of the following removal methods should you use? Run the command erase -r mplayer. Run the command tar -e mplayer. Locate the files for mplayer and delete them. Run the command rpm -e mplayer.

Run the command rpm -e mplayer. The proper method is to run the rpm -e command to uninstall the application. The tar command cannot be used to uninstall packages. There is no standard Linux command called erase. Trying to manually uninstall an application by erasing its files is not a recommended practice.

6.2.6 Use DNF to Remove an RPM Package

RunSnakeRun.noarch is a Python GUI package installed on the server that your organization is no longer using. The IT manager in your organization has asked you to uninstall the RunSnakeRun.noarch package. In this lab, your task is to use the dnf command to uninstall the RunSnakeRun.noarch package. Complete this lab as follows: At the prompt, type dnf erase RunSnakeRun.noarch and press Enter. Press Y and press Enter to install the package.

Locally Compiled Software

Software that is compiled from downloaded or custom source code.

apt-get

The Aptitude Package Manager that downloads, resolves dependencies, and installs Debian packages.

Dandified YUM (DNF)

The Dandified YUM (DNF) is a utility-based YUM that performs the same task of solving dependencies when installing RPM packages. DNF uses an updated algorithm for solving dependencies while utilizing the same YUM command options. Additional facts about DNF include the following: DNF uses /etc/dnf/dnf.conf as its configuration file. The configuration file contains: URLs of RPM repositories. Directories where it saves downloaded packages. Locations of logs. DNF uses a repository file in the same location as YUM. The /etc/yum.repos.d/ directory contains .repo files to identify each Internet repository that will be used to install packages. To change where DNF looks for new or updated packages, add .repo files to this directory. DNF uses /var/log/dnf.log as a log file to track when packages are installed, removed, or downloaded.

dbkg

The Debian Package Manager that installs Debian packages.

6.1.4 Install an RPM Package

The IT manager in your organization has asked you to install the fontconfig-3.10.87-5.fc24.rpm package. In this lab, your task is to complete the following: Switch to the root user using a password of 1worm4b8. You must have root user permissions to install packages. Use the rpm -ivh command to install the fontconfig-3.10.87-5.fc24.rpm package. The package is located in the /home/wadams/Downloads directory. Verify that the fontconfig package has been installed. Complete this lab as follows: 1. At the prompt, type su - and press Enter. 2. Type 1worm4b8 as the password and press Enter. 3. Type rpm -ivh /home/wadams/Downloads/fontconfig-3.10.87-5.fc24.rpm and press Enter. 4. Type rpm -q fontconfig and press Enter to verify that the package is installed.

6.2.5 Use DNF to Install an RPM Package

The IT manager in your organization has asked you to install the pulseaudio-equalizer.noarch package. In this lab, your task is to install the pulseaudio-equalizer.noarch package. Complete this lab as follows: At the prompt, type dnf install pulseaudio-equalizer.noarch and press Enter. Press Y and then press Enter to install the package.

6.1.7 RPM Facts

The Red Hat Package Manager (RPM) is a utility that installs application packages. This lesson covers the following topics: RPM functions RPM naming convention Common commands

RPM

The Red Hat Package Manager used to install software packages on Red Hat, Fedora, OpenSUSE, and other Linux distributions.

6.2.4 YUM and DNF Facts

The Yellowdog Updater Modified (YUM) is a robust utility that manages Red Hat Package Manager (RPM) packages. This lesson covers the following topics: YUM functions Dandified YUM (DNF) Zypper Common commands

YUM

The Yellowdog Updater,Modified package manager.

DNF

The dandified YUM package manager.

Common Commands

The following table lists and describes several common commands for managing Debian packages:

Common Commands

The following table lists and describes several common commands for managing RPM packages:

Common Commands

The following table lists and describes several common commands used by YUM and DNF for managing RPM packages:

6.4.3 Shared Libraries Facts

The importance of shared libraries is best understood under the context of software installations. This lesson covers the following topics: Software repository and package manager review Local repositories Installing locally compiled software Shared libraries Potential shared library complications Library management commands

6.1.5 Remove an RPM Package

There is a C debugger package installed on the server that your organization is no longer using. The IT manager in your organization has asked you to uninstall the ddd-C-Debug-2.8.15-3.cd15 package. In this lab, your task is to: Uninstall the ddd-C-Debug-2.8.15-3.cd15 package. Verify that the ddd-C-Debug-2.8.15-3.cd15 package is uninstalled. Complete this lab as follows: 1. At the prompt, type rpm -e ddd-C-Debug and press Enter to uninstall the package. 2. Type rpm -q ddd-C-Debug and press Enter to verify that the package is installed.

6.1.6 Update an RPM Package

There is a kernel tools package installed on the server. The IT manager in your organization has asked you to upgrade the package using the new package version kernel-tools-10.21.2015-54.fc21.rpm package located in the /root directory. In this lab, your task is to upgrade the kernel tools package using the new package version kernel-tools-10.21.2015-54.fc21.rpm. Complete this lab as follows: 1. At the prompt, type rpm -Uv kernel-tools-10.21.2015-54.fc21.rpm. 2. Press Enter to update the kernel-tools-10.21.2015-54.fc21.rpm package.

Which of the following apt-cache options will show the missing dependencies in the package cache? unmet depends stats pkgnames showpkg

unmet The apt-cache unmet command lists any missing dependencies in the package cache. The apt-cache command retrieves information about the Debian package database. Be aware of the other apt-cache options: showpkg displays information about a package in the database. stats shows the number of packages installed, dependency information, and other package cache statistics. depends shows all of the package's dependencies. pkgnames displays whether a package is installed on the system. When the package name is left off, the command shows information for all packages on the computer. search searches for a package in the cache.

Which of the following apt-get options will upgrade all installed packages to the latest versions using the information in /etc/apt/sources.list?

upgrade apt-get upgrade upgrades all installed packages to the latest versions in accordance with the information in /etc/apt/sources.list. The apt-get command downloads and installs packages on a Debian distribution. apt-get: Is similar to the yum utility on an RPM distribution. Obtains its information about the application repositories from the /etc/apt/sources.list file.

You used YUM to list the python packages that are available to install. You see that there is a package available that is called python. What YUM command do you use to install this python package?

yum install python The YUM command for installing this python package is the same as any other package you would install with YUM, yum install python. On later distributions of Linux, YUM has been deprecated and replaced with DNF. But if you enter yum install python, the system will still run the installation using DNF. The DNF command is dnf install python.

yum Examples

yum list all shows all packages in the repository and installed on the computer. yum list javahelp2 searches for the javahelp2 package in the repository. yum list *help* lists all packages in the repository that have the string help somewhere in the name. yum list installed mtools shows whether the mtools package is installed on the computer. yum install BackupPC-3.1.0-3.fc9.rpm installs the BackupPC package and any package dependencies. yum install http://rpm.sh-linux.org/rpm-fc9/target/BackupPC-3.1.0-3.fc9.rpm installs the specified package directly from the Internet. yum list update mtools looks for an update for the mtools package and updates it if one is available. yum update sssd updates the sssd package. yum update updates all installed packages. yum list available shows the available packages. yum search Java searches all package information and descriptions for the term Java. yum info zuff shows information about the zuff package. yum whatprovides /etc/updatedb.conf shows what packages are associated with the updatedb.conf file. yum remove kdegames uninstalls the kdegames package from your computer. yum -y update updates all packages without requesting confirmation prompts.

You have users who need to do some programming projects in the Python programming language. What yum command should you use to find out if there is a python package available to install on the Linux server?

yum list python To find out if there is a python package available for installing Python, enter yum list python at the command prompt.

You have installed a package called mathpac with yum. After a system upgrade, the package is not working correctly. Which of the following commands should you FIRST try to get the package to funciton? rpm -U mathpac yum upgrade mathpac yum remove mathpac and then yum install mathpac yum update mathpac

yum update mathpac update ensures all dependencies are met. upgrade is for some backward compatibility and considers package obsoletes. It may be removed in the future. yum remove mathpac and then yum install mathpac will work, but requires unnecessary. The rpm command is inappropriate for yum packages.

What yum command would you enter at the command prompt to determine which package contains the /usr/lib/libstlport_gcc.so file?

yum whatprovides /usr/lib/libstlport_gcc.so Use yum whatprovides /usr/lib/libstlport_gcc.so or yum provides /usr/lib/libstlport_gcc.so to determine which package contains the /usr/lib/libstlport_gcc.so file. The provides or whatprovides options display which packages are associated with a specific file.

What YUM command would you enter at the command prompt to download an RPM package without installing it to the system?

yumdownloader yumdownloader downloads a package without installing it on the system. For example, yumdownloader zuff.i686 downloads the zuff package, but does not install it.

dpkg

Installs Debian packages on Debian distributions. Be aware of the following dpkg options: > -i installs a package. > --configure reconfigures an unpacked package. > -r removes the package but does not delete the configuration files. > -P completely uninstalls the package including the configuration files. > -p lists information about a currently installed Debian package. > -I (uppercase i) or --info lists information about packages that are not installed. > -l (lowercase L) displays all packages with names that match a specified pattern. > -L shows the installed files for a package. > -S finds a package associated with specified files. > -C searches for packages that have been installed only partially on the system. > B disables packages that have dependencies on the package being removed. > --ignore-depends ignores dependency-checking for specified packages. > -no-act prevents changes from being written. > -G prevents a package from being installed if a newer version of the package already exists on the computer. > -E does not install the package if the same version of the package is already installed. > -R installs the package recursively *The dpkg-reconfigure command reconfigures an already installed package. E.g. dpkg -i docbook_4.5-4_all.deb installs the docbook package. dpkg -r docbook removes the docbook package. dpkg -P docbook removes the docbook package and its configuration files. dpkg -i docbook displays information about the package. dpkg -I dwm-tools_26-2_i386.deb displays information about the dwm-tools package. dpkg -l kcheckers* lists all packages that begin with kcheckers. dpkg -L docbook lists all files installed with the docbook package. dpkg -S /usr/share/base-files/motd shows the package associated with the motd file. dpkg -B -r docbook removes the docbook package and disables any package dependent on the docbook package. dpkg -G -i docbook_4.5-4_all.deb installs the docbook package if it is a newer version than a previously installed package.

yum

Installs RPM packages, including their dependencies. Be aware of the following actions and options: list displays lists of packages. install installs a package. Use the entire package file name when installing. list updates displays whether updates are available for packages. update updates RPM packages. list available lists packages that are available to install. search searches all packages for a specified term. info displays detailed package information. provides, whatprovides displays what packages are associated with a specific file. remove, erase uninstalls a package. -y bypasses confirmation prompts.

dnf

Installs RPM packages, including their dependencies. Be aware of the following actions and options: list displays lists of packages. install installs a package. Use the entire package file name when installing. list updates displays whether updates are available for packages. update updates RPM packages. list available lists packages that are available to install. search searches all packages for a specified term. info displays detailed package information. provides, whatprovides displays what packages are associated with a specific file. remove, erase uninstalls a package. -y bypasses confirmation prompts.

Which of the following functions does the -d option perform when using the apt-get command to install a package? The package database is checked for consistency and errors. All installed packages are upgraded to the latest versions in with the information in /etc/apt/sources.list. Package installation is simulated without an actual installation. Packages are downloaded to the system, but not installed.

Packages are downloaded to the system, but not installed. The apt-get install command downloads and installs packages. Inserting the -d option downloads packages without installing them. apt-get upgrade upgrades all installed packages to the latest versions in accordance with the information in /etc/apt/sources.list. apt-get -check checks the package database for consistency and errors. apt-get -s simulates package installation without doing an actual install.

RPM Functions

RPM performs various functions as part of package installation. RPM Is used as the package manager on many distributions, such as openSUSE, Red Hat, and Fedora. Installs and configures pre-compiled, pre-configured applications, and services on the system. Accesses a library containing thousands of packages where the source code is built, compiled, and ready to be installed on a supported Linux architecture or distribution. Installs, updates, verifies, queries, and uninstalls packages. Uses a database stored at /var/lib/rpm that keeps track of all installed packages, their current status, and available updates. Checks for dependencies on other packages and prompts to install these packages, if necessary. A dependency is an application's reliance on another package to perform correctly. This lesson covers the following topics: RPM naming convention Common commands

RPM Naming Convention

RPM uses a standard naming convention. Be aware of the following naming convention details: The syntax is packagename-version-release.architecture.rpm. Release numbers might contain distribution data: fcx is for Fedora rhlx is for Red Hat susexxx is for version xxx of SUSE The architecture type specifies the processor: i386 is for any Intel 80386 or newer processor. i586 is for any Intel Pentium I or newer processor. i686 is for any Intel Pentium II or newer processor. x86_64 is for 64-bit Intel or AMD CPUs noarch is for any architecture (not architecture specific) *Typically, i386, i586, and i686 packages will run on equivalent AMD processors as well. For example, acroread-8.1.3-51.6.i586.rpm means the following:

Which of the following functions does the dpkg --configure command perform? Reconfigures an unpacked package Uninstalls the package including the configuration files Ignores dependency-checking for specified packages Installs a package if the same version is not already installed

Reconfigures an unpacked package The dpkg command installs Debian packages on Debian distributions. The dpkg --configure command reconfigures an unpacked package.

You obtain your applications and updates in RPM format. Which of the following distributions is your system based on? Debian Xandros Slackware Red Hat

Red Hat Any system that is based on or derived from Red Hat can use RPM packages. Slackware, Debian, and Xandros do not use RPM for package management. It is also possible for a distribution that is not based on or derived from Red Hat use RPM. SUSE is an example of such a distribution.

rpm

Uses the Red Hat Package Manager (RPM) to manage packages. Package options are: --rebuilddb rebuilds the database indices from the installed package headers. --initdb creates a new database. --checksig checks the authenticity of the package. The option checks the package's digital signing key against the package to ensure it has not been altered. -i installs a package. Use the entire package filename when installing. -h prints hash marks as the package archive is unpacked. -v displays a verbose version of the installation. --test tests a package for uninstalled dependencies without actually installing it. --nodeps installs the package without checking for dependencies. This is not recommended. --force installs the package regardless of whether, a newer version of the package is already installed, package files overwrite files from previously installed packages, or if the package replaces other installed packages. -e uninstalls (e.g., erases) a package. To uninstall a package, use the package name, not the file name. If dependencies exist, the dependent packages must first be removed. -U updates an installed package to the newest version. -F upgrades the package, but only if an earlier version currently exists on the system. -q queries the computer for information about installed packages. *Use this with -a to list all packages and -l to show the files associated with the package. -V verifies that packages are free from errors by performing an MD5 checksum on the package. RPM only gives output when packages have errors. If errors are present, the command displays the error code and the file name. The error codes are: S indicates a problem in the size of a file. M indicates a problem with a file's mode. 5 indicates a problem with the MD5 checksum of a file. D indicates a problem with a file's revision numbers. L indicates a problem with a file's symbolic link. U indicates a problem with a file's ownership. G indicates a problem with a file's group. T indicates a problem with the modification time of a file. c indicates the specified file is a configuration file. '.' in place of a code letter indicates that no error is present in that area.

Which of the following functions does the rpm -V command perform? Tests an RPM package for uninstalled dependencies without actually installing it. Verifies that an RPM package is free from errors. Updates an installed RPM package to the newest version. Checks the authenticity of the RPM package.

Verifies that an RPM package is free from errors. The rpm -V command verifies that packages are free from errors. rpm -V performs an MD5 checksum on the package. RPM only gives output when packages have errors. If errors are present, the command displays the error code and the filename. rpm -U updates an installed package to the newest version. rpm --checksig checks the authenticity of the package. The option checks the package's digital signing key against the package to ensure it has not been altered. rpm --test tests a package for uninstalled dependencies without actually installing it.

aptitude

Views the list of packages and perform package management tasks such as installing, upgrading, and removing packages in the Advanced Packaging Tool (APT). aptitude is the front-end to APT. It displays a list of software packages and allows the user to interactively pick packages to install or remove.

YUM Functions

YUM is the primary utility for getting, installing, deleting, querying, and managing Red Hat Enterprise Linux RPM software packages. YUM: Is used on Red Hat, Fedora, and other compatible distributions. Checks the dependencies of an RPM package being installed, and then automatically installs or updates any dependencies as needed. Keeps and updates a file that lists all packages available in the Internet repositories that it has been configured to use. Uses /etc/yum.conf as its configuration file. The configuration file contains URLs of RPM repositories. Directories where it saves downloaded packages. Locations of logs. Uses a .repo file in /etc/yum.repos.d/ to identify each Internet repository that will be used to install packages. To change where YUM looks for new or updated packages, add .repo files to this directory. Uses /var/usr/yum.log as a log file to track when packages are installed, removed, or downloaded.

Zypper

Zypper is the command-line interface for the graphical package manager ZYpp. It downloads RPM type packages from an online repository, resolves dependencies, and installs the packages.

Package Name | Version Number | Release | Architecture |

acroread | 8.1.3 | 51.6 | i586 |

You are working on a Debian distribution of Linux. You want to retrieve information about the Debian package database on the system. Without using any command options, what command will provide the information you need?

apt-cache The apt-cache command retrieves information about the Debian package database. Be aware of the following apt-cache options: showpkg displays information about a package in the database. stats shows the number of packages installed, dependency information, and other package cache statistics. unmet lists any missing dependencies in the package cache. depends shows all of the package's dependencies. pkgnames displays whether a package is installed on the system. When the package name is left off, the command shows information for all packages on the computer. search searches for a package in the cache.

You are working on a Debian distribution of Linux. You need to install a package, but you do not want to manually install all the dependencies for the package. Without using any command options, what command should you use?

apt-get The apt-get command downloads and installs packages on a Debian distribution. apt-get: Is similar to the yum utility on an RPM distribution. Obtains its information about the application repositories from the /etc/apt/sources.list file.

Which of the following statements correctly describe the differences between the apt-get remove and apt-get purge commands? (Select TWO). apt-get remove leaves the package installed, but removes the configuration files. apt-get purge removes a specified package, but leaves the configuration files. apt-get purge removes the package and the configuration files. apt-get remove removes a specified package, but leaves the configuration files.

apt-get purge removes the package and the configuration files. apt-get remove removes a specified package, but leaves the configuration files. apt-get remove removes a specified package, but leaves the configuration files. apt-get purge removes the package and the configuration files. Note: Before purge was added as a command in the apt-get utility, the syntax for removing packages as well as configuration files was to use apt-get with the remove command and the --purge option, for example apt-get remove --purge. (This older syntax is still supported.)

You have installed a package called mathpac with apt-get. After a system upgrade, the package is not working correctly. Which of the following commands is the MOST correct method to get the package to work? apt-get upgrade mathpac rpm -U mathpac apt-get update mathpac apt-get dist-upgrade mathpac

apt-get upgrade mathpac The upgrade option will insure all dependencies are met when the latest version is installed. update is used to resynchronize the package index files from their sources. The indexes of available packages are fetched from the location(s) specified in /etc/apt/sources.list. rpm -U mathpac may work with apt-get versions specific for rpm based distributions, but not all distributions use rpm for package management. dist-upgrade, in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages. apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones, if necessary. This should not be used to casually upgrade a single package.

Which of the following Debian package management utilities provides the front end for APT? apt-get aptitude apt-cache dpkg

aptitude aptitude is the front end to Advanced Packaging Tool (APT), which displays a list of software packages and allows the user to interactively pick packages to install or remove. apt-get downloads and installs packages, including dependencies. apt-cache retrieves information about the Debian package database. dpkg installs Debian packages on Debian distributions.

You used DNF to list the Ruby packages that are available to install. You see that there is a package available that is called ruby. What DNF command do you use to install this Ruby package?

dnf install ruby The DNF command for installing this Ruby package is the same as any other package you would install with DNF, dnf install ruby.

dnf Examples

dnf list all shows all packages in the repository and installed on the computer. dnf list javahelp2 searches for the javahelp2 package in the repository. dnf list *help* lists all packages in the repository that have the string help somewhere in the name. dnf list installed mtools shows whether the mtools package is installed on the computer. dnf install BackupPC-3.1.0-3.fc9.rpm installs the BackupPC package and any package dependencies. dnf install http://rpm.sh-linux.org/rpm-fc9/target/BackupPC-3.1.0-3.fc9.rpm installs the specified package directly from the Internet. dnf list update mtools looks for an update for the mtools package and updates it if one is available. dnf update sssd updates the sssd package. dnf update updates all installed packages. dnf list available shows the available packages. dnf search Java searches all package information and descriptions for the term Java. dnf info zuff shows information about the zuff package. dnf whatprovides /etc/updatedb.conf shows what packages are associated with the updatedb.conf file. dnf remove kdegames uninstalls the kdegames package from your computer. dnf -y update updates all packages without requesting confirmation prompts

You have users who need to do some programming projects in the Ruby programming language. What DNF command do you use to find out whether there is a Ruby package available for installation on the Linux server?

dnf list ruby To find out if there is a Ruby package available, enter dnf list ruby at the command prompt.

You have installed a package called mathpac with DNF. After a system upgrade, the package is not working correctly. Which of the following commands should you try first to get the package to function? dnf upgrade mathpac dnf update mathpac dnf remove mathpac and then dnf install mathpac rpm -U mathpac

dnf update mathpac update ensures all dependencies are met. upgrade is for some backward compatibility functions and considers package obsoletes. It may be removed in the future. dnf remove mathpac and then dnf install mathpac will work, but this option requires unnecessary steps. The rpm command is inappropriate for dnf packages.

What dpkg command would you enter at the command prompt to search for packages that have been partially installed on the system?

dpkg -C The dpkg -C command searches for packages that have been partially installed on the system. The dpkg command installs Debian packages on Debian distributions.

What dpkg command would you enter at the command prompt to list information about a currently installed Debian package?

dpkg -p The dpkg command installs Debian packages on Debian distributions. The dpkg -p command lists information about a currently installed Debian package.

Which of the following commands will reconfigure an already installed package? dpkg --configure dpkg-reconfigure apt-get -f apt-get -clean

dpkg-reconfigure The dpkg-reconfigure command reconfigures an already installed package. dpkg --configure reconfigures an unpacked package. apt-get -f attempts to fix a computer with unsatisfied dependencies. apt-get -clean removes unneeded package information files and logs.

You are working with the RPM package acroread-8.1.3-51.6.i586.rpm. Match the naming convention term on the left with the associated file name segment on the right.

i586 Architecture type 8.1.3 Version number acroread Package name 51.6 Release number RPM uses a standard naming convention. The syntax is packagename-version-release.architecture.rpm. For example, acroread-8.1.3-51.6.i586.rpm means the following:

Which of the following DNF options will display whether updates are available for RPM packages? list updates install update list

list updates dnf list updates displays whether updates are available for packages. Use the DNF utility to install RPM packages, including their dependencies. dnf list displays lists of packages. dnf install installs a package. dnf update updates RPM packages.

Which of the following yum options will display whether updates are available for RPM packages? list updates install list update

list updates yum list updates displays whether updates are available for packages. Use the YUM utility to install RPM packages, including their dependencies. yum list displays lists of packages. yum install installs a package. yum update updates RPM packages.

Which of the following utilities should you use if you need to extract a file from an RPM package file? rpm -i createrepo rpm -e rpm2cpio

rpm2cpio Use rpm2cpio to convert RPM packages into a cpio archive. This is useful for extracting files from an RPM package without installing and searching for the specific files. createrepo creates a repository list of RPM packages stored locally or on a network. rpm -e uninstalls a package. The uninstallation process uses the package name, not the file name. If dependencies exist, the dependent packages must first be removed. rpm -i installs a package. Use the entire package filename when installing.

rpm Examples

rpm --checksig acroread checks the authenticity of the acroread package. rpm -i BackupPC-3.1.0-3.fc9.src.rpm installs the BackupPC package. rpm -ihv http://rpm.sh-linux.org/rpm-fc9/target-SRPMS/BackupPC-3.1.0-3.fc9.src.rpm installs the specified package directly from the Internet. rpm -i --test dbus-python-0.83.0-2.fc9.src.rpm tests the computer for uninstalled dependencies for the dbus-python package. rpm -i --nodeps dbus-python-0.83.0-2.fc9.src.rpm installs the package but does not check for missing dependencies. rpm -i --force dbus-python-0.83.0-2.fc9.src.rpm installs the package regardless of effects on other packages. rpm -e dbus-python removes the package from the computer. rpm -e --nodeps dbus-python removes the package from the computer but does not check for dependent packages. rpm -U dbus-python-0.83.0-2.fc9.src.rpm removes any version older than the specified version and installs the specified package. rpm -U --replacepkgs dbus-python-0.83.0-2.fc9.src.rpm reinstalls the dbus-python package. This option is for fixing errors. rpm -qa displays a list of all installed packages. rpm -qi BackupPC shows all available information about the BackupPC package. rpm -q --whatrequires gmp lists the packages that are dependent on the gmp package. rpm -ql metacity shows the files associated with the metacity package. rpm -q --provides gmp lists the functions that the gmp package provides. rpm -q --requires gmp lists the functions that the gmp package requires. rpm -q --whatprovides /usr/lib/libstlport_gcc.so shows the package that provides the libstlport_gcc.so file. rpm -V BackupPC verifies the BackupPC package. rpm -Va verifies all installed packages.

You are attempting to install an RPM package on your Linux system, but the system tells you that a newer package is already installed. Which of the following commands will install the RPM package over the existing installed package? rpm -e rpm --force rpm -ihv rpm --rebuilddb

rpm --force The rpm --force command installs the package regardless of whether a newer version of the package is already installed, the package files overwrite existing files, or the package replaces other installed packages. -i installs a package. Use the entire package filename when installing. -h prints hash marks as the package archive is unpacked. -v displays a verbose version of the installation. --rebuilddb rebuilds the database indices from the installed package headers. -e uninstalls a package. The uninstallation process uses the package name, not the file name. If dependencies exist, the dependent packages must first be removed.

You are attempting to install an RPM package on your Linux system, but the system tells you the package has dependencies that are not installed. What would you enter at the command prompt to force RPM to override the need to install the dependencies?

rpm --nodeps The rpm --nodeps command installs the package without checking for dependencies. This is not a recommended practice. A dependency is an application's reliance on another package to perform correctly.

Without installing an RPM package, you want to check for all of the package's uninstalled dependencies. Which of the following commands should you use? rpm --test rpm --checksig rpm -U rpm -ihv

rpm --test The rpm --test command tests a package for uninstalled dependencies without actually installing it. -i installs a package. Use the entire package filename when installing. -h prints hash marks as the package archive is unpacked. -v displays a verbose version of the installation. --checksig checks the authenticity of the package. The option checks the packages digital signing key against the package to ensure that it has not been altered. -U updates an installed package to the newest version.

What command will upgrade an RPM package only if an earlier version is already installed on the system?

rpm -F The rpm -F command upgrades the package, but only if an earlier version currently exists on the system.

You have an RPM package called mathpac that is not working correctly. You have downloaded the latest package. Which of the following commands should you use to install the latest mathpac package? rpm -U mathpac Run: rpm -e mathpac Followed by: rpm -i mathpac rpm -i mathpac rpm -F mathpac

rpm -U mathpac The -U option specifies that you would like to upgrade the package. This option installs the new package and removes the old one. rpm -F freshens the current install, but there is still a small possibility that it will not solving the problem. rpm -i installs a new package, which will not work in this, case since the package is already installed.

You need to install the package apt-0.5.15cnc6-1.1.fc2.fr.i386.rpm. Which of the following commands will perform the installation? (Select TWO). rpm -e apt-0.5.15cnc6-1.1.fc2.fr.i386.rpm rpm -Xh apt-0.5.15cnc6-1.1.fc2.fr.i386.rpm rpm -ih apt-0.5.15cnc6-1.1.fc2.fr.i386.rpm tar -Uh apt-0.5.15cnc6-1.1.fc2.fr.i386.rpm rpm -Uh apt-0.5.15cnc6-1.1.fc2.fr.i386.rpm

rpm -ih apt-0.5.15cnc6-1.1.fc2.fr.i386.rpm rpm -Uh apt-0.5.15cnc6-1.1.fc2.fr.i386.rpm The commands rpm -Uh or rpm -ih will install package apt-0.5.15cnc6-1.1.fc2.fr.i386.rpm. The command rpm -e will erase an installed package. There is no -X switch to use with rpm. Tar does not work with rpm files.

Which of the following commands queries the system for all installed RPM packages? rpm -U rpm -qa rpm -ihv rpm -nodeps

rpm -qa The rpm -qa command queries all installed RPM packages on the system. Use the rpm utility to install RPM packages, including their dependencies. --nodeps installs the package without checking for dependencies. This is not a recommended practice. -U updates an installed package to the newest version. -i installs a package. Use the entire package filename when installing. -h prints hash marks as the package archive is unpacked. -v displays a verbose version of the installation.

You need to determine which files are associated with the metacity RPM package. Which of the following commands should you use? rpm -i metacity rpm -ql metacity rpm -V metacity rpm --test metacity

rpm -ql metacity rpm -ql metacity shows the files associated with the metacity package. rpm -i installs a package. Use the entire package filename when installing. rpm -V verifies that packages are free from errors by performing an MD5 checksum on the package. rpm --test tests a package for uninstalled dependencies without actually installing it.


Ensembles d'études connexes

Honors U.S. and V.A. History Leib Midterm- Ch. 1 Test Answers

View Set

Pharm made easy 4.0 The Reproductive and Genitourinary System

View Set

Telephone Review and Quiz - Listening: Conversations. 100%

View Set