Article title: configure the Network File System NFS service. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. set the shared directory
(1) set the shared directory
Run commands
# Gedit/etc/exports
Edit the nfs service configuration file (note: The file is empty when it is opened for the first time) and add the following content:
/Opt/tmp * (rw, sync, no_root_squash)
Where:
/Opt/tmp indicates the directory to be shared by nfs, which can be used as the Development Board's
File systems are mounted through nfs;
* Indicates that all clients can mount the directory.
Rw indicates that the client connected to this directory has the permission to read and write the directory.
No_root_squash indicates that the client connected to this directory is allowed to have the root identity of the host.
2. start the NFS service
You can start the NFS service in two ways: command line and graphical interface. the purpose of establishing the NFS service is
The directory sharing service is provided externally through the network, but the firewall is enabled for the default installed Fedora system, which causes the NFS server
Cannot be used normally. Therefore, first disable the firewall and enter the "lokkit" command in the command line to open the fire prevention period setting interface:
Select (*) Disabled, and then select "OK" to exit, so that the firewall is permanently Disabled.
The following describes how to start the NFS service:
(1) start and stop the nfs service through commands
Run the following command line:
#/Etc/init. d/nfs start
This will start the nfs service. you can enter the following command to check whether the nfs service is started.
# Mount-t nfs localhost:/opt/tmp/mnt/
If no error message is displayed, you can view the content in the/mnt directory and
/Opt/tmp is consistent.
Use this command to stop the nfs service:
#/Etc/init. d/nfs stop