How to Install and Configure a Network File System (NFS) Server and Client on Ubuntu Server

Sdílet
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!!!

Komentáře • 29

  • @timothycarry
    @timothycarry Před rokem +4

    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

  • @patthe14th
    @patthe14th Před měsícem +1

    That was really well taught. Thank you

  • @NithyashreeCM
    @NithyashreeCM Před 2 měsíci

    Thank you for crisp and clear explanation......

  • @Houston123ABC
    @Houston123ABC Před rokem +1

    This was great - especially the posted commands.

  • @shadowwizzard605
    @shadowwizzard605 Před 8 měsíci +2

    i followed these exact steps, why can my clients not write in that folder?

    • @lazysysad
      @lazysysad  Před 7 měsíci +3

      I missed this step:
      On the NFS Server, do:
      chown nobody:nogroup /exports/backups/

  • @pankajjoshi8292
    @pankajjoshi8292 Před měsícem

    Sir how to do NIS so that any user can login from different terminal

  • @snake-taichi
    @snake-taichi Před 8 měsíci +1

    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.

    • @lazysysad
      @lazysysad  Před 7 měsíci +3

      I missed this step:
      On the NFS Server, do:
      chown nobody:nogroup /exports/backups/

    • @lazysysad
      @lazysysad  Před 7 měsíci +2

      NFS uses the user and group IDs (GID and UID) to establish permissions for write access.

  • @td8394
    @td8394 Před 5 měsíci

    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

  • @ronakpamnani5961
    @ronakpamnani5961 Před 5 měsíci

    Thanks sir very helpful

  • @pr0jectSkyneT
    @pr0jectSkyneT Před 7 měsíci +1

    Thanks for this. Is there a way to secure the NFS share through credential authentication (username/password)?

    • @lazysysad
      @lazysysad  Před 7 měsíci +2

      Password protection is not an integrated feature of Network File System (NFS), which normally uses host-based authentication.

    • @pr0jectSkyneT
      @pr0jectSkyneT Před 7 měsíci +1

      @@lazysysad ok thanks

  • @anand-nb4bb
    @anand-nb4bb Před rokem +1

    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

  • @dargelf
    @dargelf Před 6 měsíci +1

    great voice ;-)

  •  Před rokem +1

    Is it possible to enable file transfer compression in nfs to save bandwith?

    • @lazysysad
      @lazysysad  Před rokem

      I'm not aware if that is possible.

  • @pankajjoshi8292
    @pankajjoshi8292 Před 5 měsíci

    Sir how to do with NIS server

  • @shelly1067
    @shelly1067 Před rokem

    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

    • @lazysysad
      @lazysysad  Před rokem

      are you getting errors starting statd? or are you just suggesting to run statd to use locking?

    • @shelly1067
      @shelly1067 Před rokem

      @@lazysysad I get these when I mount filesystem from client using exports/backups /mnt