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. 安装了 ...
随机推荐
- LeetCode OJ--Rotate List
http://oj.leetcode.com/problems/rotate-list/ 取得后面k个节点,然后截断插到前面.如果k比list长,则按照求余算. 去后面的k个节点:使用两个指针,第一个 ...
- js-斐波那切数列
f(1) = 1; f(2) = 1; f(3) = f(1) + f(2) = 2; f(4) = f(3) + f(2) = 3; f(5) = f(4) + f(3) = 5; f(6) = f ...
- 虚拟机centos 同一个tomcat、不同端口访问不同的项目
在tomcat中复制webapps目录,并重命名:
- ionic build Android错误记录 error in opening zip file
0.写在前头 运行 :cordova requirements Requirements check results for android: Java JDK: installed 1.8.0 An ...
- HDU - 3664 Permutation Counting
Discription Given a permutation a1, a2, … aN of {1, 2, …, N}, we define its E-value as the amount of ...
- Leetcode总结之Union Find
package UnionFind; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; p ...
- 继承LIst 的类JSON序列化,无法序列化属性的问题
/// <summary> /// Paged list /// </summary> /// <typeparam name="T">T< ...
- SQL SERVER 工具
http://www.cnblogs.com/fygh/archive/2012/04/25/2469563.html
- socket阻塞与非阻塞,同步与异步I/O模型
作者:huangguisu 原文出处:http://blog.csdn.NET/hguisu/article/details/7453390 socket阻塞与非阻塞,同步与异步 1. 概念理解 在进 ...
- 如何直接打开使用locate等查找到的文件
很多的时候需要使用locate去定位文件,找到了文件之后接下来就是使用相应的文本编辑工具如gvim进行打开. 这个时候最烦心的就是去复制一大长串的地址了. 如果能让定位和打开一体操作就最好了,这就需要 ...