Repositories (Demo)

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
21 hours 25 minutes
Difficulty
Intermediate
Video Transcription
00:00
>> Hey there Cybrarians and welcome back to
00:00
the Linux plus course here at Cybrary.
00:00
I'm your instructor Rob Gills,
00:00
and in today's lesson we're going to
00:00
be discussing repository commands.
00:00
Upon completion of today's lesson,
00:00
you're going to be able to create a repository file in
00:00
CentOS and also list in sync repositories.
00:00
Let's get after it with some demo time.
00:00
[NOISE] Here we are in our CentOS environment,
00:00
and remember from what we
00:00
talked about in the previous lesson,
00:00
in order to add a repository,
00:00
we have to add a repository file.
00:00
In CentOS, there are
00:00
a lot of different repository files.
00:00
We can see those all in etc/yum.repos.d.
00:00
If we do an LS, we can see all of
00:00
the different files here for each and every repo.
00:00
We're going to create a test repo.
00:00
Let's just create one here and we'll call it
00:00
test.repo [NOISE] In this file,
00:00
the first thing we're going to need to do is
00:00
add a section name,
00:00
is going to be the name of our repository and we'll
00:00
call it my Test Repo.
00:00
Then we need to give it a name as well in
00:00
the next line down, descriptive names,
00:00
we'll call it name equals My Test Repo for EPEL.
00:00
Because what we're going to do is we're
00:00
going to add a base URL
00:00
here for Fedora EPEL,
00:00
Extended Packages for Enterprise Linux.
00:00
Let me grab that real quick.
00:00
I'm going to paste it in here
00:00
just because it's a little bit easier.
00:00
We have base URL equals https,
00:00
dl fedora project pub epel//pel release.
00:00
So extended packages for Enterprise Linux.
00:00
We're not going to GPG check on this because I
00:00
verified where it's coming
00:00
from and I'm not too concerned,
00:00
it's just a demo system.
00:00
Then the last thing we need to do is enable this.
00:00
We can just hit "Enable equals 1"
00:00
and enable this sucker and we're good to go.
00:00
Now, let's go ahead and escape
00:00
WQ to write and quit out of this file,
00:00
and now we're good to go.
00:00
We've created a repository.
00:00
Now, that we've created the repo,
00:00
we can see this by running yum repo list.
00:00
Now, what we're going to see is down here at the
00:00
bottom, my Test Repo, my Test Repo for EPEL.
00:00
Now, we should also sync
00:00
this to get all the repository information
00:00
updated and know about the packages that
00:00
are available in that new repo.
00:00
We could do that using the command yum reposync.
00:00
If we let this run, what it's going to do is
00:00
it's going to sync all the repositories,
00:00
including the one that we just created.
00:00
Now, in this case, I don't have the proper file here.
00:00
Apparently I didn't use to
00:00
hot job copy it, but in general,
00:00
that's how that would work
00:00
and that's pretty much all we need to know for
00:00
working with packages and
00:00
creating repos inside of CentOS.
00:00
That's all that we need to know for
00:00
creating repos inside of CentOS.
00:00
In today's lesson, we covered
00:00
how to create a repository file
00:00
in CentOS and how to view in sync repository files.
00:00
Thanks so much for being here and I look
00:00
forward to seeing you in our next lesson.
Up Next