Classic file sharing settings in Linux (NFS)

Source: Internet
Author: User
NFS was invented by Sun. Sun has invented many good things in years ...... This time, an NFS server is configured to allow windows and other FreeBSD users to access it.
1. After the installation is complete, create a directory to share files, such as 999. Then grant the 999 permission to the 777 directory.
2. Create or modify the/etc/exports configuration file. The content of this file is very simple. Each row consists of the throw path, the list of Customer names, and access options followed by each customer name: [shared directory] [host name or IP address (parameter, parameter)]. The parameters are optional. If no parameter is specified, NFS uses the default option. The default sharing options are sync, Ro, root_squash, and no_delay. If the host name or IP address is empty, it indicates that the shared IP address is used to provide services to any client. When the same directory is shared to multiple clients but the permissions provided to each client are not the same, you can: [shared directory] [host name 1 or IP1 (parameter 1, parameter 2)] [host name 2 or ip2 (parameter 3, parameter 4)]. The configuration file/etc/exports here is as follows:/root/999 192.168.102.15 (RW, sync) * (RO)
3. Restart the NFS service. Here are two Commands: # exportfs-Au unmount all shared directories # exportfs-RV re-share all directories and output details.
4. Run the showmount-e server ip command on the client to check whether shared files exist. If so, proceed to the next step.
5. Mount-t nfs hostname (orip):/directory/Mount/point Use this command to mount the target. Complete.

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.