做的好的手機(jī)網(wǎng)站怎樣制作網(wǎng)頁(yè)設(shè)計(jì)
NFS共享要求如下:
(1)共享“/mnt/自已姓名的完整漢語(yǔ)拼音”目錄,允許XXX網(wǎng)段的計(jì)算機(jī)訪問該共享目錄,可進(jìn)行讀寫操作。(說明:XXX網(wǎng)段,請(qǐng)根據(jù)你的規(guī)劃,再具體指定)
(2)配置NFS客戶端。
注意:本文中省略了虛擬機(jī)的創(chuàng)建和克隆,同時(shí)運(yùn)用了外接軟件finalshell來進(jìn)行遠(yuǎn)程操作,可通過點(diǎn)擊鏈接來進(jìn)行finalshell遠(yuǎn)程連接。
1.根據(jù)需要在服務(wù)端創(chuàng)建相應(yīng)目錄和測(cè)試文件,以及設(shè)置權(quán)限。
服務(wù)端(第一臺(tái)虛擬機(jī)):
yum install nfs-utils rpbind -y
systemctl start nfs-server
systemctl start rpcbind
systemctl enable nfs-server
systemctl enable rpcbind
2.編輯exports文件,配置共享目錄和相應(yīng)權(quán)限等參數(shù)。
mkdir /mnt/pengyuyi
vim /etc/exports
/mnt/pengyuyi 192.168.85.0/24(rw,sync,no_root_squash)
systemctl restart rpcbind
systemctl restart nfs-server
systemctl stop firewalld
setenforce 0
showmount -e
3.客戶端掛載NFS。
客戶端(第二臺(tái)虛擬機(jī)):
yum install nfs-utils -y
showmount -e 192.168.85.149
mkdir /nfs
mount -t nfs 192.168.85.149:/mnt/pengyuyi /nfs
df -Th
vim /etc/fstab
mount -a
4.完成操作并測(cè)試。
在客戶端下創(chuàng)建文件,測(cè)試服務(wù)器是否能共享到:
客戶端(第二臺(tái)虛擬機(jī)):
cd /nfs
touch test1.txt
服務(wù)端(第一臺(tái)虛擬機(jī)):
cd /mnt/pengyuyi
ls
在客戶端下創(chuàng)建文件,測(cè)試服務(wù)器是否能共享到:
服務(wù)端(第一臺(tái)虛擬機(jī)):
vim test1.txt
ls
cat test.txt
客戶端(第二臺(tái)虛擬機(jī)):
vim test2.txt
cat test1.txt
好了,文章到此就告一段落了,如果本篇博客對(duì)您有一定的幫助,麻煩大家記得留言+點(diǎn)贊+收藏喔。創(chuàng)作不易,轉(zhuǎn)載請(qǐng)聯(lián)系作者!