Linux NFS Server Build _php Tutorial

Source: Internet
Author: User

Linux NFS Server Setup


1. NFS:NFS (Network File system), a networked filesystem, is one of the file systems supported by FreeBSD that allows computers in the 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.
Share the folder/home/student/xushan directory under the root directory,
Add the following line at the end of the/etc/exports file:/home/student/xushan * (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, then 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
Or you can use the following command to mount it on a local disk, for example, to mount a/home/student/xushan
To/mnt: $sudo mount-t NFS 192.168.1.117:/home/student/xushan/mnt
You can run the DF command to see if the mount succeeds.
(This creates the directory under the/mnt directory, which also appears under/home/student/xushan)
After viewing, you can uninstall by using the following command: $ sudo umount/mnt
Note: When using the uninstall command, exit the mounted directory before performing the uninstall command, otherwise the device is busy and cannot be uninstalled

http://www.bkjia.com/PHPjc/1134393.html www.bkjia.com true http://www.bkjia.com/PHPjc/1134393.html techarticle Linux NFS Server build 1, NFS:NFS (Network File system), which is a file system supported by FreeBSD, which allows computers in the network to pass tcp/i ...

  • 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.