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 use NFS under Linux

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

Share

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

This article mainly introduces how to use NFS under Linux, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand.

NFS:Network File System network file system, kernel-based file system. Developed by Sun, through the use of NFS, users and programs can access files on remote systems as if they were local files, based on RPC (Remote Procedure Call Protocol remote procedure call).

1. Check installation of the installation package # rpm-Q nfs-utils rpcbind

Note: RedHat 5.x check portmap,redhat 6.x check rpcbind

two。 Configure the / etc/exports file vi / etc/exports on the NFS server

Then enter / home/cams/file 182.207.129.* (rw,sync,no_root_squash,no_all_squash)

Save exit

3. Start the rpcbind service # service rpcbind start or service rpcbind restart4. Start the nfs service # service nfs start or service nfs restart

5. Query the share status of NFS # showmount-e6 on the NFS server. Modify the properties of NFS server-side mount files and user rights # chown-R cams:cams / home/cams/# chmod-R 755 / home/cams/

At the same time, it is necessary to ensure that the uid and gid of each server user are the same. Here, because the user already exists, modify the uid and gid.

# usermod-u 500 cams# groupmod-g 500 cams7. Query the share status of NFS in the NFS client # showmount-e NFS server IP

8. Mount the shared directory in the NFS server in the NFS client # mount NFS server IP: shared directory local mount point directory # mkdir-p / home/cams/file# mount 182.207.129.74:/home/cams/file / home/cams/file# mount | grep nfs

Problem solving:

1. After mounting, both users and user groups are nobody

Modify the Domain entry in the nfs server and the client / etc/idmapd.conf file to make the configuration consistent. (if the server is not configured with a domain name, configure the domain name first, and then restart the server)

Thank you for reading this article carefully. I hope the article "how to use NFS under Linux" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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

Development

Wechat

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

12
Report