服务器端
【下载软件】
root@ubuntu:/home/linux# apt-get install nfs-kernel-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
nfs-kernel-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 559 not upgraded.
【更改配置文件】
root@ubuntu:/home/linux# vim /etc/exports
【创建服务器文件存放目录并赋予权限】
root@ubuntu:/home/linux# mkdir -p
root@ubuntu:/home/linux# chmod 777 /source/rootfs/
【重启服务器】
root@ubuntu:/home/linux# /etc/init.d/nfs-kernel-server restart
init/
root@ubuntu:/home/linux# /etc/init.d/nfs-kernel-server restart
exportfs: Failed to stat /source/rootfs: No such file or directory
客户端下的配置
【创建挂载点】
root@ubuntu:/home/linux# mkdir /mnt/nfs
【挂载】
root@ubuntu:/home/linux# mount -t nfs 192.168.169.15:/source/rootfs /mnt/nfs