NFS file sharing for Linux

Source: Internet
Author: User

First, configure NFS sharing

Network File system

--Purpose: To provide the client with shared folders

--Protocol: NFS (TCP/UDP 2049) RPC (TCP/UDP 111)

Required Packages: Nfs-utils

System Services: Nfs-server

Building basic read-only NFS services

1. On the virtual machine Server0, detect if the nfs-utils is installed

[Email protected]/]# rpm-q nfs-utils


2. Modify the configuration file/etc/exports

[Email protected]/]# Mkdir/public

[Email protected]/]# echo Hehelele >/public/nsd.txt

[Email protected]/]# Vim/etc/exports


/public 172.25.0.0/24 (RO)

3. Restart Nfs-server service, set boot from

[Email protected]/]# systemctl restart Nfs-server

[Email protected]/]# Systemctl enable Nfs-server


4. Client access to the Nfs-server service

[Email protected]/]# Mkdir/mnt/nfs

[Email protected]/]# showmount-e 172.25.0.11

[Email protected]/]# Vim/etc/fstab


172.25.0.11:/public/mnt/nfs NFS _netdev 0 0


[Email protected]/]# mount-a

[Email protected]/]# Ls/mnt/nfs

###############################

If you need to read and write, you need to modify the configuration file on the server

Service side:

[Email protected]/]# Vim/etc/exports

/ABC 172.25.0.0/24 (Rw,no_root_squash) #不压榨客户端root权限


[Email protected]/]# systemctl restart Nfs-server


Normal User:

Client access to the service-side Nfs-server service,

The server will determine the permissions of the local user with the same UID as the client.

#################################################

LDAP: Network user, providing user name

Kerberos: Password authentication, implementation of "One-time password authentication, multiple free login" pass mechanism



NFS file sharing for Linux

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.