As a system administrator,
at times you'll be responsible for controlling
and managing the repositories
that we're going to use for our software packages.
In previous lessons, we went over how to use yum
to manage these packaged softwares.
But in this example, we're going to actually configure
the software that we have stored on our local machine
and make it available to other servers.
So first we're going to configure a local store
so we're able to pull from us locally.
And then we're also going to create a repository
so other servers can pull from us
within our local area network.
So the first thing we want to do, we're just going to browse,
going to list out the current packages that we have
on the system.
Okay, so we see we have the corn shell
and we have the very secure file transfer protocol.
So what we're going to do
is we're going to make those available locally,
and we're also going to make those available centrally
to other servers.
The first thing we need to do is to create repo.
So that's going to be the create repo command.
I'm going to use this folder as the location.
Okay.
That was quick and easy.
So all this does is it designates that directory
as a yum repository.
So we're going to actually configure this repository.
So we're going to do sudo.
We're going to vim.
We want to edit this text
and we're going to do yum
dot repost
dot D.
We're going to call this one local repo.
Okay, so this dot repo is going to designate it
as that type of file.
And this first line is going to be for the identification
of that actual repository.
And that's going to have the human readable name
for us to identify ourselves
local
that's great.
Okay.
Then we're going to do the base URL,
how to actually locate this file.
Packages,
going to enable this so we have to actually let the system know
that it's able to be used security feature.
GPG check stands for the good new privacy guard.
And what that does is it creates a fingerprint.
If you're thinking like shaw one from the integrity side.
So we'll know if we're actually getting the right repository
instead of a wrong one
or something that could be manipulated by threat actors.
All right, so that's it for that.
Going to right quit this.
And let's go ahead and clean the cache.
It's always good practice to clear the cache
just to make sure everything is nice and neat
whenever we're ready to initiate our repositories.
And so we're going to do the yum repo list.
Just need to verify that the one we just created,
our local repo, is actually listed under the repo list.
And if you can see, about four lines down,
that our local repository was successfully created.
Okay, so next thing we're going to go ahead
and just try to install this, right?
We're going to use a yes option.
That gives us yes to all the prompts.
We'll go ahead and enable the repo
as part of the installation.
I'm going to designate the local repo.
I'm going to install KSH.
Now again, typically we don't have to do the enable command
because if you look at our folder,
we had it enabled by default.
But in some systems, for security purposes,
we'll have these repos disabled so that'll be a way
if we were in that particular environment
to turn it on just for that installation.
Okay, we see it went through successfully.
So the next thing we're going to do is actually
set this up for a central repository.
But we we have to have an Apache server running
to be able to handle the http request.
So we're going to just going to do sudo then yum
and we're going to yes to those options.
And we're going to install the http daemon.
All right.
I'm going to go back to our system control
just to turn this service on.
Okay.
Let's just make sure this is
running for us.
All right.
We see it's running.
So what we need to do next
is to designate the Apache service as a repository.
First thing we need do is link this.
We'll do a soft link or symbolic link,
the packages.
And the location of this is WWW
HTML
packages.
Okay, so now we have a soft link to the packages file.
So whenever someone tries to access the ACML packages
which our ACTP server will be responding to
they'll be able to access the information that's linked
to the packages file that we established earlier
that continues the corn shell
and the very secure file transfer protocol daemon.
Let's go and create the repository.
All right.
And then again,
we're going to have to go through
and create that configuration file.
I'll do sudo vim
and put in etc
yum repos,
call it internal
repo.
Okay (indistinct).
The name of it's going to be the ID internal repo
human readable name
internal
repository
base URL.
Now it's going to be different from before
'cause we're going to use the http protocol,
the local host
packages
do our good new privacy guard check.
That's equal to
(indistinct).
Escape
quit
(indistinct).
Yum
clean all.
Now it's time to see if we actually got that thing going.
All right, looks like that was successfully created
internal repo
internal repository four down.
Now there'll be one more configuration that we have set.
It's going to be sudo
set enforce to zero.
And what that does is it disables the se Linux.
It's an access control mechanism
that would otherwise prevent access the web hosted packages.
So it's just something that we have to care of.
Now, let's see if we're able to access it from the web.
So we're going to do Firefox.
I'm going to do HTTP
local host
(indistinct)
and we're going to go packages.
And we should see this open our web browser
and have a list of the
packages on display.
All right.
We see our corn shell there
and our very secure file transfer protocol.
So now this is accessible via the ATTP protocol.
All right, we'll close that.
And for security purposes, we're going to put this back to one.
Okay, that's that.
We went through how to configure repositories
both locally and centralized for other service to access.
So thank you for sticking me through this walkthrough,
and I'll see you in the next lesson.