1. Installation
confirm that the server has rpcbind and nfs-utils installed,
[Email protected] ~]# rpm-qa |grep ' Rpcbind\|nfs '
Nfs-utils-1.2.3-54.el6.x86_64
Nfs-utils-lib-1.1.5-9.el6.x86_64
Rpcbind-0.2.0-11.el6.x86_64
Nfs4-acl-tools-0.3.3-6.el6.x86_64
if not, install with yum
2. Create a shared directory and modify permissions
Mkdir/files
chmod 777/files
3. Create a system user
Create gid=40 account nfscli to map client access
Useradd–g NSCLI
4. Edit the NFS configuration document
the configuration document for Nfs is /etc/exports and is not created manually, adding the following statement:
/files * (rw, all_squash,anonuid=40,anongid=40)
----------- The above configuration indicates that all clients have read and write permissions to the folder files, and all anonymous access is mapped to the UID=40,GID=1005 Server System account---------
RW--------- Read and write
All_squash All logged-on users are designated as nobody
Anonuid when using all_squash , you can specify the login account as the specified user ID account number .
Anougid when using all_squash , you can specify the login account as the specified group ID account number .
4. start the service
Start rpcbind Service
[Email protected] files]#/etc/init.d/rpcbindstart
Starting rpcbind: [OK]
Start the NFS service
[[email protected] Files]/etc/init.d/nfs start
Starting NFS Services:exportfs:No host name given With/files (RW), Suggest * (RW) to avoid warning
[OK]
Starting NFS quotas: [OK]
Starting NFS mountd: [OK]
Starting NFS daemon: [OK]
Starting RPC IDMAPD: [OK]
5. View shared
server-side query for NFS shared status using the showmount command
# showmount-e// View your shared services by default
[Email protected] files]# SHOWMOUNT-E
Export List for Oracle:
/files *
NFS Server Setup