NFS mount Redhet6.4

Log in to the server side with the root user:

1. Set the shared directory:

vi /etc/exports

/home/ftp *(rw,no_root_squash)

keep

Description: /home/ftp is the shared directory location;

*(rw,no_root_squash)  

* Can be accessed by any IP  

rw is for read and write access  

no_root_squash is the permission to have the owner of this directory.

2. Restart the NFS server

Use the service nfs start command to start the NFS service (after making any changes to /etc/exports, you need to restart the NFS service to make the changes take effect, restart the command service nfs restart)

 

3. Customer settings

mkdir /home/ftp (or other directories)

ls -l

View permissions

Mount share command:

mount -t nfs -o rw 192.168.19.13:/home/ftp /home/ftp

4. Automatically mount each time you start

If it is automatically mounted every time the machine is started, you can use the command vi /etc/fstab to edit, add 192.168.19.13:/home/ftp /home/ftp nfs defaults 0 0 at the end, save and exit.

 

Guess you like

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