Talk today about NFS Configuration, NFS Shared service provides shared services between Linux and Unix
1. Packages
Nfs-utilsPortmap
2. master configuration file
/etc/exports
3. Installation
Rpm-q nfs-utils Portmap or NFS with yum-y install
[Email protected] ~]# Cat/etc/exports
/root 192.168.10.20 (Rw,sync,no_root_squash)
/USR/SRC 192.168.10.0/24 (Rw,async,all_squash)
A. Start the service
[Email protected] ~]# service Portmap restart
[[Email protected] ~]# Service NFS Restart
[Email protected] ~]# chkconfig Portmap on
[[email protected] ~]# chkconfig NFS on
B. Setting directory Permissions
[[email protected] ~]# setfacl-m u:nfsnobody:rwx/usr/src///Nfsnobody to rwx users
C. Client-side testing
[Email protected] ~]# showmount-e 192.168.10.10
Export list for 192.168.10.10:
/root 192.168.10.20
/USR/SRC 192.168.10.0/24
[[email protected] ~]# mkdir-p/data/{src,root}
[[email protected] ~]# mount-t NFS 192.168.10.10:/root//data/root///-t NFS can be omitted
[Email protected] ~]# mount-t NFS 192.168.10.10:/usr/src//data/src/
[Email protected] ~]# Touch/data/root/file1.txt
[Email protected] ~]# Touch/data/src/file1.txt
[Email protected] ~]# ls-l/data/{root,src}/file1.txt
-rw-r--r--1 root root 0 11-19 17:36/data/root/file1.txt
-rw-r--r--1 nfsnobody nfsnobody 0 11-19 17:36/data/src/file1.txt
NFS configuration complete, if you have any questions can leave a message, hope to help everyone
NFS Service Configuration