当前位置:网站首页>网络硬盘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
边栏推荐
- 新库上线 | CnOpenData中国保险机构网点全集数据
- How to judge the region of an IP through C?
- 网络安全web渗透技术
- Redis:关于列表List类型数据的操作命令
- 跨境电商:外贸企业做海外社媒营销的优势
- [combinatorics] recursive equation (outline of recursive equation content | definition of recursive equation | example description of recursive equation | Fibonacci Series)
- Thread pool: the most common and error prone component of business code
- MySQL converts comma separated attribute field data from column to row
- One brush 147-force deduction hot question-4 find the median of two positive arrays (H)
- On Lagrange interpolation and its application
猜你喜欢

Thread pool: the most common and error prone component of business code

The most complete postman interface test tutorial in the whole network, API interface test

What material is sa537cl2 equivalent to in China? Sa537cl2 corresponding material

Arduino esp32: overall framework of lvgl project (I)

CC2530 common registers for port interrupts

【Try to Hack】主动侦查隐藏技术

2022.02.14_ Daily question leetcode five hundred and forty

Mysql database DDL and DML

Take you to API development by hand
![29: Chapter 3: develop Passport Service: 12: develop [obtain user account information, interface]; (use VO class to package the found data to meet the requirements of the interface for the returned da](/img/1c/c655c8232de1c56203873dcf171f45.png)
29: Chapter 3: develop Passport Service: 12: develop [obtain user account information, interface]; (use VO class to package the found data to meet the requirements of the interface for the returned da
随机推荐
What kind of material is 14Cr1MoR? Analysis of chemical composition and mechanical properties of 14Cr1MoR
RedHat 6.2 配置 Zabbix
2022.02.14_ Daily question leetcode five hundred and forty
Analysis of variance summary
新库上线 | CnOpenData中国观鸟记录数据
Arduino esp32: overall framework of lvgl project (I)
What is the material of 13mnnimor? 13mnnimor steel plate for medium and low temperature pressure vessels
Difference between JSON and bson
关于学习Qt编程的好书精品推荐
Depth first search of graph
C language string practice
建立自己的网站(23)
Execute script unrecognized \r
To resist 7-Zip, list "three sins"? Netizen: "is the third key?"
Fast Ethernet and Gigabit Ethernet: what's the difference?
C语言字符串反转
One brush 144 force deduction hot question-1 sum of two numbers (E)
深入理解 SQL 中的 Grouping Sets 语句
[sword finger offer] 58 - I. flip the word order
ANOVA example