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

How to set up NFS server and mount mount command in linux

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces how to set up the NFS server and mount the mount command in linux. It is very detailed and has a certain reference value. Interested friends must read it!

For example, there are three machines now.

A:10.100.100.1

B:10.100.100.2

C:10.100.100.3

B and C should mount A's / app/data folder to their own / app/buckup folder.

1. NFS server settings (mount source)

Edit the / etc/exports file on machine A, which is used to configure allowable mount configuration files

Rw: read and write permissions

Ro: read-only permission

No_root_squash: if the user who logs in to the NFS host is root, the user has root permission

Root_squash: if the user who logs in to the NFS host is root, the user right will be limited to anonymous user nobody

All_squash: regardless of the permissions of the user who logs in to the NFS host, it will be reset to anonymous user nobody.

Anonuid: all users who log in to the NFS host are set to the specified user id. This ID must exist in / etc/passwd.

Anongid: same as anonuid, but just become group ID!

Sync: data is synchronously written to memory.

Async: the data will be temporarily stored in memory and will not be directly written to the hard disk.

Insecure: unauthorized access from this machine is allowed.

Then you need to write in the / etc/exports file of A:

Exportfs

Command

If we modify / etc/exports after starting NFS, we can use the exportfs command to make the changes take effect immediately, which is in the following format:

Exportfs [- aruv]

-a: all mount or unmount / etc/exports content

-r: revisit the directory shared in mount / etc/exports

-u: umount directory

-v: in export, output the detailed information to the screen.

Second, the operation of NFS client:

1. Install nfs and rpcbind services like the server

two。 Mount using the monut command

Mount 10.100.100.1:/app/data / app/backup

These are all the contents of the article "how to set up the NFS server and mount the mount command in linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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