当前位置:网站首页>网络硬盘NFS的安装与配置
网络硬盘NFS的安装与配置
2022-07-03 16:59:00 【星哥玩云】
NFS 是共享文件的服务的一种协议 下面给大家介绍一下这个服务器的的安装和配置,在Linux终端上输入 :apt-gey install nfs-common nfs-kernel-server 回车
下面给大家大致讲一下NFS服务器的配置
在讲它的配置之前我想说的一句话就是它太简单了
好了,闲话不多说 go
#:vim /etc/exprots
现在我们来编辑NFS服务的配置文件 其实服务器的配置大同小异
在正文的最下面输入一行
/srv/nfs_share *(rw)
上面的这一行是什么意思呢 /srv/nfs_share 表示的是我们要共享的文件目录
* 表示互联网上任何主机都可以访问 (rw) 表示对服务器进行访问的主机可以进行的操作 也就是可读可写
如果我们只想让我们本地局域网上的主机对我们的服务器进行访问的话 可以这样写
/srv/nfs_share 192.168.*.*(rw)
本机进行访问 :sudo mount -o rw locahost:/srv/nfs_share /mnt/nfs
上面的意思是把本地的目录/srv/nfs_share 挂载到 目录/mnt/nfs上 ,这时候我们体会不到挂载点发生了变化 我们可以自己用相关的命令查询,我就不多介绍了
非本地的主机 :sudo mount -o rw 域名:/srv/nfs_share /mnt/nfs
··································
这个时候我们会发现NFS太简单了,所以系统管理员就麻烦了
假如在共享的目录中有我们的重要的文件,怎么办?
/srv/nfs_share/secret (noaccess)
什么意思呢
就是任何主机都不能访问/srv/nfs_share/secret 这个子目录
在配置完以后怎么手动启动文件呢?
找到脚本文件然后执行它
如何限制root的权限
/srv/nfs_share 192.168.*。*(rw,root-aquash)
查看客户端挂载共享目录的状态
#:nfsstat -c
查看服务器的状态
#:nfsstat -s
边栏推荐
- C语言字符串反转
- Acwing game 58
- JSON 与 BSON 区别
- Yu Wenwen, Hu Xia and other stars take you to play with the party. Pipi app ignites your summer
- Fast Ethernet and Gigabit Ethernet: what's the difference?
- ucore概述
- CC2530 common registers for ADC single channel conversion
- C language string inversion
- MySQL user management
- One brush 149 force deduction hot question-10 regular expression matching (H)
猜你喜欢
Thread pool: the most common and error prone component of business code
13mnnimo5-4 German standard steel plate 13MnNiMo54 boiler steel 13MnNiMo54 chemical properties
免费数据 | 新库上线 | CnOpenData中国保险中介机构网点全集数据
What material is 13crmo4-5 equivalent to in China? 13crmo4-5 chemical composition 13crmo4-5 mechanical properties
Build your own website (23)
The word backspace key cannot delete the selected text, so you can only press Delete
大变局!全国房价,跌破万元大关
What is the material of sa302grc? American standard container plate sa302grc chemical composition
Static program analysis (I) -- Outline mind map and content introduction
Depth first search of graph
随机推荐
One brush 146 force buckle hot question-3 longest substring without repeated characters (m)
Analysis of variance summary
Aike AI frontier promotion (7.3)
[sword finger offer] 58 - I. flip the word order
美团一面:为什么线程崩溃崩溃不会导致 JVM 崩溃
Recommendation of good books on learning QT programming
Necessary ability of data analysis
Idea configuration plug-in
How to judge the region of an IP through C?
[2. Basics of Delphi grammar] 2 Object Pascal data type
JSON 与 BSON 区别
Mysql database -dql
New features of C 10
CC2530 common registers for ADC single channel conversion
Yu Wenwen, Hu Xia and other stars take you to play with the party. Pipi app ignites your summer
MySQL converts comma separated attribute field data from column to row
27. 输入3个整数,按从大到小的次序输出。要求用指针方法实现。
Bcvp developer community 2022 exclusive peripheral first bullet
Thread pool: the most common and error prone component of business code
Kotlin学习快速入门(7)——扩展的妙用