How to Install and Configure a Network File System (NFS) Server and Client on Ubuntu Server
Vložit
- čas přidán 26. 08. 2024
- In this video, you will learn how to set up an Network File System (NFS) Server on Ubuntu 22.04 LTS Server. I will also show you how to mount an NFS file system on the client machine.
Join this channel to get access to perks: www.youtube.co...
PLEASE SUBSCRIBE :)
PLEASE HIT LIKE IF IT HELPED :)
GIVE SUPPORT - / lazysysad
BUY ME A COFFEE - www.buymeacoff...
PAYPAL - paypal.me/lazy...
LINKS:
How to Install Ubuntu 22.04 LTS Server - • How to Install Ubuntu ...
Steps:
NFS Server
apt update
apt -y install nfs-kernel-server
systemctl status nfs-server
mkdir /exports
mkdir /exports/backups
vi /etc/exports
/exports/backups 192.168.0.127(rw,sync,no_subtree_check)
exportfs -ar
exportfs -v
ufw allow from 192.168.0.127 to any port nfs
NFS Client
apt -y install nfs-common
mkdir /mnt/backups
mount 192.168.0.126:/exports/backups /mnt/backups
vi /etc/fstab
192.168.0.126:/exports/backups /mnt/backups nfs auto,nofail,noatime,nolock,tcp,actimeo=1800,_netdev 0 0
Drop me your feedback and comments below.
That's all for now.
If this video helped you in any way, please like share and subscribe!
Thank you!!!
One of the clearest explanations I have seen in such a reasonable time-frame. I know the title says Ubuntu so this is just a small rant. The instructions also worked on Mint. CachyOS but not Fedora 38 and has driven me crazy. You could mount from the command line but fstab never worked. I gave up and just mounted with systemd
That was really well taught. Thank you
You're very welcome!
Thank you for crisp and clear explanation......
You are welcome
This was great - especially the posted commands.
Glad it helped!
i followed these exact steps, why can my clients not write in that folder?
I missed this step:
On the NFS Server, do:
chown nobody:nogroup /exports/backups/
Sir how to do NIS so that any user can login from different terminal
Now I'd like to understand, how the client gets permission to write into that folder. In my case, after following the video, no user on the client is able to write anything unfortunately.
I missed this step:
On the NFS Server, do:
chown nobody:nogroup /exports/backups/
NFS uses the user and group IDs (GID and UID) to establish permissions for write access.
Why do we get incorrect size on client sever after mounting the partition on it , eg i have a 1tb partition but when i mount it on client machine it only shows me 70gb out of which only 10gb available, even though the partition is new with out any data in it
Thanks sir very helpful
Most welcome
Thanks for this. Is there a way to secure the NFS share through credential authentication (username/password)?
Password protection is not an integrated feature of Network File System (NFS), which normally uses host-based authentication.
@@lazysysad ok thanks
Hi can your please make a video on explaining when and why are these files used in simple terms /etc/resolve.conf, /etc/hosts, /etc/nsswitch.conf if and //etc/named.conf you can show a practical usage it will be great. Please its a request. Please do reply
Great suggestion!
great voice ;-)
Thank you! 😃
Is it possible to enable file transfer compression in nfs to save bandwith?
I'm not aware if that is possible.
Sir how to do with NIS server
each time I get: rpc.statd not running but is required for remote locking, either use '-o nolock' to keep locks local, or start statd, Operation not permitted
are you getting errors starting statd? or are you just suggesting to run statd to use locking?
@@lazysysad I get these when I mount filesystem from client using exports/backups /mnt