How to build nfs service on ubuntu16.04

Introduction to NFS

NFS (Network File System) is a network file system, one of the file systems supported by FreeBSD, which allows computers on the network to share resources through a TCP/IP network. In NFS applications, local NFS client applications can transparently read and write files located on remote NFS servers, just like accessing local files.

The nfs service is to realize file sharing between Linux and Linux, and the construction of the nfs service is relatively simple.

Now introduce how to build nfs service in ubuntu16.04 system, ubuntu is easier to build than Red Hat.

How to configure NFS on Ubuntu

1、 Install nfs service

sudo apt install nfs-common

2、 Modify configuration file

sudo vim /etc/exports

The revised content is as follows:

/home *(rw,sync,no_root_squash)

The meaning of each paragraph is as follows, modified according to actual conditions

/home: shared directory
* : Specify which users can access
  * All users who can ping the same host
  192.168.1.* Specify a network segment, users in this network segment can mount
  192.168.1.12 Only this user can mount(ro,sync,no_root_squash): Permission
 ro :Read only
 rw :Read and write
 sync :Synchronize
 no_root_squash:Does not reduce the permissions of the root user

Other options man 5 exports view

3、 Restart nfs service

sudo /etc/init.d/nfs-kernel-server restart

At this point, the nfs service is set up.

The following describes how the client accesses the server

1、 Check whether the network between the client and the server is connected (ping command)

ping + host IP

2、 View the shared directory of the server

showmount -e +Host IP
showmount -e 192.168.1.93
Export list for192.168.1.93:/home *

3、 Mount the directory to the local

mount 192.168.1.93:/home /mnt

4、 access

Access the local mnt directory, you can access the server-side shared directory.

to sum up

The above is the entire content of this article. I hope that the content of this article has a certain reference value for your study or work. Thank you for your support to ZaLou.Cn. If you want to know more about it, please check the related links below

Recommended Posts

How to build nfs service on ubuntu16.04
How to build an NFS file sharing server on Ubuntu 16.04
How to use Jenkins to build automatically on Ubuntu
How to install Ruby on Ubuntu 20.04
How to install Memcached on Ubuntu 20.04
How to install MySQL on Ubuntu 20.04
How to install VirtualBox on Ubuntu 20.04
How to install Protobuf 3 on Ubuntu
How to install Nginx on Ubuntu 20.04
How to install Apache on Ubuntu 20.04
How to install Git on Ubuntu 20.04
How to install Node.js on Ubuntu 16.04
How to install MySQL on Ubuntu 20.04
How to install Vagrant on Ubuntu 20.04
How to install Bacula-Web on Ubuntu 14.04
How to install PostgreSQL on Ubuntu 16.04
How to install Git on Ubuntu 20.04
How to install Anaconda3 on Ubuntu 18.04
How to install Memcached on Ubuntu 18.04
How to install Jenkins on Ubuntu 16.04
How to install MemSQL on Ubuntu 14.04
How to install Go on Ubuntu 20.04
How to install MongoDB on Ubuntu 16.04
How to install Mailpile on Ubuntu 14.04
How to install PrestaShop on Ubuntu 16.04
How to upgrade to PHP 7 on Ubuntu 14.04
How to install Skype on Ubuntu 20.04
How to install Jenkins on Ubuntu 20.04
How to install Python 3.8 on Ubuntu 18.04
How to install KVM on Ubuntu 18.04
How to install KVM on Ubuntu 20.04
How to install opencv3.0.0 on ubuntu14.04
How to install Anaconda on Ubuntu 20.04
How to install Prometheus on Ubuntu 16.04
How to install Jenkins on Ubuntu 18.04
How to deploy Django on Ubuntu 14.04
How to install Apache on Ubuntu 20.04
How to install R on Ubuntu 20.04
How to install Moodle on Ubuntu 16.04
How to install Solr 5.2.1 on Ubuntu 14.04
How to install Teamviewer on Ubuntu 16.04
How to secure Nginx on Ubuntu 14.04
How to install MariaDB on Ubuntu 20.04
How to install Nginx on Ubuntu 20.04
How to install Mono on Ubuntu 20.04
How to install Go on Ubuntu 20.04
How to install Zoom on Ubuntu 20.04
How to uninstall software on Ubuntu
How to install Nginx on Ubuntu 16.04
How to install OpenCV on Ubuntu 20.04
How to install Spotify on Ubuntu 20.04
How to install Postman on Ubuntu 18.04
How to install Go 1.6 on Ubuntu 16.04
How to install Go on Ubuntu 18.04
How to install MySQL on Ubuntu 14.04
How to install PostgreSQL on Ubuntu 20.04
How to install VLC on Ubuntu 18.04
How to install TeamViewer on Ubuntu 20.04
How to install Webmin on Ubuntu 20.04
How to Run Tmux Service Scripts on Ubuntu Start Up
Teach you how to build a Git server on Ubuntu