NFS Configuration (CentOS)

Source: Internet
Author: User

First, Introduction

NFS (Network file system/):1), set up file sharing between Linux systems (Linux and Windows intermediate file sharing using Samba services);

2), NFS is only a file system, itself does not have the transmission function, is based on the RPC protocol implementation, in order to reach two Linux system file directory sharing;

3), NFS for C/s architecture;

Second, configure the service side

1. Use the command rpm-q nfs-utils to see if Server for NFS is installed

Rpm-q Portmap

2. If not installed:

Yum Install Nfs-utils
--yum Install Portmap

3. Turn off the firewall

Iptables-f

4. Log on to the Linux server as root and edit the NFS profile: Open the Exports file by command Vi/etc/exports, specifying the shared directories and access permissions that are allowed to be accessed by other computers.

/nfs 192.168.1.* (Rw,sync,no_root_squash)

    

The above line is interpreted as follows:

①./NFS: Directories that are allowed to be accessed by other Computers (NFS folders are built first)

②. 192.168.1.*: The client IP address that is allowed to access the directory, this example indicates that the directory is accessible to all addresses of 192.168.1 for the first three segments of IP.

③. RW: Readable and writable

④. Sync: Synchronous Write Disk (async: Data is first staged in memory, not directly to the hard disk)

⑤. No_root_squash: Indicates that the client root user has write access to the directory.

5. Make the exports directory active and view the Active Directory. Use commands for:

Exportfs-a

6. Restart the NFS server. Use the command:

Service NFS Restart (if the CentOS 7.x uses the command: Systemctl restart NFS)

Note: If you can't start it, try starting it first.

Portmap use command: Service Portmap start; (If the CentOS 7.x uses systemctl start Rpcbind, the centos7.x name is changed)

Third, configure the client

NFS Configuration (CentOS)

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.