Tyler Chris - Fedora Linux стр 56.

Шрифт
Фон

1:httpd ########################################### [100%]

The change is recorded in the RPM database, so querying the database will show the actual, installed paths:

# rpm -ql httpd

/etc/httpd

/etc/httpd/conf

/etc/httpd/conf.d

/etc/httpd/conf.d/README

/etc/httpd/conf.d/welcome.conf

...(Many lines snipped)...

/usr/share/html/icons/world1.png

/usr/share/html/icons/world2.gif

/usr/share/html/icons/world2.png

Relocating files does not change configuration files, scripts, or programs that expect files to be located in particular locations. In the httpd example just shown, the Apache configuration files (/etc/httpd/conf/httpd.conf plus module-specific files in /etc/httpd/conf.d/* ) must be edited by hand to reflect the new document root.

Table 5-4. rpm package-removal (erase) options

OptionDescription
--allmatchesErases all packages matching the name given (useful if more than one version is installed).
--nodepsProceeds with the package removal even if doing so will break some dependencies for other packages.
--noscriptsPrevents removal scripts in the package from running.
--notriggersPrevents trigger scripts in other packages from running.
--repackageRepackages the files being removed so that the removal can be undone (rolled back). See Lab 5.4, "Rolling Back a Package Installation, Upgrade, or Removal."
--testChecks for conflicts and potential problems, but does not make any actual changes to the system.

5.2.2. How Does It Work?

name - version - packagerelease . arch .rpm

in which:

name

The name of the software in the package.

version

The software's version number.

packagerelease

The package version number; if one version of the software has been packaged a few times (for example, with different file locations, scripts, triggers, or sample data), this number is incremented while the software version number is left unchanged.

arch

The architecture for which the package is compiled ( i386 , x86-64 , or PPC ). For packages that are not compiled (such as Perl, PHP, or bash scripts) or packages that contain only data (such as a font set), noarch is used; for source packages, the architecture is set to src .

rpm goes through many steps when performing an installation or upgrade/freshen:

1. The viability of the operation requested is analyzed. rpm tests the available disk space, dependencies, installed packages, and package integrity to ensure that the operation can be successfully completed. If not, the user is informed and rpm aborts execution.

2. The RPM database is queried to see if any installation trigger scripts in other packages are triggered by the installation, and if so, they are executed.

3. The preinstallation script in the package is executed.

4. The package files are installed. Required directories are created, relocations are performed, and permissions and ownership are adjusted.

5. The postinstallation script in the package is executed.

6. If the operation being performed is not an upgrade or freshen, rpm exits because there isn't an older version of the package to uninstall.

7. The RPM database is queried to see if any uninstallation trigger scripts in other packages are triggered by the removal of the old package, and if so, they are executed.

8. The pre-uninstallation script in the package is executed.

9. If repackaging has been selected, the old package files and metadata are used to construct an RPM, which is placed in /var/spool/repackage .

10. The obsolete files from the old package are deleted.

11. The post-uninstallation script in the package is executed.

12. The RPM database is queried to see if any post-uninstallation trigger scripts in other packages are triggered by the removal of the old package, and if so, they are executed.

13. The RPM database is updated to reflect what was done during the transaction.

There are four opportunities for scripts to run. This permits configuration files to be backed up before new packages are installed, services to be stopped before upgrading and restarted after, and configuration data to be copied from the old to the new package. There are also three opportunities for trigger scripts to run.

Each RPM operation is called a transaction . All of the packages processed in one operation are called a transaction set ; this may include a large number of packages. For example, an update transaction could include dozens of packages processed at one time. In the RPM database, a transaction set identifier (TID) is used to tie together all of the packages processed in the same transaction set. The TID currently used is the time in seconds since the start of the 1970s (called a utime ).

5.2.3. What About...

5.2.3.1. ...installing multiple versions of a package?

# rpm -q httpd

httpd-2.0.54-10.2

# rpm -i --force httpd-2.0.54-10.i386.rpm \ --relocate/=/var/compare/httpd-old

# rpm -q httpd

httpd-2.0.54-10.2

httpd-2.0.54-10

This will install the old version of httpd into /var/compare/httpd-old so that you can compare that installation with the current one.

Ваша оценка очень важна

0
Шрифт
Фон

Помогите Вашим друзьям узнать о библиотеке