Linux Step 16_Install NFS Service

NFS (Network File System) is a distributed file system implemented on the network, which allows files and resources to be shared between different operating systems and devices .

In the created Linux directory, create another "nfs" folder for use by the nfs server, so that "our development board" can access this "nfs" folder through the " network file system " .

1. Before installation, check that the virtual machine can access the Internet, otherwise the installation may fail.

2. In the virtual machine interface, right-click the mouse and the following dialog box will pop up.

3. Click "Open Terminal (E)" to get the following interface:

 

4. Enter "sudo apt-get install nfs-kernel-server rpcbind and press Enter" to prepare to install nfs-kernel-server;

5. Enter the password "123456 and press Enter" to get the following interface:

 6. In the user root directory, create a folder named "linux" , as shown in the figure below:

1) Enter "ls and press Enter" to list the files and folders in the current directory;

2) Enter "mkdir linux and press Enter" to create a linux folder;

3) Enter "ls and press Enter" to list the files and folders in the current directory;

7. In the "linux" folder, create another "nfs" folder.

The created nfs folder is used by the nfs server. In the future, we can access the nfs folder through the network file system on the development board.

See the operation below:

1) Enter "cd linux and press Enter" to enter the linux directory;

2) Enter "mkdir nfs and press Enter" to create the nfs folder;

3) Enter "ls and press Enter" to list the files and folders in the current directory and find that there is an nfs folder in the linux directory.

 8. View the full path of nfs, as shown in the figure below:

1) Enter "cd nfs and press Enter" to enter the nfs directory;

2) Enter "ls and press Enter" to list the files and folders in the current directory

3) Enter "pwd and press Enter". pwd is the abbreviation of the phrase print working directory , which means printing the working directory;

 9. Enter " sudo vi /etc/exports and press Enter" to open the nfs configuration file /etc/exports ;

10. Enter the password "123456 and press Enter" to get the following interface:

 

 11. When opening the nfs configuration file /etc/exports, press A to allow modification, so enter " /home/zgq/linux/nfs *(rw,sync,no_root_squash,no_subtree_check)

",See below:

12. Press the "ESC" key, enter " :wq and press Enter " to save and exit.

13. Enter " sudo /etc/init.d/nfs-kernel-server restart and press Enter" to restart the NFS service.

 

 

Supongo que te gusta

Origin blog.csdn.net/weixin_42550185/article/details/135407811
Recomendado
Clasificación