Configure NFS sharing to share files between linux and linux. nfslinux

Source: Internet
Author: User

Configure NFS sharing to share files between linux and linux. nfslinux

Configure NFS sharing to share files between linux and linux.

This article uses two virtual machines to simulate

Use one of them as the client and one as the service machine

The configuration of the server is divided into three steps:

1. Install software nfs-utils

[Root @ server0 ~] # Yum install nfs-utils

2. determine the path of the shared file and modify the configuration file/etc/exports.

Write the following code into the configuration file:

/Public? * (Ro)

[Note:/public indicates the folder to be shared * indicates that all clients on the server can be pinged, and (ro) indicates that the connected client only performs read operations on/public files.]

3. Restart the Software Service

Systemctl restart nfs-server

Configure the client

1. Enable automatic mounting

The configuration file to be changed is/etc/fstab (Note: This configuration file is a file about enabling the computer. It cannot be changed or written incorrectly)

172.25.0.11:/public/mnt/nfs ults, _ netdev 0 0

[Root @ override top0/] # vim/etc/fstab

To verify that the configuration file is correct, verify the following code:

[Root @ override top0/] # mount-? Verify whether the mounting is successful

[Root @ brief top0/] # df-h display mounting information

[Root @ brief top0/] # ls/mnt/nfs view access point content

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.