NFS服務搭建.

NFS服務搭建圖解:
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服務搭建.

五、啓動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

附):查看一下服務端給客戶端提供掛載的資料目錄
NFS服務搭建.

四、掛載到服務端
[root@localhost ~]# mount -t nfs 192.168.1.182:/webdate /var/www/html

附):訪問下客戶端掛載成功後的效果
NFS服務搭建.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章