So, we're going to take a look at file sharing now, file servers.
We have the NFS server,
which is the traditional network file system that is used as a UNIX file server,
and honestly, we have this available to us in Linux.
We also have CIFS, or the Common Internet File System,
and this allows our Linux systems to be able to share
files through to Windows users.
We're going to start by taking a look at NFS.
The current version of NFS is NFS version 4.
It is much easier if we stick to NFS version 4 and disable other NFS versions.
When we're working with NFS version 3,
the problem is that we need multiple ports open if we want to firewall it,
so it's not firewall friendly, whereas using our NFS version 4,
if we were firewalling, we'd only need TCP port 2049 to be opened.
So to begin with, we're going to go through,
and in Red Hat Enterprise Linux 8, and of course,
that also means then our AlmaLinux system,
we've got a new utility, nfsconf,
and we can go through and write through to our configuration file with this.
So we can enable version 4.
We can set that we're using TCP.
We can set we're not using UDP, and we're not using version 3.
Version 2 would be disabled, anyway.
Once we've done that, we can go through and restart our service.
We can look at then sharing out directories.
Here we're creating an export file that is sharing out the data
sales directory through to the 192.168.33 network.
If there's no need to restart the NFS server,
we can reread our exports or our shares using the exportfs command and ‑r.
It's then going to be available to any of your clients
that want to go through and mount it.
Talking of which,
why don't we go through and look at both setting this up and then connecting to it from a client.