Ubuntu 16.04 nfs service setup, ubuntu16.04

Source: Internet
Author: User

Ubuntu 16.04 nfs service setup, ubuntu16.04

The nfs service implements file sharing between Linux and Linux. The establishment of the nfs service is relatively simple.

Now we will introduce how to set up the nfs service in ubuntu16.04. ubuntu is easier to build than RedHat.

1. Install the nfs service

sudo apt install nfs-common

2. modify the configuration file

sudo vim /etc/exports

The modification content is as follows:

/home *(rw,sync,no_root_squash)

The meanings of each section are as follows and modified based on actual conditions.

/Home: shared directory *: specifies which users can access * All users who can ping the host 192.168.1. * specify the CIDR block. In This CIDR Block, users can mount 192.168.1.12. Only this user can mount (ro, sync, no_root_squash): Permission ro: Read-Only rw: read/write sync: Synchronous no_root_squash: do not lower the permissions of the root user. view other options man 5 exports

3. Restart the nfs service.

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

At this point, the nfs service has been 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.93Export list for 192.168.1.93:/home *

3. Mount the directory to the local device.

mount 192.168.1.93:/home  /mnt 

4. Access

Access the local mnt directory to access the shared directory on the server.

 

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.