Linux NFS网络传输服务:
本文章适合的读者:
Linux初、中级用户
开源软件爱好者
大中专院校的学生
社会培训学生
Linux下的开发人员
Nfs全称network files system ,网络文件传输系统,
nfs是一种协议,也是一种文件系统类型
nfs文件传输服务,只需要在服务端创建文件,客户端自动会接收文件
安装nfs服务
[root@localhost ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.33.el7.x86_64
[root@localhost ~]# rpm -q rpcbind
rpcbind-0.2.0-38.el7.x86_64
如果不存在,yum -y install 安装
创建共享目录:
[root@localhost ~]# mkdir /share#共享目录名
更改nfs的配置:
[root@localhost ~]# vim /etc/exports#修改服务端主配置文件
/share *(rw) #其他所有主机 }
/share *192.168.2.0/24(rw) #指定某个网段 }写一个就可以了
/share 192.168.2.20(rw)#指定某个ip }
[root@localhost ~]# systemctl restart nfs #重新启动nfs服务
[root@localhost ~]# systemctl restart rpcbind #重新启动rpcbind服务
[root@localhost ~]# showmount -e localhost#查看NFS共享目录