Build nfs under Linux to mount the remote host directory to the local host

Build nfs under Linux to mount the remote host directory to the local host


Prepare 2 servers centos6.5

1. First install and close the nfs package on each server

yum install nfs-utils

yum install nfs*

chkconfig --level 35 nfs on

service nfs start

2. First perform the following operations on 172.16.11.100:

mkdir  /vnetoo

vi /etc/exports, add:

/vnetoo 172.16.11.150(rw,sync,no_root_squash)

3. Then, run on 172.16.11.100 (if you are currently logged in at 72.16.11.100 , of course you need to ssh to 172.16.11.150 and su to become root):

mkdir /vnetoo

chmod 777 -R /vnetoo

mount 172.16.11.100:/vnetoo /vnetoo

That's it.

Add the line mount to /etc/rc.local, and it will be automatically mounted at boot.



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325215137&siteId=291194637