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 configure nfs server for Linux system

2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

The editor today takes you to understand how to configure the nfs server of the Linux system. The knowledge points in the article are introduced in great detail. Friends who feel helpful can browse the content of the article with the editor, hoping to help more friends who want to solve this problem to find the answer to the problem. Let's follow the editor to learn more about "how to configure the nfs server of the Linux system".

NFS (Network File System) is the network file system whose function is to share files through the network.

Introduction to nfs server: NFS is the abbreviation of Network File System, that is, network file system. A protocol for distributed file systems developed by sun and published in 1984.

Through the network, different machines and different operating systems can share individual data with each other, and applications can access the data in the server disk through the network, which is a method to realize disk file sharing among Unix-like systems.

The basic principle of NFS is to "allow different clients and servers to share the same file system through a set of RPC". It is independent of the operating system and allows systems with different hardware and operating systems to share files together.

Second, Linux server nfs configuration detailed steps NFS server: 192.168.192.133 NFS client: 192.168.192.223

1. Install NFS server [root@c74 ~] # yum install rpcbind nfs-utils-y2. Turn off the firewall and selinux [root@c74] # systenctl stop firewalld [root@c74 ~] # setenforce 03. Configure the NFS server to create a NFS shared directory

[root@c74 ~] # mkdir / data1 [root@c74 ~] # chmod-Rf 777 / data1NFS service main configuration file

[root@c74 ~] # vi / etc/exports / data1 192.168.192.223 (rw,sync,root_squash) # IP can be the network segment or the IP address of the client. # exports configuration Common parameters # ro read-only # rw read-write # root_squash when the NFS client is accessed as a root administrator, the anonymous user mapped to the NFS server # no_root_squash when the NFS client is accessed as the root administrator, the root administrator mapped to the NFS server # all_squash no matter what account the NFS client uses to access Anonymous user # sync mapped to NFS server writes data to memory and hard disk at the same time, ensuring that no data is lost # async gives priority to saving data to memory and then writing to hard disk This is more efficient, but data may be lost 4. 5%. Start the NFS service [root@c74] # systemctl restart rpcbind & & systemctl enable rpcbind [root@c74] # systemctl start nfs-server & & systemctl enable nfs-server5. The client connects to the server showmount and mainly uses commands to query shared information. Test here [root@c66] # showmount-e 192.168.192.133 [root@c66] # mount-t nfs 192.168.192.133:/data1 / mnt # if you want to boot and mount, please edit / etc/fstab file 6. The test server tests to create new directories and files in the shared files on the server side, and check whether they are synchronized on the client side. 1) create new directories and files in the server shared directory 11 and files 22.txt 2) View on the client side

The client tests to create new directories and files in the server-side mount directory on the client side to check whether they are synchronized. 1) create new directories and files in the client-side mount directory. 2) Note: creating directories and files on the server side is different from creating directories and files on the client side.

Thank you for your reading, the above is the whole content of "how to configure the nfs server of the Linux system", learn friends to hurry up to operate it. I believe that the editor will certainly bring you better quality articles. Thank you for your support to the website!

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