In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces in detail the method of building NFS in linux, the sample code in this article is very detailed, and the detailed explanation of picture and text is easy to learn, which is very suitable for beginners. Interested friends can refer to it.
First, we map 134resources to 135machines through NFS.
Then 134 the environment is ready.
Install the nfs service using the command yum install-y nfs-utils
Modify nfs configuration in vim / etc/sysconfig/nfs
LOCKD_TCPPORT=50001 # TCP locks use port LOCKD_UDPPORT=50002 # UDP locks use port MOUNTD_PORT=50003 # mount use port
STATD_PORT=50004 # status uses port
RDMA_PORT=50005
# configure mapping and permissions
# / data, local file path
# 10.10.10.135, the IP that can be mounted, and the IP address range can be set in batches through the subnet mask
# (ro, sync, all_squash), ro read-only permissions, sync synchronization (file synchronization is written to memory and disk), all_squash (limited permissions)
Vim / etc/exports
/ data 10.10.10.135 (ro,sync,all_squash)
# start the nfs service
Service nfs startchkconfig nfs onservice rpcbind startchkconfig rpcbind on
If you open the firewall locally, you need to configure it as a static port and open the relevant port through iptable.
II. 135Environment (root@135)
# install nfs
Yum install nfs-utils
# Mount 134 resources
# Map the / data directory of nfs 10.10.10.134 to the local / data directory (need to establish the local / data directory in advance)
Mount-t nfs 10.10.10.134:/data / data
# NGINX settings (specific configuration is set according to the path. Through error.log, it is easy to debug and set successfully)
Vim nginx.conf
Location / feed/data/fullfeed
{
Root /
Autoindex on; # for test
Autoindex_exact_size on; # for test
Autoindex_localtime on; # for test
}
The above are the details of the method of building NFS by linux, and the specific usage needs to be used by everyone through hands-on experiments. If you want to know more, you are welcome to 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.