In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to use NFS in Linux". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
NFS is a service that we often use to share document directories between linux systems. In fact, the configuration of nfs is very simple, and I also use simple square words to record and explain the main points of the configuration of NFS.
1) Server configuration file: / etc/exports
File format: Directory hostname (options)
Directory is the directory to be shared
The domain name / IP address / IP address field of the hostname client; it can also be empty, which represents any host
Options is optional, if not specified, the default option is used. Such as ro,rw,sync,async, etc.
Such as:
/ home 192.168.1.* (rw,async,no_root_squash)
Rw; is readable and writable
Async; synchronization. Only when the server receives a response from the client, does it take the next step to ensure a more reliable connection.
No_root_squash; does not compress the permissions of root users. To be more secure, please use roo_squash.
On the server side, you can use the exportfs command to output exports's shared directory.
2) make sure portmap and NFS are started
# / etc/rc.d/init.d/portmap start (or: # / service portmap start) # / etc/rc.d/init.d/nfs start (or: # / serverice nfs start)
Note: netstat-untlp is available to check whether the portmap and nfs services are started. Port 2049 is the NFS server, and port 111corresponds to the portmap service. You can find the corresponding ports on both TCP and UDP.
3) NFS client configuration (mount or fstab file)
# mount-t nfs hostname (orIP): / directory / mountpoint
-t nfs can be omitted
/ directory is an absolute path
Or add the mount record of the NFS file system to the / etc/fstab file
NFSserverIP:/directory / mountpoint nfs defaults 0 0
You can use mount to check the mount point.
This is the end of the content of "how to use NFS in Linux". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.