Linux NFS Server Setup

Source: Internet
Author: User

1.Nfs: NFS (Network File system), which is one of the file systems supported by FreeBSD, allows computers in a network to share resources across TCP/IP networks.
In an NFS application, a local NFS client application can transparently read and write to files located on the remote NFS server, just as you would access a local file.
2. Install NFS Server side:Sudoapt-get install nfs-kernel-server;
3.Configuration/etc/exports:sudo vim/etc/exports;
Ubuntu NFS allows mount directories and permissions to be defined in file/etc/exports.
The folder under the root directory/home/uploadDirectory sharing out,
Add the following line at the end of the/etc/exports file:/home/upload* (Rw,sync,no_root_squash)

*: The delegate allows all network segments to be accessed,

RW: is read and Write permission,

Sync: Data is synchronously written to memory and hard disk,

No_root_squash: is the Ubuntu NFS Client sharing the permissions of the directory user, if the client is using root users, that for the shared directory, the client has Root privileges.
4. NFS Restart Service
$sudo/etc/init.d/portmap Restart
$sudo/etc/init.d/nfs-kernel-server Restart
5. Test Ubuntu NFS
You can now run the following command to display the shared directory: $showmount-E
Alternatively, you can use the following command to mount it on a local disk, such as/home/uploadMount
To/mnt: $sudo mount-t NFS 192.168.1.117: /home/upload    /home/upload
You can run the DF command to see if the mount succeeds.write file, boot automatically mount. /etc/fstab192.168.1.117:/home/upload/home/upload NFS RW 0 0

(This creates the directory under the/mnt directory, which also appears under/home/upload)
After viewing, you can uninstall by using the following command: $ sudo umount/home/upload
Note: When using the uninstall command, exit the mounted directory before performing the uninstall command, otherwise the device is busy and cannot be uninstalled

Linux NFS Server Setup

Related Article

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.