Linux with Operating System Concepts



Download 5,65 Mb.
Pdf ko'rish
bet202/254
Sana22.07.2022
Hajmi5,65 Mb.
#840170
1   ...   198   199   200   201   202   203   204   205   ...   254
Bog'liq
Linux-with-Operating-System-Concepts-Fox-Richard-CRC-Press-2014

name
where 
name
can contain wildcard 
characters.
13.4.3 APT
For Debian Linux, we have 
apt
(for Advanced Packaging Tool). Like yum, apt is a tool 
that calls upon lesser programs. There are currently projects to implement apt for Red Hat, 
but we will only report on apt in Debian. apt operates on 
deb
packages and utilizes the 
Debian-based 
dpkg
program. dpkg is like rpm while apt is like yum.
There are also variants of the dpkg: ipkg, opkg, and wpkg. The ipkg and opkg are actu-
ally the same format although opkg is no longer used and ipkg stands for “Itsy” Package 
Management System. This format is used for storage-constrained Linux environments 
such as embedded devices. The wpkg is a format used to install Debian packages for the 
Windows operating systems.
We concentrate only on apt here, leaving the readers to explore dpkg and the other 
formats on their own. apt works like yum in that it contacts one or more repositories that 
store packages. In this case, the packages are .deb packages. The file 
/etc/apt/sources.
list
stores the URLs of repositories to try. You might, for instance, find dpkg reposito-
ries at 
us.archive.ubuntu.com
or 
archive.canonical.com
. Another file, 
/etc/
apt/preferences
, is used to control preferred locations from the 
sources.list
file 
for different software versions. Retrieved packages and status information are stored in 
caches under 
/var/cache/apt/archives
and 
/var/lib/apt/lists
, respectively. 
One of the most complex components in apt is a program that performs 
topological sort-
ing
to work out interpackage dependencies and determine the order that packages should 
be installed. Topological sorting is a graph algorithm often used to organize a sequence of 
tasks such that any task that has dependencies is executed only after those dependent tasks 
are executed.
apt is not really a program itself but is instead the name given to a package that con-
tains several software maintenance tools. The primary program for software installation is 
called 
apt-get
. The apt-get program uses the following syntax:
apt-get [options] 
command package(s)
where 
command
is one of 
install

remove

update

upgrade
, or 
dist-upgrade

These are all self-explanatory except for dist-upgrade, which handles changing dependen-
cies between versions of packages. There are also commands available to check for depen-
dencies and clean the local repositories.
Aside from apt-get, there are three other apt programs of note. First, 
apt-cache
is used 
to query the APT package cache, which consists of downloaded packages and portions of 
packages. While this command will not alter the stored data, it can be used to retrieve 


Software Installation and Maintenance

545
and summarize information on what has been downloaded. Next is 
apt-file
, which 
can inspect a package to find out what specific files are included. Finally, 
apt-secure
can be used to ensure the integrity and authenticity of a package through digital signature 
checking.
While apt is a suite of programs, these programs all operate via the command line. 
Other, more recent management tools are available, which use apt just as apt draws upon 
dpkg. The popular front-end tool 
aptitude
provides a GUI-like interface (it is still text-
based with menus and mouse interaction).
Figure 13.6 provides an example of this interface. In aptitude, a number of choices are 
presented to the user to select from: 
Security Updates

Upgradable Packages

Installed Packages

Not Installed Packages

Virtual Packages

and 
Tasks
. Within any one of these categories are subcategories and subsubcategories. 
Additionally, the menus offer the ability to search for packages, resolve packages, and so 
forth.
Other GUI front-end programs are the Ubuntu Software Center (see Figure 13.3), the 
Synaptic Package Manager, and the Adept Package Manager. The Synaptic Package is 
shown in Figure 13.7. Much like the CentOS Add/Remove Software GUI, this GUI pro-
vides types of software under Sections. Clicking on a specific package provides its descrip-
tion in the lower right window.
Commands available include determining a package’s status (installed, not installed, 
upgradable), location (origin), filters (e.g., broken, community maintained, missing recom-
mends), and available architectures. Selecting a package then allows you to install, rein-
stall, upgrade, or remove the package.
FIGURE 13.6 
Debian-based aptitude interface.


546

Linux with Operating System Concepts
13.5 INSTALLATION OF SOURCE CODE
One of the greatest strengths of Linux is its openness. This comes from the availability of 
both the operating system and much of the application software in source code format. 
With the source code, individuals and organizations can make modifications to software. 
These modifications may be improvements, new features, or simply alterations of features 
available. Of course any modification to source code requires the expertise in program-
ming to first understand the source code to figure out how to make the desired changes.
Because of the availability of source code, many administrators will download software 
packages not in executable form but in the source code form. Such packages are often 
stored in tar files and then zipped (using gzip or bzip2). This allows for easy storage and 
transport (over network) of the packages. However, because most of the software we are 
dealing with consists of many files, the compilation and installation process can be very 
challenging. To simplify the operation, Linux has a suite of instructions that permit the 
system administrator to perform the installation with ease. Here, we look at this process.
Note that most open source software is written in C or C
++
. You must have installed the 
GNU’s C compiler (
gcc
) to use the approach described here. You can see if gcc is already 
installed by typing 
which gcc
. It should be installed in /usr/bin. If it is not available, you 
can install it using yum by typing 
yum –y install gcc
. Note that gcc used to solely 
compile C programs but now it can also compile C
++
code (as well as other languages; we 
discuss gcc in the next section).
FIGURE 13.7 
Debian-based Synaptic Package Manager.


Software Installation and Maintenance

547
13.5.1 Obtaining Installation Packages
The first step in installing an open source software package is to obtain the package. There 
are numerous repositories often found on websites managed by software developers of the 
software titles. For instance, the Apache webserver is available for download at 
httpd.
apahce.org
while the Squid proxy server is available at 
www.squid-cache.org
.
In addition to websites dedicated to the software product, most open source developers 
make versions of their software available via the 
SourceForge
site at 
sourceforge.
net
. This site offers thousands of open source software titles. The browse page contains the 
list of products available, sorted by popularity (number of downloads), name, last modifica-
tion, or rating. Alternatively, you can search for applications based on categories of Audio & 
Video, Business & Enterprise, Communications, Development, Home & Education, Games, 
Graphics, Science & Engineering, Security & Utilities, or System Administration.
Upon reaching some particular software’s page, you will find a variety of information 
on the software. First, you should find a download link. This link downloads an installa-
tion program while also taking you to a form whereby you can be placed on a mailing list 
for one of SourceForge’s sponsors. The software’s main page will also contain statistics of 
the number of total downloads to date and the rating of the software (on a scale of 5). You 
will find several tabs to select from that include a summary of the software, reviews, sup-
port, and latest news. There may be other tabs, including a wiki dedicated to the software, 
a list of files available, add-ons, or plugins, and ways to donate to the project.
To download the source code, select the Files tab, and from there, you are presented with 
various versions. Once you have selected the version desired (you should always look for a 
stable version, not necessarily the newest as the newest may be a 

Download 5,65 Mb.

Do'stlaringiz bilan baham:
1   ...   198   199   200   201   202   203   204   205   ...   254




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish