centos7.2 安装nfs
来源:互联网 发布:java方法是什么意思 编辑:程序博客网 时间:2024/06/05 02:53
1、安装nfs 和 rpcbind
安装nfs-utils ,rpcbind:
yum -y install nfs-utils ,rpcbind
2、关闭防火墙:
关闭防火墙
systemctl stop firewalld.service
禁止防火墙开机自启动
systemctl disable firewalld.service
3、启动服务:
nfs需要向rpc注册,rpc一旦重启,注册的文件都丢失,向他注册的服务都需要重启,注意启动顺序
启动rpc服务:
systemctl start rpcbind.service
启动nfs服务:
systemctl start nfs.service
4、设置开机自启动
设置rpc自启动:
systemctl enable rpcbind.service
设置rpc自启动 :
systemctl enable nfs.service
5、查看rpc ,nfs状态
查看rpc状态:active
systemctl status rpcbind.service
查看nfs状态:active
systemctl status nfs.service
客户端的安装配置
1、安装nfs 和 rpcbind
安装nfs-utils ,rpcbind:
yum -y install nfs-utils ,rpcbind
2、关闭防火墙:
关闭防火墙
systemctl stop firewalld.service
禁止防火墙开机自启动
systemctl disable firewalld.service
3、启动服务:
nfs需要向rpc注册,rpc一旦重启,注册的文件都丢失,向他注册的服务都需要重启,注意启动顺序
启动rpc服务:
systemctl start rpcbind.service
启动nfs服务:
systemctl start nfs.service
4、设置开机自启动
设置rpc自启动:
systemctl enable rpcbind.service
设置rpc自启动 :
systemctl enable nfs.service
5、查看rpc ,nfs状态
查看rpc状态:active
systemctl status rpcbind.service
查看nfs状态:active
systemctl status nfs.service
服务器端
1、在/etc/exports设置NFS服务共享文件夹的位置
vi /etc/exports
/etc/exports追加:
/data *(rw,sync,no_root_squash)
/data 共享的目录
* :任何人
rw :读写权限
sync:资料会先暂存于内存中,而非直接写入硬盘。
no_root_squash:当登录NFS主机使用共享目录的使用者是root时,其权限将被转换成为匿名使用者,通常它的UID与GID 都会变成nobody身份。
2、重启rpcbind 然后重启 nfs:
重启rpc服务:
systemctl restart rpcbind.service
重启nfs服务:
systemctl restart nfs.service
客户端
1、在所有客户端挂载服务器192.168.1.100的/data目录
在服务端192.168.1.100查看可挂载的目录:
showmount -e 192.168.1.100
进行挂载:
mount -t nfs 192.168.1.100:/data /data
2、设置客户端开机时自动挂载192.168.1.100:/data到本地的/data
在root用户下:
vi /etc/fstab
新增:
192.168.1.100:/data /data
- centos7.2 安装nfs
- CentOS7.2中安装NFS
- centos7安装nfs服务
- CentOS7安装NFS
- CentOS7中安装NFS
- centos7 安装nfs
- CENTOS7 安装配置 NFS
- CENTOS7 安装配置 NFS
- centos7 安装nfs报错
- CentOS7安装NFS后篇
- centos7.2 make安装nfs文件同步工具
- CentOS7 最小化安装后,安装配置NFS
- CentOS7 最小化安装后,安装配置NFS
- centos7 安装nfs和设置权限问题
- centos7 NFS服务安装和使用
- 【Centos7笔记十】NFS的安装使用
- NFS服务安装配置(centos7 nfs-utils示例)
- CentOS7.2 通过nfs设置共享文件夹
- ls 命令
- 匿名内部类的初始化
- 2017.6.29
- epoll源码实现分析[整理]
- 迁移,移动.vagrant.d目录
- centos7.2 安装nfs
- hibernate标准查询
- 基于CXF框架下的SOAP Webservice服务端接口开发
- 欢迎使用CSDN-markdown编辑器
- 3个简单类练习
- laravel文件上传
- CAD二次开发(C#)第二个例子
- JZOJ 5184. 【NOIP2017提高组模拟6.29】Gift
- 动态网页开发基础