[ Pobierz całość w formacie PDF ]
.An RPM file, also known as a  package is a way ofdistributing software so that it can be easily installed, upgraded, queried, and deleted.RPM files contain information on the package s name, version, other file dependencyinformation (if applicable), platform (such as Intel or Alpha, etc.), as well as default fileinstall locations.The RPM utility was first developed by Red Hat and provided as an Open Sourceproduct as is common in the Linux community.Other developers picked it up andadded extra functionality.The RPM method of packaging files has become popular andis used not only on Red Hat s but on some other distributions as well.Popular Linux applications are almost always released as RPM files, usually in fairlyshort order.However, in the Unix world the defacto-standard for package distributioncontinues to be by way of so-called  tarballs.Tarballs are simply files that arereadable with the  tar utility.Installing from tar is usually significantly more tediousthan using RPM.So why would people choose to do so? Unfortunately, sometimes ittakes a few weeks for developers to get the latest version of a package converted toRPM (many developers first release them as tarballs).94 Chapter 10.Upgrading Linux and Other ApplicationsIf you start installing or upgrading your system or applications with tar, your RPMdatabase will become out-of-date and inconsistent.This isn t really a big deal (when Iused Slackware, I used tar exclusively  there was no other choice  without too muchdiscomfort), but wherever possible I try to be patient and wait until an RPM becomesavailable, or perhaps send a polite request to the developer of the package.(You canalso build your own RPM files and distribute them to others, which is sometimeshelpful to developers who don t have the ability or time to produce such filesthemselves.)A really good place to check if a piece of software is available in RPM form is theRPM repository at http://rufus.w3.org/linux/RPM/.The repository provides indexedcategories which can be helpful to locate a given RPM file, and contains pointers tothousands of such files.To query a package, use  rpm -q pkg-name (eg. rpm -q pine ).RPM will eithertell you what version of the package is already installed, or that the package is notinstalled.Assuming the package is installed already, and is an earlier version than the updatepackage you downloaded (which it should be), then you should be able to apply theupdate with  rpm -Uvh pkg-name.If all goes well, the package will beautomatically installed and immediately ready for use.If not, RPM will give you apretty good reason (for example, perhaps a supporting package needs to be upgradedfirst).This may require a bit of thinking, but problems such as these are verystraightforward to figure out.If, on the other hand, the package is not yet installed, and you decide you wish to installit, type  rpm -ivh pkg-name.If there are any supporting packages that arerequired, RPM will tell you.Sometimes, you will want to install a package that is only available in source format.Infact, unless you are installing packages from a trusted source (such as the Red Hat FTPsite), you probably should install from source in case the binaries contain a trojan horseor other nasty thing (of course, a source RPM could also contain such a thing, but theyare unlikely to because they would probably be exposed in short order by anotherdeveloper).95 Chapter 10.Upgrading Linux and Other ApplicationsThe way to install a package from source is to specify the  rebuild switch to theRPM utility.For example:rpm -ivh -rebuild foo.src.rpmThe above command would configure and compile the  foo package, producing abinary RPM file in the  /usr/src/redhat/RPMS/i386/ directory (assuming you areusing Linux on the Intel platform).You can then install the package as you normallywould.Finally, if you are having problems getting a source package to compile (perhaps youneed to modify a makefile, or change a configuration option, etc.) you can use thefollowing steps (again, illustrating our ficticious  foo package example) to compilethe source, build a new binary package, and then install from the binary package:rpm -ivh foo.src.rpmcd /usr/src/redhat/SPECSpico -w foo.specMake whatever changes you feel are needed to the .spec file, and then type:rpm -ba foo.specThis will rebuild the package using whatever changes you have made to the .spec file.As above, the resultant binary RPM file will be located in /usr/src/redhat/RPMS/i386/ , and can be installed as you normally would.You should look at the Red Hat documentation for more information on RPM [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • higrostat.htw.pl
  •