1, the premise: there are two machines, all Centos5.X systems.
Machine 1 IP:10.1.1.36 (as a server, you must open the NFS and Portmap services)
Machine 2 IP:10.0.1.31 (as the client, you must open the Portmap service)
2, NFS and Pormap/rpcbind installation
Whether it’s 5. X portmap is 6.X rpcbind, core capabilities are summarized as a word: port mapping.
Note: Centos 6.X system replaced rpcbind Portmap.
CentOS 5 installations:
yum install nfs-utils portmap
CentOS 6 installation:
yum install nfs-utils rpcbind
Yum install error repomd.XML: [Errno 14] PYCURL ERROR 7-“couldn’t connect to host”
[[email protected] hdfs_13]# cat /etc/yum.repos.d/HDP.repo
3, mounting steps
Following only the 10.1.1.36 share path/share mounts to 10.0.1.31 steps:
Step 1, the machine 1,IP 10.1.1.36 acts as a server, you need to do the following configuration:
1) configuration/etc/exports file
[[email protected] /]# cat /etc/exports
Interpretation of the meaning: the share path/share, available for viewing IP 31, support actions for RW read/write support Sync synchronization.
2) start Portmap (role: port mapping)
[[email protected] /]# sudo /etc/init.d/portmap restart
Stopping portmap: [ OK ]
Starting portmap: [ OK ]
3) start the NFS services
[[email protected] /]# sudo /etc/init.d/nfs restart
Shutting down NFS mountd: [ OK ]
Shutting down NFS daemon: [ OK ]
Shutting down NFS quotas: [ OK ]
Shutting down NFS services: [ OK ]
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
4) displays the shared directory (Directory shared displays the hostname/etc/exports)
[[email protected] /]# showmount -e
Export list for Processor036:
Step 2, 2 the machine, the machine 1 (server-side)/share mounted on the machine 2
Following the second/share is the share path under the local machine 10.0.1.31 and need to manually create a new.
[[email protected] /]# mount -t nfs 10.1.1.36:/share /share
[[email protected] /]# cd /share
[[email protected] share]# ls -al
drwxr-xr-x 3 root root 4096 Mar 14 21:54 .
drwxr-xr-x 32 root root 4096 Mar 14 22:13 ..
drwxr-xr-x 2 root root 4096 Mar 14 21:54 1_36test
Http://itoedr.blog.163.com/blog/static/120284297201371112828360 (portmap carefully)
Author: Ming-yi in the world
Reproduced, please indicate the source, the original address: http://blog.CSDN.NET/laoyang360/article/details/50917586
If you feel this article helpful to you, please click on the ‘ top ‘ support, your support is my motivation to keep writing the largest, thank you!