NFS Server installation and configuration in Ubuntu

Source: Internet
Author: User
Tags parent directory server installation and configuration

I. Execution of orders

sudo apt-get install Nfs-kernel-server

Second, to create the NFS folder

sudo mkdir/usr/nfs

Change directory permissions:sudo chmod 777/usr/nfs

Third, configure NFS

Execute command:sudo vim/etc/exports

Add the following statement in the configuration file:

/usr/nfs * (Rw,sync,no_root_squash,no_subtree_check)

/USR/NFS: Directory shared with the NFS service client, this path must match the path of the file you set up earlier!

*: Allow all network segments to be accessed or use specific IP

RW: Clients hooking up this directory have read and write access to the shared directory

Sync: Data is written to memory and hard disk synchronously

No_root_squash:root users have full administrative access to the root directory.

No_subtree_check: The permissions of the parent directory are not checked.

Save exit after the modification is complete.

Iv. execution command:sudo/etc/init.d/portmap Restart Restart the Portmap service. NFS is an RPC program that needs to map a good port before using it and set it through Portmap.

V. Execute command:sudo/etc/init.d/nfs-kernel-server Restart Restart the NFS service.

At this point, the NFS server installation configuration is complete.

The next test is:

WINDWOS Mount Linux Host NFS

Open or close Windows features->nfs client by opening Control Panel, programs, and so on

Tick the NFS client, which opens the Windows NFS Client service.

Second, Win+r->cmd

Mount 192.168.2.101:/usr/nfs Z:

Successfully mounted, open my brain, you can see the Mount Z: Disk.

Note: If not mounted successfully, remember to release the firewall!

Parameter meaning:

Mount: Mount command

192.168.2.101:linux Host IP

NFS Service share directory in/usr/nfs:linux host

Z: You mount the network file disk (may conflict with other disks, can be arbitrarily changed)

Un-mount:

Directly inside my Computer mouse click Unmap network drive Z:

Or: Win+r->cmd

Input: Umount z:

(umount-a cancel all network drives)

NFS Server installation and configuration in Ubuntu

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.