NFS mounts under CentOS to other machines for

1, the premise: there are two machines, all Centos5.X systems.

Machine 1 IP: (as a server, you must open the NFS and Portmap services)
Machine 2 IP: (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”
Fixed baseurl
[root@etl02 hdfs_13]# cat /etc/yum.repos.d/HDP.repo

3, mounting steps

Following only the share path/share mounts to steps:
Step 1, the machine 1,IP acts as a server, you need to do the following configuration:

1) configuration/etc/exports file

[root@Processor036 /]# 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)
[root@Processor036 /]# sudo /etc/init.d/portmap restart
Stopping portmap: [ OK ]
Starting portmap: [ OK ]

3) start the NFS services
[root@Processor036 /]# 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)
[root@Processor036 /]# 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 and need to manually create a new.
[root@WEB-W031 /]# mount -t nfs /share
[root@WEB-W031 /]# cd /share
[root@WEB-W031 share]# ls -al
total 16
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:// (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!