In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "centos configuration nfs service detailed steps". In daily operation, I believe many people have doubts about the detailed steps of centos configuration of nfs service. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "centos configuration nfs service detailed steps". Next, please follow the editor to study!
Server configuration
1. Install nfs-utils and rpcbind
The code is as follows:
Yum install nfs-utils rpcbind
two。 Set up the boot service
The code is as follows:
Chkconfig nfs on
Chkconfig rpcbind on
3. Start related services
The code is as follows:
Service rpcbind start
Service nfs start
4. Create a shared directory
The code is as follows:
Mkdir-p / export/primary
Mkdir-p / export/secondary
5. Edit the / etc/exports file to add the following
The code is as follows:
Vi / etc/exports
/ export* (rw,async,no_root_squash,no_subtree_check)
6. Refresh configuration takes effect immediately
The code is as follows:
Exportfs-a
Client configuration
1. Install nfs-utils and rpcbind
The code is as follows:
Yum install nfs-utils rpcbind
two。 Set up the boot service
The code is as follows:
Chkconfig nfs on
Chkconfig rpcbind on
3. Start the service
The code is as follows:
Servicerpcbind start
Servicenfs start
4. Create a mount point
The code is as follows:
Mkdir-p / mnt/primary
Mkdir-p / mnt/secondary
5. Mount directory
The code is as follows:
Mount-t nfs server_ip:/export/primary / mnt/primary
Mount-t nfs server_ip:/export/secondary / mnt/secondary
6. View the mounted directory
The code is as follows:
Df-h
7. Unmount the mounted directory
The code is as follows:
Umount / mnt/primary
Umount / mnt/secondary
8. Edit / etc/fstab, auto mount on boot
The code is as follows:
Vi / etc/fstab
Server_ip:/export/primary/mnt/primary nfs rw,tcp,intr 0 1
Server_ip:/export/secondary/mnt/secondary nfs rw,tcp,intr 0 1
At this point, the study on "centos configuration nfs service detailed steps" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.