Raspberry Pi3 ~ 安装 nfs Server
l 安装必要服务:
sudo apt-get install portmap
sudo apt-get install nfs-kernel-server sudo apt-get install portmap |
l 编辑文件
sudo vim /etc/exports
添加: /home/pi/Myself 192.168.123.*(rw,sync,no_subtree_check) |
* 表示最后一段任何IP都可以共享,如果你想限定个别IP,用IP替代
注意要事先创建要共享的目录
参数 |
说明 |
ro |
只读访问 |
rw |
读写访问 |
sync |
所有数据在请求时写入共享 |
async |
nfs在写入数据前可以响应请求 |
secure |
nfs通过1024以下的安全TCP/IP端口发送 |
insecure |
nfs通过1024以上的端口发送 |
wdelay |
如果多个用户要写入nfs目录,则归组写入(默认) |
no_wdelay |
如果多个用户要写入nfs目录,则立即写入,当使用async时,无需此设置 |
hide |
在nfs共享目录中不共享其子目录 |
no_hide |
共享nfs目录的子目录 |
subtree_check |
如果共享/usr/bin之类的子目录时,强制nfs检查父目录的权限(默认) |
no_subtree_check |
不检查父目录权限 |
all_squash |
共享文件的UID和GID映射匿名用户anonymous,适合公用目录 |
no_all_squash |
保留共享文件的UID和GID(默认) |
root_squash |
root用户的所有请求映射成如anonymous用户一样的权限(默认) |
no_root_squash |
root用户具有根目录的完全管理访问权限 |
anonuid=xxx |
指定nfs服务器/etc/passwd文件中匿名用户的UID |
anongid=xxx |
指定nfs服务器/etc/passwd文件中匿名用户的GID |
l 启动NFS Server
/etc/init.d/nfs-kernel-server start |
l 检查是否启动
showmount –e localhost |
发现启动不起来,卡主不动。解决方法:
l 在服务器上先停止rpcbind 和nfs在启动 注意顺序
sudo /etc/init.d/rpcbind stop 停止rpcbind
sudo /etc/init.d/nfs-kernel-server stop 停止nfs sudo /etc/init.d/rpcbind start 启动rpcbind sudo /etc/init.d/nfs-kernel-server start 启动nfs |
l 查看nfs状态:
pi@raspberrypi:~ $ showmount -e localhost Export list for localhost: /home/pi/Myself 192.168.123.*
|
出现目录和访问地址即可
l 客户端进行连接
mount -t nfs -o nolock 192.168.123.20:/home/pi/Myself /mnt/nfs
|
注意事先创建目录
Raspberry Pi3 ~ 安装 nfs Server的更多相关文章
- Ubuntu 12.04安装NFS server
首先安装nfs-kernel-server apt-get install nfs-kernel-server 然后创建一个目录: mkdir -p /opt/share 并赋予权限777: chmo ...
- [raspberry pi3] 安装aarch64 opensuse
raspberry 虽然是64bit的cpu,但是用的系统一直都是32bit的,32bit的系统还是有不少的局限性的, 比如mongodb,Y2038. suse 发布了个64bit的server版本 ...
- [raspberry pi3] 安装ffmpeg
买了个pi3,pi相对于通常的嵌入式系统的最大好处是里面夹带了gcc编译器,有很多东西都不需要交叉编译了. arm和pc的性能还是不能比的,io的瓶颈还是很明显的, 想要编的快点还是要在pc上交叉编译 ...
- Raspberry Pi3 ~ 安装samba服务
文章转载自此博文 1. sudo apt-get install samba 如果出现错误提示,则需要先执行sudo apt-get update,再重新执行sudo apt-get install ...
- 【教程】ubuntu下安装NFS服务器
安装 NFS server mystery@lcw:~$ sudo apt-get install nfs-kernel-server 编辑/etc/exports,添加目标系统的根文件系统映射目录 ...
- [树莓派(raspberry pi)] 02、PI3安装openCV开发环境做图像识别(详细版)
前言 上一篇我们讲了在linux环境下给树莓派安装系统及入门各种资料 ,今天我们更进一步,尝试在PI3上安装openCV开发环境. 博主在做的过程中主要参考一个国外小哥的文章(见最后链接1),不过其教 ...
- 树莓派 nfs server安装
安装服务 sudo apt-get install portmap sudo apt-get install nfs-kernel-server 配置: sudo nano /etc/expo ...
- (转)Ubuntu12.04上NFS Server安装使用过程
原文链接:Ubuntu12.04上NFS Server安装使用过程 实现步骤: 1.服务器端:sudo apt-get install portmap2.服务器端:sudo apt-get insta ...
- [raspberry pi3] aarch64 mongodb 编译和安装
raspberry pi3官方支持是32bit的系统,使用mongodb的时候有2G数据库大小的限制,32bit的系统上数据大点基本上就可以认为不能用了,所以要装64bit的opensuse. 安装了 ...
随机推荐
- AC日记——Andryusha and Socks Codeforces 780a
A. Andryusha and Socks time limit per test 2 seconds memory limit per test 256 megabytes input stand ...
- 使用 dotnet CLI 来打包和发布 .NET Core nuget package
原文链接:使用 dotnet CLI 来打包和发布 .NET Core nuget package 如何使用 visual studio 2015/2017 打包和发布 Nuget package, ...
- js-input file 文件上传(照片,视频,音频)
在此做一个笔记 <input type="file" accept="image/*" capture="camera"> &l ...
- 001为什么Linux使用~作为家目录?为什么vim用hjkl作为方向键?
- awk 统计
命令太多,记不住,组合起来用一把…..示例文件: 1 2 3 4 5 6 7 8 9 10 11 [root@lovedan test]# cat a.txt hello good world hel ...
- CentOS6.7安装部署LNMP(nginx1.8.0+php5.6.10+mysql5.6.12)
IP-10.0.0.8 1.安装nginx mkdir -p /server/tools cd /server/tools yum install -y pcre pcre-devel openssl ...
- SQL SERVER 工具
http://www.cnblogs.com/fygh/archive/2012/04/25/2469563.html
- 邁向IT專家成功之路的三十則鐵律 鐵律十二:IT人養生之道-德行
所謂的「養生」在中國古代裡所指的是針對內在精神層面修為的提升,到了近代中醫所謂的養生,則除了包含最根本的內在精神層面之外,還涵蓋了外在身體的養護.在現今各行各業的人士當中,嚴格來說都應該要有一套專屬的 ...
- 基于cucumber接口测试框架的扩展——测试框架总结之cucumber
主要功能: 1.通过fiddler抓取请求,导出xml文件. 2.解析xml文件至excel,或者手工填写excel数据. 3.根据excel中的URL中地址生成的接口集合和feature内容模板生成 ...
- Django小项目练习
Django学生管理系统 urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^class_list/', views.class_list ...