1. download and install the NFS component
# Su Root
# Yum install Portmap nfs-utils
2. Open the NFS configuration file
# Vi/etc/exports
3. Add one row as follows:
/Study/upmagic6410 * (sync, RW, no_root_squash)
PS: * indicates all IP addresses. If an IP address is specified for access, it can be directly replaced with the specified IP address;
RW indicates the read/write permission;
No_root_squash indicates that when the user logging on to the NFS host using the shared directory is root, the permission will be converted to the anonymous user (nobody );
4. Save the exports
(: WQ)
5. Create a shared directory and Set permissions
# Mkdir/study/upmagic6410
# Chmod 777/study/upmagic6410
6. Disable the firewall (you can also configure the firewall)
# Setup
Uncall enable in the firewall option, save and exit
7. Configure boot and start nfs-Server
# Systemctl enable nfs-server.service
PS: Check whether nfs-server is enabled
# Systemctl is-enabled nfs-server.service
PS: the command to manually enable or disable NFS-server is
# Systemctl start nfs-server.service
# Systemctl stop nfs-server.service
10. mount NFS on other Linux Hosts
# Mount x. x:/study/upmagic6410/mnt/nfs
PS: x. x is the IP address of the NFS service.