Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of building nfs service by ubuntu16.04

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Introduction to NFS

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

Nfs service realizes the file sharing between Linux and Linux, and the construction of nfs service is relatively simple.

Now let's introduce how to build nfs service in ubuntu16.04 system. Ubuntu is even easier to build than Red Hat.

The method of configuring NFS in Ubuntu

1. Install the nfs service

Sudo apt install nfs-common

2. Modify the configuration file

Sudo vim / etc/exports

The modifications are as follows:

/ home * (rw,sync,no_root_squash)

The meaning of each paragraph is as follows, which should be modified according to the actual situation.

/ home: shared directory *: specify which users can access * all users who can ping with the host 192.168.1.* specify the 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-write sync: synchronous no_root_squash: does not reduce the permissions of root users

Other options man 5 exports View

3. Restart the nfs service

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

At this point, the nfs service is set up.

Here is how the client accesses the server

1. Check whether the network of the client and server is connected (ping command)

Ping + host IP

2. View the shared directory on the server side

Showmount-e + host IPshowmount-e 192.168.1.93Export list for 192.168.1.93:/home *

3. Mount the directory locally

Mount 192.168.1.93:/home / mnt

4. Visit

Access the local mnt directory and you can access the directory shared by the server.

Summary

The above is the whole content of this article. I hope the content of this article has a certain reference and learning value for everyone's study or work. Thank you for your support. If you want to know more about it, please see the relevant links below.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report