NFS Server Setup

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.