System environment
System platform: CentOS Release 6.8 (Final)
NFS Server ip:172.16.55.6
Firewall off
Selinux=disabled
Installing the NFS Package
1. See if the system is installed
[[email protected] vsftpd]$ Yum list nfs- from cached Hostfile installed packages NFS-utils.x86_64 1:1.2. 3-el6 @net
2. If NFS is not installed, install the NFS package
[email protected] vsftpd]$ Yum install-y nfs-utils
Configuring Shared Directories
[[email protected] vsftpd]$ mkdir-pv/shared/pub mkdir: Directory created " /shared " mkdir: Directory created " /shared/pub " [[email Protected] vsftpd]$ vim /etc/exports # configuration /shared/pub 172.16 . 55.7 (rw) 172.16 . 0.0 /16 (ro )
[[email protected] vsftpd]$ Exportfs-rav
-
for 172.16. 0.0/ +
Mount the file directory on another host
[[email protected] vsftpd] #mkdir/Shared[[email protected] vsftpd] #mount-T Nfs-w172.16.55.6:/shared//shared/#以读写方式挂载[[email protected] vsftpd] #dfFilesystem 1K-blocks used Available use%mounted on/dev/sda6148787220 4877916 143909304 4% /Devtmpfs1001368 0 1001368 0% /Dev ... Tmpfs203216 0 203216 0%/run/user/0172.16.55.6:/shared4908544 1396992 3255552 to%/shared # mount succeeded
NFS Combat under Linux