The httpd package normally places the DocumentRoot (start of the HTML document tree) in /var/www ; to change this to /usr/share/html , use the --relocate option:

# rpm -ivh --force --relocate /var/www=/usr/share/html/ httpd-2.0.54-10.i386.rpm

Preparing... ########################################### [100%]

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.

The options for erasing software are a subset of the options for installing and upgrading; the most useful options are listed in Table 5-4 .

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

Option Description
--allmatches Erases all packages matching the name given (useful if more than one version is installed). 
--nodeps Proceeds with the package removal even if doing so will break some dependencies for other packages. 
--noscripts Prevents removal scripts in the package from running. 
--notriggers Prevents trigger scripts in other packages from running. 
--repackage Repackages 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.' 
--test Checks for conflicts and potential problems, but does not make any actual changes to the system.

5.2.2. How Does It Work?

RPMs are named using the pattern:

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

Вы читаете Fedora Linux
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату