nfs

服務端
yum install -y nfs-utils rpcbind
rpm -qa nfs-utils rpcbind
systemctl start rpcbind
systemctl start nfs
ps aux | grep nfs
ps aux | grep rpcbind
systemctl enable rpcbind
systemctl enable nfs
systemctl list-unit-files --type=service|grep "enabled"|egrep "rpcbind|nfs"
mkdir /data
chown -R nfsnobody.nfsnobody /data
ls -ld /data
cat>>/etc/exports<<EOFwindows

#NFS server share directories
/data 192.168.1.0/24(rw,sync)
EOF
systemctl reload nfs
cat /var/lib/nfs/etab
showmount -e 192.168.1.158(服務端Ip)ide

systemctl stop firewalld
setenforce 0
chmod 777 /data工具

客戶端命令行

yum install nfs-utils rpcbind -y
rpm -qa nfs-utils rpcbind
systemctl start rpcbind
systemctl enable rpcbind
systemctl list-unit-files --type=service|grep "enabled"|grep "rpcbind"
showmount -e 192.168.xx
mount -t nfs 192.168.1.158:/data /mnt
echo "mount -t nfs 192.168.1.158:/data /mnt">>/etc/rc.local
df -h
systemctl stop firewalld
setenforce 0server

鏈接windows
打開控制面板
點程序
點程序和功能中的小藍字
添加nfs服務,點加號出現的nfs客戶端、管理工具全選,這時變加號ip

打開windows的命令行服務cmd
輸入mount \ 192.168.x.x\data x:\ ipwei服務端ip
實現windows掛載
去計算機查看,會多出data磁盤
再去cmd上輸入mount查看掛載屬性
給Windows讀寫權限
在cmd內輸入regedit 回車 打開註冊表
找到 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default 這個路徑目錄
建立兩個32位值 AnonymousUid和AnonymousGid
重啓計算機
而後去cmd內輸入mount 查看屬性
在x:盤下放置***程序(這裏採用的是scp遠程傳輸)
用電腦殺毒軟件進行查殺文檔

文檔:搭建nfs服務.note
連接:http://note.youdao.com/noteshare?id=c27f34bfba9e41a28bfa644e7a9cda57rpc

相關文章
相關標籤/搜索
本站公眾號
   歡迎關注本站公眾號,獲取更多信息