Purpose:
1. Share files on the server
2. Access the NFS shared directory on the client
3. Realize the home page modification on the
server Server: 192.168.59.136
Client: 192.168.59.137
(Turn off the firewall)
1. Server shared directory
1.1. Server install nfs- utils, rpcbind
yum -y install nfs-utils rpcbind
1.2. Create a shared directory data
mkdir -p /data
1.3. Modify the shared resources in the exports file
vim /etc/exports
/data 192.168.59.0/24(rw,sync,no_root_squash)
1.4. Start the NFS service
systemctl start rpcbind
systemctl start nfs
1.5. View the local NFS shared directory
showmount -e
2. Client access NFS shared resources
2.1. Client install nfs-utils, rpcbind
yum -y install nfs-utils rpcbind
2.2. View the NFS server shared directory
showmount -e 192.168.59.136
2.3. Mount
mount -t nfs 192.168.59.136:/data /mnt/
2.4. Create a file verification in the mount directory
2.5. If there is a file just created, it means the creation is successful