您的位置:首页 > 其它

NFS服务搭建.

2018-06-10 11:31 218 查看
NFS服务搭建图解:



服务端:

一、关闭防火墙
[root@localhost ~]# systemctl stop firewalld.service
[root@localhost ~]# setenforce 0
[root@localhost ~]# systemctl disable firewalld.service
[root@localhost ~]# systemctl enable firewalld.service

二、下载nfs-utils软件
[root@localhost ~]# yum install -y nfs-utils

三、设置网页存放目录,并写一个简单的网页
[root@localhost ~]# mkdir /webdate
[root@localhost ~]# echo abc123 > /webdate/index.html

四、设置哪个目录被访问(网页存放目录)?掩码、权限?



五、启动nfs-utils软件
[root@localhost ~]# systemctl start nfs-server.service

附):查看一些本主机提供可以被访问的目录
[root@localhost ~]# exportfs -v

客户端:

一、关闭防火墙
[root@localhost ~]# systemctl stop firewalld.service
[root@localhost ~]# setenforce 0
[root@localhost ~]# systemctl disable firewalld.service
[root@localhost ~]# systemctl enable firewalld.service

二、下载nfs-utils和http

[root@localhost ~]# yum install -y nfs-utils httpd

三、启动httpd 和 nfs-utils
[root@localhost ~]# systemctl start httpd
[root@localhost ~]# systemctl enable httpd
[root@localhost ~]# systemctl start nfs-utils
[root@localhost ~]# systemctl enable nfs-utils

附):查看一下服务端给客户端提供挂载的资料目录



四、挂载到服务端
[root@localhost ~]# mount -t nfs 192.168.1.182:/webdate /var/www/html

附):访问下客户端挂载成功后的效果

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  NFS 服务搭建