NFS Server Setup under Linux

Source: Internet
Author: User

The full name of NFS is the network file system. Developed by Sun, the current mainstream version for V4,NFS monitoring on tcp2049 ports.

However, NFS is only responsible for data sharing, the connection of each host on the network and the respective IP port information is managed by another small partner, called Rpc--remote Protocol call, which is called remote procedure.

Step 1.

Pack:

Yum Install Nfs-utils

Yum Install Rpcbind

Step 2.

Configure/etc/exports

Format: Shared Path shared objects (options)

Options include: Ro,rw,sync,async,root_squash,no_root_squash,wdelay,all_squash

Where the default option is Ro,sync,wdelay,root_squash

RO: Shared directory read-only

RW: Shared directory readable and writable

Sync: Make sure that the in-memory data is completely written to disk and returned successfully.

Async: The In-memory data was not fully written to disk and returned successfully.

Wdelay: Write to disk after multiple write requests are merged

Root_squash: When the client root account is accessed, the server is displayed as Nfsnobody

No_root_squash: Client root, server side or root

All_squash: Regardless of the client account, the server side is Nfsnobody

Step3. Mounting NFS shares

Mount directory: mount-t nfs-o option server:/Directory/local Directory

Update the Fstab file to make the next reboot effective: Echo server:/directory/local directory NFS defaults 0 0>>/etc/fstab

Step4. Firewall settings

Because firewalls can only policy on specific ports, NFS and Rpcbind traffic generates random ports, and in order to secure ports, the/etc/sysconfig/nfs file needs to be configured

Limited to: Mount_port lockd_tcpport locked_udpport Statd_port

and release the 111 port of Rpcbind and the 2049 Port of NFS

Tip: Exportfs-r re-read export file

Exportfs-v Show Details

Reference: "Linux operation and maintenance of the road" Ding Mingyi

NFS Server Setup under Linux

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.