NFS shared storage (utility tool)

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)

Insert picture description here

1.4. Start the NFS service

systemctl start rpcbind
systemctl start nfs

1.5. View the local NFS shared directory

showmount -e

Insert picture description here
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

Insert picture description here

2.3. Mount

 mount -t nfs 192.168.59.136:/data /mnt/

2.4. Create a file verification in the mount directory
Insert picture description here
2.5. If there is a file just created, it means the creation is successful
Insert picture description here

Guess you like

Origin blog.csdn.net/APPLEaaq/article/details/109265022