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 install nfs service under linux

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

Editor to share with you how to install nfs service under linux. I hope you will get something after reading this article. Let's discuss it together.

Install nfs service 1 under linux, debian configure nfs server 1, install nfs service apt-get install nfs-common nfs-kernel-server2, create a directory that needs to be shared, mkdir / mnt/nfschmod aqiw / mnt/nfs3, modify / etc/exports file Add directories and customers that need to be shared to / mnt/nfs * (rw,sync) * (ro,rw) 4, start the service / etc/init.d/nfs-kernel-server start5, hang in nfsmkdir / mnt/nfsmount 192.168.1.99:/mnt/nfs / mnt/nfs6, and mount automatically.

To mount the NFS automatically each time the client starts, edit / etc/fstab and add a line:

192.168.1.99:/mnt/nfs / mnt/nfs nfs rsize=8192,wsize=8192,timeo=14, intr2, centos installs nfs1, creates a shared directory mkdir-p / mnt/share2, installs the software package yum install-y nfs-utils3 required by nfs, edits the export file, adds a slave, and only allows the specified server to access the shared directory vi / etc/exports/mnt/share/ * (rw,no_root_squash,sync) rw for reading and writing Sync means synchronous write. When the no_root_squash client accesses the shared folder with root, the root user 4 is not mapped and the nfs service is started. Boot systemctl start rpcbindsystemctl start nfs# is first performed for rpcbind and nfs to check the status systemctl status nfs5, configure boot self-boot systemctl enable rpcbindsystemctl enable nfsCreated symlink from / etc/systemd/system/multi-user.target.wants/nfs-server.service to / usr/lib/systemd/system/nfs-server.service.6, and after startup is completed. Let the configuration take effect exportfs-R7, view exportfs/mnt/share 8, view rpcinfo-p localhost9 after nfs startup, set nfs fixed port vim / etc/sysconfig/nfs # # add the following at the end: set nfs fixed port RQUOTAD_PORT=4001LOCKD_TCPPORT=4002LOCKD_UDPPORT=4002MOUNTD_PORT=4003STATD_PORT=400410, restart service systemctl restart rpcbindsystemctl restart nfs11, add iptables firewall release port. See documentation for firewall settings vim / etc/sysconfig/iptables need to release 1112049 4001-400412, Restart firewall systemctl restart iptables 3, centos install nfs client 1, install nfsyum install-y nfs-utils2, start rpcbind Set self-boot, the client does not need to start nfssystemctl start rpcbindsystemctl enable rpcbind3, check whether the nfs server opens the shared directory showmount-e 192.168.1.1014, the client creates a directory to mount mkdir-p / mnt/sharemount-t nfs 192.168.1.101:/mnt/share / mnt/share5, check the mount condition df-h6, permanently mount vi / etc/fstab192.168.1.101:/mnt/share / mnt/share nfs default 007, Unmount umount / mnt/share and finish reading this article. I believe you have a certain understanding of "how to install nfs services under linux". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!

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

Internet Technology

Wechat

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

12
Report