Вы находитесь на странице: 1из 8

NAME

xorg.conf, xorg.conf.d − configuration files for Xorg X server

INTRODUCTION
Xorg supports several mechanisms for supplying/obtaining
configuration and run-time parameters: command line
options, environment variables, the xorg.conf and
xorg.conf.d configuration files, auto-detection, and fallback
defaults. When the same information is supplied in more
than one way, the highest precedence mechanism is used.
The list of mechanisms is ordered from highest precedence
to lowest. Note that not all parameters can be supplied via
all methods. The available command line options and
environment variables (and some defaults) are described in
the Xserver(1)and Xorg(1) manual pages. Most
configuration file parameters, with their defaults, are
described below. Driver and module specific configuration
parameters are described in the relevant driver or module
manual page.

DESCRIPTION
Xorg uses a configuration file called xorg.conf and files
ending in the suffix .conf from the directory xorg.conf.d for
its initial setup. The xorg.confconfiguration file is searched
for in the following places when the server is started as a
normal user:

/etc/X11/<cmdline>
/usr/etc/X11/<cmdline>
/etc/X11/$XORGCONFIG
/usr/etc/X11/$XORGCONFIG
/etc/X11/xorg.conf
/etc/xorg.conf
/usr/etc/X11/xorg.conf.<hostname>
/usr/etc/X11/xorg.conf
/usr/lib/X11/xorg.conf.<hostname>
/usr/lib/X11/xorg.conf
where <cmdline> is a relative path (with no “..” components)
specified with the −config command line
option, $XORGCONFIG is the relative path (with no “..”
components) specified by that environment variable,
and <hostname> is the machine’s hostname as reported
by gethostname(3).
The ServerLayout sections are at the highest level. They
bind together the input and output devices that will be used
in a session.

yum Commands

yum commands are typically run as yum <command> <package name/s>. By default, yum will automatically
attempt to check all configured repositories to resolve all package dependencies during an
installation/upgrade.

The following is a list of the most commonly-used yum commands. For a complete list of
available yumcommands, refer to man yum.

yum install <package name/s>


Used to install the latest version of a package or group of packages. If no package matches
the specified package name(s), they are assumed to be a shell glob, and any matches are
then installed.

yum update <package name/s>


Used to update the specified packages to the latest available version. If no package name/s
are specified, then yum will attempt to update all installed packages.

If the --obsoletes option is used (i.e. yum --obsoletes <package name/s>, yum will process
obsolete packages. As such, packages that are obsoleted accross updates will be removed and
replaced accordingly.

yum check-update
This command allows you to determine whether any updates are available for your installed
packages. yum returns a list of all package updates from all repositories if any are available.

yum remove <package name/s>


Used to remove specified packages, along with any other packages dependent on the
packages being removed.

yum provides <file name>


Used to determine which packages provide a specific file or feature.

yum search <keyword>


This command is used to find any packages containing the specified keyword in the
description, summary, packager and package name fields of RPMs in all repositories.

yum localinstall <absolute path to package name/s>


Used when using yum to install a package located locally in the machine.

Using RPM
RPM has five basic modes of operation (not counting package building): installing, uninstalling,
upgrading, querying, and verifying. This section contains an overview of each mode. For complete
details and options, try rpm --help or man rpm. You can also refer to Section 10.5, “Additional
Resources” for more information on RPM.

10.2.1. Finding RPM Packages

Before using any RPM packages, you must know where to find them. An Internet search returns many
RPM repositories, but if you are looking for RPM packages built by Red Hat, they can be found at the
following locations:

o The Red Hat Enterprise Linux CD-ROMs


o The Red Hat Errata Page available at http://www.redhat.com/apps/support/errata/
o Red Hat Network — Refer to Chapter 12, Red Hat Network for more details on Red Hat
Network.

10.2.2. Installing

RPM packages typically have file names like foo-1.0-1.i386.rpm. The file name includes the
package name (foo), version (1.0), release (1), and architecture (i386). To install a package, log in
as root and type the following command at a shell prompt:

rpm -Uvh foo-1.0-1.i386.rpm

If the installation is successful, the following output is displayed:

Preparing... ###########################################
[100%]
1:foo ###########################################
[100%]

As you can see, RPM prints out the name of the package and then prints a succession of hash marks
as a progress meter while the package is installed.

The signature of a package is checked automatically when installing or upgrading a package. The
signature confirms that the package was signed by an authorized party. For example, if the
verification of the signature fails, an error message such as the following is displayed:

error: V3 DSA signature: BAD, key ID 0352860f

If it is a new, header-only, signature, an error message such as the following is displayed:

error: Header V3 DSA signature: BAD, key ID 0352860f

If you do not have the appropriate key installed to verify the signature, the message contains the
word NOKEY such as:
warning: V3 DSA signature: NOKEY, key ID 0352860f

Refer to Section 10.3, “Checking a Package's Signature” for more information on checking a package's
signature.

Warning
If you are installing a kernel package, you should use rpm -ivh instead. Refer
to Chapter 39, Manually Upgrading the Kernel for details.

10.2.2.1. Package Already Installed

If a package of the same name and version is already installed, the following output is displayed:

Preparing... ###########################################
[100%]
package foo-1.0-1 is already installed

However, if you want to install the package anyway, you can use the --replacepkgs option, which
tells RPM to ignore the error:

rpm -ivh --replacepkgs foo-1.0-1.i386.rpm

This option is helpful if files installed from the RPM were deleted or if you want the original
configuration files from the RPM to be installed.

10.2.2.2. Conflicting Files

If you attempt to install a package that contains a file which has already been installed by another
package, the following is displayed:

Preparing... ###########################################
[100%]
file /usr/bin/foo from install of foo-1.0-1 conflicts with file from package
bar-2.0.20

To make RPM ignore this error, use the --replacefiles option:

rpm -ivh --replacefiles foo-1.0-1.i386.rpm


10.2.2.3. Unresolved Dependency

RPM packages may sometimes depend on other packages, which means that they require other
packages to be installed to run properly. If you try to install a package which has an unresolved
dependency, output similar to the following is displayed:

error: Failed dependencies:


bar.so.2 is needed by foo-1.0-1
Suggested resolutions:
bar-2.0.20-3.i386.rpm
If you are installing a package from the Red Hat Enterprise Linux CD-ROM set, it usually suggest the
package(s) needed to resolve the dependency. Find the suggested package(s) on the Red Hat
Enterprise Linux CD-ROMs or from Red Hat Network , and add it to the command:

rpm -ivh foo-1.0-1.i386.rpm bar-2.0.20-3.i386.rpm

If installation of both packages is successful, output similar to the following is displayed:

Preparing... ###########################################
[100%]
1:foo ########################################### [
50%]
2:bar ###########################################
[100%]

If it does not suggest a package to resolve the dependency, you can try the --
redhatprovides option to determine which package contains the required file. You need the rpmdb-
redhat package installed to use this option.

rpm -q --redhatprovides bar.so.2

If the package that contains bar.so.2 is in the installed database from the rpmdb-redhat package,
the name of the package is displayed:

bar-2.0.20-3.i386.rpm

To force the installation anyway (which is not recommended since the package may not run correctly),
use the --nodeps option.

10.2.3. Uninstalling

Uninstalling a package is just as simple as installing one. Type the following command at a shell
prompt:

rpm -e foo
Note
Notice that we used the package name foo, not the name of the original package file foo-1.0-
1.i386.rpm. To uninstall a package, replace foo with the actual package name of the original
package.

You can encounter a dependency error when uninstalling a package if another installed package
depends on the one you are trying to remove. For example:

error: Failed dependencies:


foo is needed by (installed) bar-2.0.20-3.i386.rpm

To make RPM ignore this error and uninstall the package anyway (which may break the package
dependent on it) use the --nodeps option.

10.2.4. Upgrading
Upgrading a package is similar to installing one. Type the following command at a shell prompt:

rpm -Uvh foo-2.0-1.i386.rpm

As part of upgrading a package, RPM automatically uninstalls any old versions of the foo package.
Note that -U will also install a package even when there are no previous versions of the package
installed.

Tip
It is not advisable to use the -U option for installing kernel packages, because RPM replaces the
previous kernel package. This does not affect a running system, but if the new kernel is unable to boot
during your next restart, there would be no other kernel to boot instead.
Using the -i option adds the kernel to your GRUB boot menu (/etc/grub.conf). Similarly,
removing an old, unneeded kernel removes the kernel from GRUB.

Because RPM performs intelligent upgrading of packages with configuration files, you may see a
message like the following:

saving /etc/foo.conf as /etc/foo.conf.rpmsave

This message means that changes you made to the configuration file may not be forward
compatible with the new configuration file in the package, so RPM saved your original file and installed
a new one. You should investigate the differences between the two configuration files and resolve
them as soon as possible, to ensure that your system continues to function properly.

If you attempt to upgrade to a package with an older version number (that is, if a more updated
version of the package is already installed), the output is similar to the following:

package foo-2.0-1 (which is newer than foo-1.0-1) is already installed

To force RPM to upgrade anyway, use the --oldpackage option:

rpm -Uvh --oldpackage foo-1.0-1.i386.rpm


10.2.5. Freshening

Freshening is similar to upgrading, except that only existent packages are upgraded. Type the
following command at a shell prompt:

rpm -Fvh foo-1.2-1.i386.rpm

RPM's freshen option checks the versions of the packages specified on the command line against the
versions of packages that have already been installed on your system. When a newer version of an
already-installed package is processed by RPM's freshen option, it is upgraded to the newer version.
However, RPM's freshen option does not install a package if no previously-installed package of the
same name exists. This differs from RPM's upgrade option, as an upgrade does install packages
whether or not an older version of the package was already installed.

Freshening works for single packages or package groups. If you have just downloaded a large number
of different packages, and you only want to upgrade those packages that are already installed on your
system, freshening does the job. Thus, you do not have to delete any unwanted packages from the
group that you downloaded before using RPM.

In this case, issue the following command:


rpm -Fvh *.rpm

RPM automatically upgrades only those packages that are already installed.

10.2.6. Querying

The RPM database stores information about all RPM packages installed in your system. It is stored in
the directory /var/lib/rpm/, and is used to query what packages are installed, what versions each
package is, and any changes to any files in the package since installation, among others.

To query this database, use the -q option. The rpm -q package name command displays the
package name, version, and release number of the installed package package name. For example,
using rpm -q foo to query installed package foo might generate the following output:

foo-2.0-1

You can also use the following Package Selection Options with -q to further refine or qualify your
query:

o -a — queries all currently installed packages.


o -f <filename> — queries the RPM database for which package owns <filename>. When
specifying a file, specify the absolute path of the file (for example, rpm -f /bin/ls).
o -p <packagefile> — queries the uninstalled package <packagefile>.

There are a number of ways to specify what information to display about queried packages. The
following options are used to select the type of information for which you are searching. These are
called Information Query Options.

o -i displays package information including name, description, release, size, build date, install
date, vendor, and other miscellaneous information.
o -l displays the list of files that the package contains.
o -s displays the state of all the files in the package.
o -d displays a list of files marked as documentation (man pages, info pages, READMEs, etc.).
o -c displays a list of files marked as configuration files. These are the files you edit after
installation to adapt and customize the package to your system (for
example, sendmail.cf, passwd, inittab, etc.).

For options that display lists of files, add -v to the command to display the lists in a familiar ls -
l format.

10.2.7. Verifying

Verifying a package compares information about files installed from a package with the same
information from the original package. Among other things, verifying compares the size, MD5 sum,
permissions, type, owner, and group of each file.

The command rpm -V verifies a package. You can use any of the Package Verify Options listed for
querying to specify the packages you wish to verify. A simple use of verifying is rpm -V foo, which
verifies that all the files in the foo package are as they were when they were originally installed. For
example:
o To verify a package containing a particular file:
o rpm -Vf /usr/bin/foo

In this example, /usr/bin/foo is the absolute path to the file used to query a package.

o To verify ALL installed packages throughout the system:


o rpm -Va
o To verify an installed package against an RPM package file:
o rpm -Vp foo-1.0-1.i386.rpm

This command can be useful if you suspect that your RPM databases are corrupt.

If everything verified properly, there is no output. If there are any discrepancies, they are displayed.
The format of the output is a string of eight characters (a c denotes a configuration file) and then the
file name. Each of the eight characters denotes the result of a comparison of one attribute of the file
to the value of that attribute recorded in the RPM database. A single period (.) means the test
passed. The following characters denote specific discrepancies:

o 5 — MD5 checksum
o S — file size
o L — symbolic link
o T — file modification time
o D — device
o U — user
o G — group
o M — mode (includes permissions and file type)
o ? — unreadable file

If you see any output, use your best judgment to determine if you should remove the package,
reinstall it, or fix the problem in another way.

Вам также может понравиться