Configuring NFS file sharing service on Linux system


Network sharing function similar to winodws,Linux systemIt also provides a variety of network file sharing methods, including NFS, samba and FTP. This paper introduces the installation and configuration of NFS network file system

Configuring NFS file sharing service on Linux system

Introduction to NFS

NFS relies on RPC Protocol in the process of message passing. When using NFS, the client only needs to use mountcommandMount the directory of the remote host locally.
For example, mount / home / test of to the local / home / test directory of

[[email protected] ~]# mount /home/test

Configure NFS server

NFS requires NFS utils to be installed.rpm rpcbind.rpm

The version number is different due to the system version

[[email protected] ~]# yum install -y nfs-utils rpcbind

Exports parameter description

-A mount all the settings in the / etc / exports file, – R remount the settings in the / etc / exports file, – U uninstall a directory

Description of shownmount parameter

-A lists the full directory information of NFS share, – D lists the directory of remote installation of client, – e displays the list of export directories

NFS parameter description

Ro read-only permission, RW read-write permission, all_ Squash anonymous user or group, no_ all_ Squash non anonymous user or group, root_ Square maps root users and groups to anonymous users and groups, No_ root_ Square and root_ On the contrary, sync writes the data to the buffer synchronously, and async saves the data in the memory buffer first, and then writes it to the disk

Set expoprts file

[[email protected] ~]# cat /etc/exports
/home/test .(rw)

Start service

[[email protected] ~]# systemctl start rpcbind
[[email protected] ~]# systemctl start nfs-server

Configuring NFS clients

[[email protected] ~]# mount -t nfs -o rw /home/test

In this way, you can use!

Original address of this article: Wang Huachao, auditor: Yun zengbao

Recommended Today

Implementation example of go operation etcd

etcdIt is an open-source, distributed key value pair data storage system, which provides shared configuration, service registration and discovery. This paper mainly introduces the installation and use of etcd. Etcdetcd introduction etcdIt is an open source and highly available distributed key value storage system developed with go language, which can be used to configure sharing […]