centos7 mount nfs shared folder

1. Install nfs-utils and rpcbind

yum install nfs-utils rpcbind

2. Set the startup service

chkconfig nfs on
chkconfig rpcbind on

3. Start the service

service rpcbind start
service nfs start

4. Create a mount point

mkdir -p /mnt/share

5. Mount directory

mount -t nfs server_ip:/share /mnt/share

6. View the mounted directory

df -h

7. Unmount the mounted directory

umount /mnt/share

8. Edit /etc/fstab and mount it automatically at boot

vim /etc/fstab

# Add the following line at the end
server_ip:/share /mnt/share nfs rw,tcp,intr 0 1

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325516287&siteId=291194637
Recommended