Page 138 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 138
Network Operating Systems-I
notes configuration files, RPM makes a copy of the file, appends .rpmsave onto the end of it, then erases
the original. Finally, after removing all files from your system and the RPM database, it removes
the package name from the database.
Be very careful about which packages you remove from your system. Like most Linux utilities,
RPM assumes omniscience and will silently let you shoot yourself in the foot. Removing the
passwd or kernel package would be devastating.
getting and unpacking the package
If a program is not packaged, it will usually come as a compressed archive. The archive may
contain source code, precompiled binaries, and/or scripts.
All of these will need to be installed before they can be run. Source code will need to be compiled.
Precompiled binaries and scripts will just need to be installed into the correct locations.
Scripts need an interpreter to be installed on the system they will run on – most Linux systems
will already have interpreters for the most common scripting languages. Some scripts can be
interpreted by a Linux shell.
Download the archive file, and put it in its own directory in /tmp. Then cd to that directory,
and run the appropriate un-archive and decompress commands. Run the last extension first, so
if a file is called filename.tar.gz, you should ungzip it before you untar it. Software that isn’t in a
package is usually in some sort of archive. The most common archiving system is tar. Archives
are then usually compressed, with one of the zip family of compression tools.
While the zip family of tools bear the same name as the Windows zip compression tools, they are
only loosely related.
Tarred archives have the file extension .tar. To untar a file, run the command: tar -xvf (file
name)
Zipped compressions have the file extension .zip. To unzip a file, run the command: unzip (file
name)
Gzipped compressions have the file extension .gz, .Z, .z, .taz and .tgz. To ungzip a file, run the
command: gunzip (file name)
Bzipped compressions have the file extensions .bz, .bz2, .tbz or .tbz2. To unbzip a file, run the
command: bunzip2 (file name)
There may be other archive formats, or other things to be done before compiling or installing the
software. If there is anything unusual to be done, there should be instructions on the site where
you found the software, or with the downloaded file.
Did u know? What is the most common archiving system?
7.3 Querying rpm package
One of the strengths of RPM is that, ideally, it accounts for every system or application file on
your system. Using RPM’s query mode, you can determine which packages are installed on your
system or which files belong to a particular package. This can be a big help if you want to locate
a file that belongs to a certain package. Query mode can also be used to identify which files are in
an RPM file before you install it. This lets you see the files that are going to be installed on your
system before they are actually written.
132 LoveLy professionaL university