ubuntu下NFS服务器配置

服务器端

【下载软件】

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

ubuntu下NFS服务器配置
【创建服务器文件存放目录并赋予权限】
root@ubuntu:/home/linux# mkdir -p  /source/rootfs
root@ubuntu:/home/linux# chmod 777 /source/rootfs/


【重启服务器】

root@ubuntu:/home/linux# /etc/init.d/nfs-kernel-server restart

init/            init.d/          initramfs-tools/ insserv/         insserv.conf.d/

root@ubuntu:/home/linux# /etc/init.d/nfs-kernel-server restart

 * Stopping NFS kernel daemon                                                   [ OK ]

 * Unexporting directories for NFS kernel daemon...                             [ OK ]

 * Exporting directories for NFS kernel daemon...                                      exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "*:/source/rootfs".

  Assuming default behaviour ('no_subtree_check').

  NOTE: this default has changed since nfs-utils version 1.0.x

 

exportfs: Failed to stat /source/rootfs: No such file or directory

                                                                                [ OK ]

 * Starting NFS kernel daemon                                                   [ OK ]

root@ubuntu:/home/linux#

客户端下的配置

【创建挂载点】 
root@ubuntu:/home/linux# mkdir /mnt/nfs

挂载】
root@ubuntu:/home/linux# mount -t nfs 192.168.169.15:/source/rootfs /mnt/nfs

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值