ubunt_ configuration _nfs

Installation and Configuration Server using nfs

 

 

1, the ready made to copy the file system rootfs.tar.gz / opt, and extract

tar -xvf rootfs.tar.gz

 

2, install nfs server:

1 "installation and service port mapping NFSserver 

 

             sudo apt-get install nfs-kernel-server

2 "to restart the portmap service :

 

sudo /etc/init.d/portmap restart

 

      3 "Edit / etc / exports, add the target system's root file system directory mapping, false 

   The root file system of the target system and finally mapped to the / opt / rootfs, then 

 

Step ( 3.1) to open the file / etc / exports

sudo vim /etc/exports

 

( 3.2) add the following:

       /opt/rootfs  *(subtree_check,rw,no_root_squash,async)

 

4 "to restart the service:

     $sudo  /etc/init.d/nfs-kernel-server restart 

 (Need to perform the best of each modified / etc / exports once) $ sudo exportfs -a

 

3, the test:

1 "to create a mount point in the user's home directory: mkdir ~ / mnt

2 "mount file systems: / opt / rootfs

sudo mount 192.168.7.4:/opt/rootfs mnt

3 "Can you see what the next rootfs view mnt, if you can see, nfs 

Guess you like

Origin www.cnblogs.com/panda-w/p/10935796.html