CHAPTER 9. Managing Software Flashcards
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=
D.
The gpgcheck= line indicates whether to check the integrity of packages in the repository using a GPG key. Although useful, this capability is not mandatory.
Which installation source is used on RHEL if a server is not registered with RHN?
a. The installation medium is used.
b. No installation source is used.
c. The base RHN repository is used, without updates.
d. You have full access to RHN repositories, but the software you are using is not supported.
B.
If a RHEL system is not registered with RHEL, no repositories are available.
This is important to realize for the RHCSA exam, because it means that you need to connect to a repository before you can install anything.
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
C.
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. This explains why there are three slashes in the baseurl.
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.
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.
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
D.
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 filename, you may get a match that is based on the package description, not on the filename.
Which yum module component allows you to work with different versions side by side?
a. Application profile
b. Application stream
c. Module version
d. RPM group
B.
The yum module application stream allows for working with different versions of user space software side by side.
Which of the following commands allows you to install the devel profile of the PHP 7.1 application stream?
a. yum module install php:7.1 devel
b. yum module install php:7.1 –devel
c. yum module install php:7.1/devel
d. yum module install php:7.1@devel
C.
To install a specific profile from a yum module application stream, add the profile name to the application stream version using a /.
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
A.
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.
Which command enables you to find the RPM package a specific file belongs to?
a. rpm -ql /my/file
b. rpm -qlf /my/file
c. rpm -qf /my/file
d. rom -qa /my/file
C.
Use the rpm -qf command to find which RPM package a specific file comes from.
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
C.
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.