Chapter 9: Managing Software ("DO I KNOW THIS ALREADY?" QUIZ + Review Questions)

¡Supera tus tareas y exámenes ahora con Quizwiz!

d. Explanation: The gpgcheck= line indicates whether to check the integrity of packages in the repository using a GPG key. Although useful, this is not mandatory.

1. Which of the following is not a mandatory component in a .repo file that is used to indicate which repositories should be used? a. [label] b. name= c. baseurl= d. gpgcheck=

c. Explanation: The --scripts option checks whether there are scripts in an RPM package. If you want to query the package file and not the database of installed RPMs, you need to add the -p option to the -q option, which is used to perform RPM queries.

10. Which command enables you to analyze whether there are scripts in an RPM package file that you have just downloaded? a. rpm -qs packagename.rpm b. rpm -qps packagename.rpm c. rpm -qp --scripts packagename.rpm d. rpm -q --scripts packagename.rpm

b. Explanation: If an RHEL system is not registered with RHEL, no repositories are available.

2. Which installation source is used on RHEL if a server is not registered with RHN? a. The installation medium b. Nothing c. The base RHN repository, without updates d. You have full access to RHN repositories, but the software you are using is just not supported.

c. Explanation: Use baseurl to specify which URL to use. If the URL is based on the local file system, it uses the URI file:// followed by the path on the local file system, which in this case is /repo, which explains why there are three slashes in the baseurl.

3. Which of the following should be used in the repo file to refer to a repository that is in the directory /repo on the local file system? a. file=/repo b. baseurl=file://repo c. baseurl=file:///repo d. file=http:///repo

d. Explanation: GPG package signing is used to set a checksum on packages, so that altered packages can easily be recognized. The main purpose of signing packages is to make it easy to protect packages on internet repositories. For internal repositories that cannot be accessed by Internet users, the need to add GPG package signatures is less urgent.

4. Which of the following is true about GPG-based repository security? a. If packages in the repository have been signed, you need to copy the GPG key to the correct location. b. GPG package signing is mandatory. c. GPG package signatures prevent packages in a repository from being changed. d. GPG package signing is recommended on Internet repositories, but not required on local repositories that are for internal use only.

d. Explanation: Both the commands "yum provides and yum whatprovides can be used to search for files within a specific package. The file pattern must be specified as */filename or as a full path, which is why answer D is the only correct answer. Without the */ in front of the file name, you may get a match that is based on the package description, not on the filename.

5. Which command enables you to search the package that contains the file semanage? a. yum search semanage b. yum search all semanage c. yum provides semanage d. yum whatprovides */semanage

c. Explanation: The yum list all command shows installed packages and packages that are available in the repositories. The question was how to show installed packages (not all packages), which is why answer C is the correct answer.

6. Which command enables you to show all installed packages using the yum command? a. yum show b. yum show all c. yum list installed d. yum list all

d. Explanation: The yum history command reads the /var/log/yum.log file and shows recent yum history. In this list, every event is marked with a history number that can be used with the yum history undo command.

7. Which command enables you to find out the yum ID number that is needed to roll back a command that was issued with yum? a. yum show all b. yum show recent c. yum show history d. yum history

a. Explanation: The yum install command installs individually downloaded RPM files while looking for package dependencies in the current repositories. This is better than using rpm -ivh, which does not consider the yum repositories. In earlier versions of RHEL, the yum localinstall command was used to install packages that were downloaded to the local file system, but this command is now deprecated.

8. Which command should you use to install an RPM file that has been downloaded to your computer? a. yum install b. yum localinstall c. rpm -ivh d. rpm -Uvh

c. Explanation: Use the rpm -qf command to find which RPM package a specific file comes from.

9. Which command enables you to find the RPM a specific file belongs to? a. rpm -ql /bin/file b. rpm -qlf /bin/file c. rpm -qf /bin/file d. rom -qa /bin/file

What needs to be in the repository file to point to a repository on http://server.example.com/repo?

The line [some-label] name=some-name baseurl=http://server.example.com/repo needs to be in the repository file.

You have a directory containing a collection of RPM packages and want to make that directory a repository. Which command enables you to do that?

createrepo enables you to make a directory containing a collection of RPM packages a repository.


Conjuntos de estudio relacionados

Chapter 14: Public Order Crime: Sex and Substance Abuse

View Set

Florida Property & Casualty Insurance

View Set

Plasmid Vectors and Recombinant DNA

View Set

Series 66- Laws, Regs, Guidelines #2

View Set

Pharm: Chp 47: Lipid-Lowering Agents (PrepU)

View Set

Who Was Albert Einstein questions

View Set