In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to install the nfs network file system. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
One: nfs server-side installation
1. Install the nfs service
Yum-y install nfs-utils
2. Configure the path and access permissions for publishing
Vim / etc/exports add / nfsPrimary * (rw,async,no_root_squash,no_subtree_check) / nfsSecondary * (rw,async,no_root_squash,no_subtree_check)
You can also specify who can hang in this shared folder.
/ nfsPrimary liufukinKVM (rw,async,no_root_squash,no_subtree_check) / nfsSecondary 192.168.10.* (rw,async,no_root_squash,no_subtree_check)
3. Configure the ports that need to be bound by nfs
Vim / etc/sysconfig/nfs
Find the following configuration item and open it
LOCKD_TCPPORT=32803 LOCKD_UDPPORT=32769 MOUNTD_PORT=892 RQUOTAD_PORT=875 STATD_PORT=662 STATD_OUTGOING_PORT=2020
4. The open port of iptables flood control wall (must be added before reject, otherwise it is invalid)
Vi / etc/sysconfig/iptables
-An INPUT-s 172.16.10.0According to 24-m state-- state NEW-p udp-- dport 111j ACCEPT-An INPUT-s 172.16.10.0MB 24-m state-- state NEW-p tcp-- dport 111j ACCEPT-An INPUT-s 172.16.10.0max 24-m state-- state NEW-p tcp-dport 2049-j ACCEPT-An INPUT-s 172.16.10.0max 24-m state-- state NEW-p tcp -- dport 32803-j ACCEPT-An INPUT-s 172.16.10.0Universe 24-m state-state NEW-p udp-- dport 32769-j ACCEPT-An INPUT-s 172.16.10.0max 24-m state-- state NEW-p tcp-- dport 892-j ACCEPT-An INPUT-s 172.16.10.0max 24-m state-- state NEW-p udp-- dport 892-j ACCEPT-An INPUT-s 172.16.10.0max State-- state NEW-p tcp-- dport 875-j ACCEPT-An INPUT-s 172.16.10. 24-m state-- state NEW-p udp-- dport 875-j ACCEPT-An INPUT-s 172.16.10. 24-m state-- state NEW-p tcp-- dport 662-j ACCEPT-An INPUT-s 172.16.10. 24-m state-- state NEW-p udp-- dport 662-j ACCEPT
Firewall restart
Service iptables restart
5. Turn off selinux or turn on allow mode
Sed-I's etc/selinux/config setenforce'/ SELINUXpurenforcingCharpy'/ SELINUXSPUXGUXPUXPUX
6. Start the nfs server
Service rpcbind start service nfs start chkconfig rpcbind on chkconfig nfs on
II. Operation of NFS client
1. The showmout command is very helpful for NFS operation and error checking, so let's take a look at the usage of showmount first.
Showmout-a: this parameter is commonly used on NFS SERVER and is used to display cline machines that have native nfs directories on mount. -e: displays the directory from the export on the specified NFS SERVER.
For example:
Showmount-e 192.168.0.30 Export list for localhost: / tmp * / home/linux * .linux.org / home/public (everyone) / home/test 192.168.0.100
2. The method of mount nfs directory:
Mount-t nfs hostname (orIP): / directory / mount/point
Specific examples:
Linux: mount-t nfs 192.168.0.1:/tmp / mnt/nfs [root [@ localhost] (https://my.oschina.net/u/570656) /] # showmount-e 192.168.0.169 Export list for 192.168.0.169:/home/opt/RHEL4U5 192.168.0.0 You have new mail in / var/spool/mail/root mount-t nfs 192.168.0.169:/home/opt/RHEL4U5 / mnt/soft
Note: nfs needs to be installed, otherwise it will be reported
Mount: wrong fs type, bad option, bad superblock on 125.64.41.244:/data/img, missing codepage or helper program, or other error (for several filesystems (e.g. Nfs, cifs) you might need a / sbin/mount. Helper program) In some cases useful info is found in syslog-try dmesg | tail or so
Thank you for reading! This is the end of the article on "how to install the nfs network file system". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.