NFS Server Installation

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
CEU/CPE
21
Video Transcription
00:00
>> Hey Cybrarians and welcome back to
00:00
the Linux plus course here at Cybrary,
00:00
I'm your instructor Rob Goelz.
00:00
In today's lesson we're going to perform
00:00
some NFS server installations.
00:00
Upon completion of this lesson,
00:00
you are going to be able to install
00:00
NFS services on CentOS and Ubuntu.
00:00
Let's go ahead and get started with some demo time.
00:00
Here we are in our CentOS environment,
00:00
and actually here in CentOS,
00:00
NFS is already installed. Nice for us.
00:00
In order to start and enable the NFS Server,
00:00
we can do that by doing a system CTL
00:00
>> enable now on NFS dash server.
00:00
>> This is going to start and
00:00
enable it and now we can see that
00:00
the status with the system CTL status command.
00:00
We see that it is loaded,
00:00
it's enabled and it is active,
00:00
and it's exiting, which is fine because
00:00
>> it won't actually be running until
00:00
>> it's actually exporting things.
00:00
>> Now what we have to do is just that.
00:00
We have to export directories that
00:00
we want to share on this system.
00:00
What we'll do is we'll modify the file at the exports,
00:00
and we can do that by doing vim, etc exports.
00:00
We see that this file is empty.
00:00
When we're talking about working with
00:00
NFS and CentOS things have to be
00:00
>> configured from scratch.
00:00
>> The syntax here that we want to do to export is
00:00
specify first the mount point
00:00
where the export is going to be.
00:00
We create a mount point here,
00:00
we'll just call it mount NFS, export, and NFS.
00:00
Then we say the IP address range that we're going to
00:00
export from is 192.168.1.0/24.
00:00
Then we're going to make this a read-write file system
00:00
and we'll just say no red squash,
00:00
just to make things easy.
00:00
Now that we're done,
00:00
we've configured this to export
00:00
the NFS share on the system and we
00:00
can hit Escape:WQ to write and quit out of vim.
00:00
Now what we can do is we can actually
00:00
export the file system by doing
00:00
an exportfs-rav and now
00:00
that's been exported and we're good to go.
00:00
Now let's take a look at this in
00:00
our Ubuntu environment.
00:00
Here we are in our Ubuntu environment and here
00:00
we actually do need to install NFS.
00:00
Specifically what gets installed here
00:00
is NFS Kernel server.
00:00
See NFS server package.
00:00
Let's go ahead and install that and
00:00
>> we can see the process going down at
00:00
>> the bottom in our process bar.
00:00
>> Almost done, there we are.
00:00
We're back to our command prompt. Let's clear our screen.
00:00
I just hit Control L.
00:00
Now we'll do is we'll enable this as well so we'll do
00:00
a system CTL enable- -now on NFS server.
00:00
There we go, that should be enabled.
00:00
We can see that by doing a status,
00:00
system CTL status on an FS server and there it is,
00:00
yes, it is loaded and it's active
00:00
>> and again it's exited.
00:00
>> Because nothing has been exported
00:00
yet and nothing's being shared out.
00:00
Now we need to do is set up those exports.
00:00
First of all, let's go into vim, etc
00:00
and we'll go to vim, etc exports hold on one second.
00:00
We can see that we have some nice examples in here.
00:00
It's a little bit easier to work with because we
00:00
actually have some things to
00:00
look at when we're doing this.
00:00
But again, it's going to be the same thing.
00:00
We're going to do a mount NFS, EXP,
00:00
and NFS, we're just going to
00:00
fib and say that that's where this actually lives.
00:00
There's actually no mount point there.
00:00
But for the purposes of demonstration,
00:00
that's what we'll say.
00:00
Mount NFS x NFS and then we're going
00:00
to give it the IP address and range.
00:00
This isn't 192.168.1.0/24 network.
00:00
Then same thing here we'll make it a
00:00
read-write file system with no roots squash.
00:00
If you want to learn more about that stuff,
00:00
just go ahead and take a look
00:00
>> at the NFS export options.
00:00
>> You can learn all about that good stuff.
00:00
Then we're going to go ahead and hit
00:00
>> Escape and :WQ and we'll do
00:00
>> the same thing here.We're going to do an exportfs-rav.
00:00
Now you got an extra d in there.
00:00
Exportfs-rav. We'll see that that has been exported.
00:00
It exported that file system for us.
00:00
Although here it actually tells us
00:00
that we couldn't find
00:00
the subtree for NFS and that's true.
00:00
We don't have that on the system,
00:00
we're just playing around.
00:00
With that, we've reached the end of this lesson.
00:00
In this lesson we covered installing and
00:00
configuring NFS on CentOS and Ubuntu.
00:00
Thanks so much for being here and I look
00:00
forward to seeing you in the next lesson.
Up Next