CentOS7 set up NFS

Storage server configuration file:

Installation NFS
yum the install the rpcbind -Y-utils NFS
create a shared directory
mkdir / root / sharefile
modify directory permissions
chmod 0755 -R sharefile
modify the configuration file NFS
VI / etc / Exports
--------------- -------------
/ the root / ShareFile / 192.168.2.121 (RW, the no_root_squash, no_all_squash, Sync) 192.168.2.122 (RW, the no_root_squash, no_all_squash, Sync)
-------- --------------------
start the NFS service
systemctl start nfs
view shared directory state
showmount -e 192.168.2.120

File storage client configuration:
install NFS
yum install nfs-utils
view shared directory
showmount -e 192.168.2.120
create a shared directory
mkdir / root / sharefile
mount the shared directory
mount -t nfs 192.168.2.120:/root/sharefile / root / sharefile

Guess you like

Origin www.cnblogs.com/fourw/p/11261566.html