Birmingham mumbai


Adding additional repositories



Download 15,21 Mb.
Pdf ko'rish
bet134/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   130   131   132   133   134   135   136   137   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

Adding additional repositories
Software repositories are 
essentially URLs in a text file, stored in one of two places. 
The main Ubuntu repository list is stored in 
/etc/apt/sources.list
. Inside that 
file, you'll find a multitude of repositories for Ubuntu's package manager to pull 
packages from. In addition, files with an extension of 
.list
 are read from the  
/etc/apt/sources.list.d/
 directory and are also used whenever you use 
apt
. I'll 
demonstrate both methods.


Managing Software Packages
[
 92 
]
A typical repository line in either of these two files will look similar to the following:
deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted 
The first section of each line will be either 
deb
 or 
deb-src
, which references whether 
the 
apt
 command will find binary packages (
deb
) or source packages (
deb-src
) there. 
Next, we have the actual URL that 
apt
 will use in order to reach the repository. In 
the third section, we have the codename of the release; in this case, it's 
focal
 (which 
refers to the codename for Ubuntu 20.04, 
Focal Fossa
).
Continuing, the fourth section of each repository line refers to the 
Component
, which 
references whether or not the repository contains software that is free and open 
source, and is supported officially by Canonical (the company that oversees Ubuntu's 
development). The component can be 
main

restricted

universe
, or 
multiverse

Repositories with a 
main
 component include officially supported software. This 
generally means that the software packages have source code available, so Ubuntu 
developers are able to fix bugs. Software marked 
restricted
 is still supported 
but may have a questionable license. 
universe
 packages are supported by the 
community, not Canonical themselves. Finally, 
multiverse
 packages contain 
software that is neither free nor supported, which you would be using at your own 
risk.
As you can see from looking at the 
/etc/apt/sources.list
 file on your server, it's 
possible for a repository line to feature software from more than one component. 
Each repository URL may include packages from several components, and the way 
you differentiate them is to only subscribe to the components you need for that 
repository. In our previous example, the repository line included both 
main
 and 
restricted
 components. This means that, for that particular example, the 
apt
 utility 
will index both free (
main
) and non-free (
restricted
) packages from that repository.
You can add new
 repositories to the 
/etc/apt/sources.list
 file (and it will function 
just fine), but that's not typically the preferred method. Instead, as I mentioned 
earlier, 
apt
 will scan the 
/etc/apt/sources.list.d/
 directory for text files ending 
with the 
.list
 extension. These text files are formatted the same as the 
/etc/apt/
sources.list
 file in the sense that you include one additional repository per line, but 
this method allows you to add a new repository by simply creating a file for it, and 
you can remove the repository by simply deleting that file. 
If you weren't already aware, the codename for each Ubuntu 
release is based on an animal. The fossa is an animal from 
Madagascar that somewhat resembles a cat but with curved ears. If 
you didn't already know that, now you do.


Chapter 3

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   130   131   132   133   134   135   136   137   ...   482




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