In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this article "Linux how to configure nfs shared storage service", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "Linux how to configure nfs shared storage service" article.
NFS is a network file system protocol based on TCP/IP transport. By using the NFS protocol, the client can access shared resources on the remote server as if it were a local directory.
Nfs is a network file system, which needs to rely on rpc for process scheduling.
Note that nfs only verifies id, verifies the user name, and can only provide file sharing services on class unix os. Because of its fragile authentication mechanism, it is not suitable to work on internet, so it is very feasible to use it in the intranet.
The nfs server needs to make sure that these two packages install nfs-utils rpcbind correctly.
For ubuntu servers, there are two packages for nfs-common,nfs-kernel-server, and rpcbind is installed by default.
Yum-y install nfs-utils rpcbind
Edit the shared directory configuration file / etc/exports
/ var/www/html 192.168.10.0 rw,async,no_root_squash 24 (ro) # multiple network segments or hosts are separated by spaces / var/www 192.168.10.0 amp 24 (ro,sync,root_squash)
Parameters: ro means read-only, rw means read-write, sync synchronous write means writing to both memory and hard disk, and async is temporarily stored in memory asynchronously. No_root_squash means that if the user connected by the client is root, then the directory on the server is also root permission * Please do not enable it. It is dangerous that root_squash means that the client is root and it is recommended to turn it into an anonymous user.
Start the nfs service and set it to boot service rpcbind start # or systemctl start rpcbindservice nfs start # or systemctl startnfs # ubuntu server is service startnfs-kernel-server startchkconfig rpcbind on # or systemctl enable rpcbindchkconfig nfs on # or systemctl enable nfs configure firewall Release the response port or service firewall-cmd-- permanent-- add-service=nfsfirewall-cmd-- permanent-- add-service=rpc-bindfirewall-cmd-- permanent-- add-service=mountdfirewall-cmd-- reloadfirewall-cmd-- list-all # View the resource client mount showmount-e nfs_server_ip in the direction of firewalld: view the available mount point of the nfs server client mount operation mount-t nfs nfs_server:/var/www/html / bendikongmulu or mount-t Nfs nfs_server:/var/www/html / bendikongmulu-o proto=tcp
If there is no error, it will succeed. Of course, the client can use df-h to check whether it has been mounted. Here, the client can switch to the local mount point to see the files on the server (note that if the directory shared by the server is empty, the client cannot view it).
The above is the content of this article on "how to configure nfs shared storage service in Linux". I believe we all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.