Installing NFS Server and Client on LinuxMint 19.3 / ubuntu 20.04
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Network File System (NFS) is a distributed file system protocol that allows you to share remote directories over a network. With NFS, you can mount remote directories on your system and work with the files on the remote machine as if they were local files.
Configure NFS Server To share directories on your Network. This example is based on the environment like follows.
+----------------------+ | +----------------------+
| [ NFS Server ] |192.168.1.30|192.168.1.10| [ NFS Client ] |
|www.yourdomain.com +----------+----------+ www.example.com |
| | | |
+----------------------+ +----------------------+
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lsb_release -cd ; getconf LONG_BIT ; hostname ; hostname -I
apt update ; apt install -y build-essential net-tools curl git software-properties-common
Configure NFS Server -
apt install nfs-kernel-server -y
nano /etc/exports
# write settings for NFS exports
# for example, set [/home/nfsshare] as NFS share
/home/nfsshare 192.168.1.0/24(rw,no_root_squash)
mkdir /home/nfsshare ; systemctl restart nfs-server
Configure NFS Client -
apt update ; apt install -y build-essential net-tools curl git software-properties-common nfs-common
mount -t nfs 192.168.1.30:/home/nfsshare /mnt
df -h
mount -t nfs -o vers=3 192.168.1.30:/home/nfsshare /mnt
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lsb_release -cd ; getconf LONG_BIT ; hostname ; hostname -I
apt update ; apt install -y build-essential net-tools curl git software-properties-common
Configure NFS Server -
apt install nfs-kernel-server -y
nano /etc/exports
# write settings for NFS exports
# for example, set [/home/nfsshare] as NFS share
/home/nfsshare 192.168.1.0/24(rw,no_root_squash)
mkdir /home/nfsshare ; systemctl restart nfs-server
Configure NFS Client -
apt update ; apt install -y build-essential net-tools curl git software-properties-common nfs-common
mount -t nfs 192.168.1.30:/home/nfsshare /mnt
df -h
mount -t nfs -o vers=3 192.168.1.30:/home/nfsshare /mnt
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment