NFS configuration can be completed in many system environments. Here we will mainly explain how to perform this operation in embedded systems. We all know that embedded systems are mostly used for the Development Platform of Linux systems. Therefore, the NFS configuration we are explaining today is based on this platform.
NFS configuration is a simple way to implement communication and access between two machines. In the embedded Linux experiment, we Configure NFS to implement access between the PC and the ARM-Linux platform in the experiment box.
The principle is to enable the LFS service in PC Linux and set a shared directory (here/arm2410). All source code editing changes can be easily modified in PC, in the ARM-Linux experimental environment, remotely mount the/arm2410 directory of PC-Linux to the local machine to implement synchronous read/write access between the two machines, in this way, the program can conveniently run the test in ARM-Linux. simply put, the purpose is to set up a shared directory, edit it in PC-Linux, and run debugging in ARM-Linux.
NFS configuration process: (NFS is installed by default, and the IP address of PC-Linux is 192.168.136.6)
1. # After ntsysv is run, select the nfs option to cancel the [] iptables Option
2. Run the security level and firewall to set the security level. Firewall: Disable
3. Run server settings-NFS to add NFS.
Directory:/arm2410;
HOST: 192.168.136 .*;
Basic permissions: read/write; ----- rw
General options: default (select Sync write request); ------- sync
User Access: the remote root directory user is selected as the local root directory user; -------- no_root_squash
Manual modification:
# Cat>/etc/exports <"EOF"
>/Arm2410 192.168.136. * (rw, sync, no_root_squash)
4. Simple testing of NFS configuration
Mount/arm2410 of PC-Linux to the/mnt directory through remote access, and check whether the/arm2410 content is in the/mnt directory. If yes, the configuration is successful.
# Mount 192.168.136.6:/arm2410/mnt
# Ls/mnt
Note: You can also choose not to set the firewall level. In this article, it is set to reduce firewall blocking and mount failure occurs.