NFS (Network File System) that is a network file system, FreeBSD is a supported file system, which allows sharing of resources between computers on the network. In the application of the NFS, the NFS client's local application can transparently read and write files located on a remote NFS server, just like access local files.
Experiments require two machines, as one 服务端
, as a客户端
Server installation and two packages nfs-utils rpcbind
yum install -y nfs-utils rpcbind
Profiles allow shared hosting IP vim / etc / exports
/home/nfstestdir 192.168.43.0/24(rw,sync,all_squash,anonuid=1000,anongid=1000)
After saving the configuration file
is first created 共享目录
, to create the directory 777
mkdir / Home / nfstestdir
chmod 777 / Home / nfstestdir
Start rpcbind server systemctl start rpcbind
start nfs
systemctl start nfs
Set boot from the start
systemctl enable nfs
turn off the firewall
systemctl STOP firewalld
setenforce 0
Client, installation package nfs-utilsyum install -y nfs-utils rpcbind
Start rpcbind systemctl start rpcbind
start nfs
systemctl Start nfs
Client-side IP connection service
Being given
off the firewall
systemctl STOP firewalld
setenforce 0
shared directory is mounted server-side
mount -t nfs 192.168.106.128:/home/nfstestdir / mnt
with df -h test
If you want to restart the nfs service need to cancel mnt mount
umount / mnt