Configure NFS in Ubuntu

Source: Internet
Author: User
1 deploy NFSServer side 11 install nfs-kernel-serversudoapt-getinstallnfs-kernel-server12 configure etchostsdenyvietchostsdeny add content in the file NFSDAEMONSportmap: ALLlockd: ALLmount 1. deploy NFS Server side 1.1 install nfs-kernel-server

Sudo apt-get install nfs-kernel-server

1.2 configure/etc/hosts. deny

Vi/etc/hosts. deny

# Add content to the file

### NFSDAEMONS

Portmap: ALL

Lockd: ALL

Mountd: ALL

Rquotad: ALL

Statd: ALL

1.3 configure/etc/hosts. allow

Vi/etc/hosts. allow

# Add content to the file

### NFSDAEMONS

Portmap: client IP address

Lockd: client IP address

Rquotad: client IP address

Mountd: client IP address

Statd: client IP address

1.4 restart portmap deamon

/Etc/init. d/portmap restart

1.5 configure/etc/exports

If you share the/home directory of 192.168.71.205 to 192.168.71.46, add

/Home 192.168.71.46 (rw, sync, no_root_squash)

Note:

(1) rw is read/write permission, and read-only is ro;

(2) sync data is synchronously written to the memory and hard disk, and async data is saved in the memory before being written to the hard disk;

(3) the no_root_squash server shares the attributes of the Directory user. if the user is root, the shared directory has the root permission.
1.6 restart the NFS service

/Etc/init. d/nfs-kernel-serverrestart

2. deploy NFS client 2.1 to install nfs-common

Sudo apt-get install nfs-common

2.2 Mount NFS

For example, Mount/home/of the 192.168.71.205 NFS server to the NFS client of 192.168.71.46 and run the following command on the machine 192.168.71.46:

Mount-t nfs-o tcp, soft, intr, timeo = 50, retrans = 12,192.168 .71.205: /home/testclient (the two directories must already exist on the two machines ).

2.3 check whether the mounting is successful

Df

2.4 uninstall

Unmount/home/testclient

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.